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

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

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 void SecurityOrigin::setDomainFromDOM(const String& newDomain) { 204 void SecurityOrigin::setDomainFromDOM(const String& newDomain) {
205 m_domainWasSetInDOM = true; 205 m_domainWasSetInDOM = true;
206 m_domain = newDomain; 206 m_domain = newDomain;
207 } 207 }
208 208
209 bool SecurityOrigin::isSecure(const KURL& url) { 209 bool SecurityOrigin::isSecure(const KURL& url) {
210 if (SchemeRegistry::shouldTreatURLSchemeAsSecure(url.protocol())) 210 if (SchemeRegistry::shouldTreatURLSchemeAsSecure(url.protocol()))
211 return true; 211 return true;
212 212
213 // URLs that wrap inner URLs are secure if those inner URLs are secure. 213 // URLs that wrap inner URLs are secure if those inner URLs are secure.
214 if (shouldUseInnerURL(url) && SchemeRegistry::shouldTreatURLSchemeAsSecure( 214 if (shouldUseInnerURL(url) &&
215 extractInnerURL(url).protocol())) 215 SchemeRegistry::shouldTreatURLSchemeAsSecure(
216 extractInnerURL(url).protocol()))
216 return true; 217 return true;
217 218
218 if (SecurityPolicy::isUrlWhiteListedTrustworthy(url)) 219 if (SecurityPolicy::isUrlWhiteListedTrustworthy(url))
219 return true; 220 return true;
220 221
221 return false; 222 return false;
222 } 223 }
223 224
224 bool SecurityOrigin::canAccess(const SecurityOrigin* other) const { 225 bool SecurityOrigin::canAccess(const SecurityOrigin* other) const {
225 if (m_universalAccess) 226 if (m_universalAccess)
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 utf8.data(), url::Component(0, utf8.length()), &canonOutput, &outHost); 619 utf8.data(), url::Component(0, utf8.length()), &canonOutput, &outHost);
619 } else { 620 } else {
620 *success = url::CanonicalizeHost(host.characters16(), 621 *success = url::CanonicalizeHost(host.characters16(),
621 url::Component(0, host.length()), 622 url::Component(0, host.length()),
622 &canonOutput, &outHost); 623 &canonOutput, &outHost);
623 } 624 }
624 return String::fromUTF8(canonOutput.data(), canonOutput.length()); 625 return String::fromUTF8(canonOutput.data(), canonOutput.length());
625 } 626 }
626 627
627 } // namespace blink 628 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698