angler-fishThe Vulnerability History Project

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
&quotcreate&quot 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
    
commit 2e4330170a73583e30925f33f55c4fd9d76aaf53
-27
+67 -120
+2 -3
expand_less