Refactor SecurityOrigin::create to be easier to understand
https://bugs.webkit.org/show_bug.cgi?id=72342
Reviewed by Eric Seidel.
Over time, the SecurityOrigin constructor has grown a bit out of
control. This patch attempts to separate the different concerns into
free functions. The general approach is to put more logic in the
"create" function and introduce a simple constructor for unique
origins.
This patch shouldn't change any behavior.
* page/SecurityOrigin.cpp:
(WebCore::schemeRequiresAuthority):
(WebCore::shouldUseInnerURL):
(WebCore::extractInnerURL):
(WebCore::isDirectory):
(WebCore::shouldTreatAsUniqueOrigin):
(WebCore::SecurityOrigin::SecurityOrigin):
(WebCore::SecurityOrigin::create):
(WebCore::SecurityOrigin::createUnique):
(WebCore::SecurityOrigin::databaseIdentifier):
* page/SecurityOrigin.h:
git-svn-id: svn://svn.chromium.org/blink/trunk@100691 bbb929c8-8fbe-4397-9dbb-9b2b20218538