Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp

Issue 2700123003: DO NOT COMMIT: Results of running old (current) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 10 matching lines...) Expand all
21 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29 #include "platform/weborigin/SecurityOrigin.h" 29 #include "platform/weborigin/SecurityOrigin.h"
30 30
31 #include <memory>
31 #include "platform/RuntimeEnabledFeatures.h" 32 #include "platform/RuntimeEnabledFeatures.h"
32 #include "platform/weborigin/KURL.h" 33 #include "platform/weborigin/KURL.h"
33 #include "platform/weborigin/KnownPorts.h" 34 #include "platform/weborigin/KnownPorts.h"
34 #include "platform/weborigin/SchemeRegistry.h" 35 #include "platform/weborigin/SchemeRegistry.h"
35 #include "platform/weborigin/SecurityPolicy.h" 36 #include "platform/weborigin/SecurityPolicy.h"
36 #include "platform/weborigin/URLSecurityOriginMap.h" 37 #include "platform/weborigin/URLSecurityOriginMap.h"
37 #include "url/url_canon.h" 38 #include "url/url_canon.h"
38 #include "url/url_canon_ip.h" 39 #include "url/url_canon_ip.h"
39 #include "wtf/HexNumber.h" 40 #include "wtf/HexNumber.h"
40 #include "wtf/NotFound.h" 41 #include "wtf/NotFound.h"
41 #include "wtf/PtrUtil.h" 42 #include "wtf/PtrUtil.h"
42 #include "wtf/StdLibExtras.h" 43 #include "wtf/StdLibExtras.h"
43 #include "wtf/text/StringBuilder.h" 44 #include "wtf/text/StringBuilder.h"
44 #include "wtf/text/StringUTF8Adaptor.h" 45 #include "wtf/text/StringUTF8Adaptor.h"
45 #include <memory>
46 46
47 namespace blink { 47 namespace blink {
48 48
49 const int InvalidPort = 0; 49 const int InvalidPort = 0;
50 const int MaxAllowedPort = 65535; 50 const int MaxAllowedPort = 65535;
51 51
52 static URLSecurityOriginMap* s_urlOriginMap = 0; 52 static URLSecurityOriginMap* s_urlOriginMap = 0;
53 53
54 static SecurityOrigin* getOriginFromMap(const KURL& url) { 54 static SecurityOrigin* getOriginFromMap(const KURL& url) {
55 if (s_urlOriginMap) 55 if (s_urlOriginMap)
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 utf8.data(), url::Component(0, utf8.length()), &canonOutput, &outHost); 618 utf8.data(), url::Component(0, utf8.length()), &canonOutput, &outHost);
619 } else { 619 } else {
620 *success = url::CanonicalizeHost(host.characters16(), 620 *success = url::CanonicalizeHost(host.characters16(),
621 url::Component(0, host.length()), 621 url::Component(0, host.length()),
622 &canonOutput, &outHost); 622 &canonOutput, &outHost);
623 } 623 }
624 return String::fromUTF8(canonOutput.data(), canonOutput.length()); 624 return String::fromUTF8(canonOutput.data(), canonOutput.length());
625 } 625 }
626 626
627 } // namespace blink 627 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698