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

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

Issue 2329463004: ABANDONED CL: Changes needed to make things compile after running rewrite_to_chrome_style tool. (Closed)
Patch Set: More fixes - things build fine at this point. Created 3 years, 8 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 OriginAccessEntry::OriginAccessEntry(const String& protocol, 78 OriginAccessEntry::OriginAccessEntry(const String& protocol,
79 const String& host, 79 const String& host,
80 SubdomainSetting subdomainSetting) 80 SubdomainSetting subdomainSetting)
81 : m_protocol(protocol), 81 : m_protocol(protocol),
82 m_host(host), 82 m_host(host),
83 m_subdomainSettings(subdomainSetting), 83 m_subdomainSettings(subdomainSetting),
84 m_hostIsPublicSuffix(false) { 84 m_hostIsPublicSuffix(false) {
85 ASSERT(subdomainSetting >= AllowSubdomains || 85 ASSERT(subdomainSetting >= AllowSubdomains ||
86 subdomainSetting <= DisallowSubdomains); 86 subdomainSetting <= DisallowSubdomains);
87 87
88 m_hostIsIPAddress = HostIsIPAddress(host); 88 host_is_ip_address_ = blink::HostIsIPAddress(host);
89 89
90 // Look for top-level domains, either with or without an additional dot. 90 // Look for top-level domains, either with or without an additional dot.
91 if (!m_hostIsIPAddress) { 91 if (!m_hostIsIPAddress) {
92 WebPublicSuffixList* suffixList = Platform::current()->publicSuffixList(); 92 WebPublicSuffixList* suffixList = Platform::current()->publicSuffixList();
93 if (!suffixList) 93 if (!suffixList)
94 return; 94 return;
95 95
96 size_t publicSuffixLength = suffixList->getPublicSuffixLength(m_host); 96 size_t publicSuffixLength = suffixList->getPublicSuffixLength(m_host);
97 if (m_host.length() <= publicSuffixLength + 1) { 97 if (m_host.length() <= publicSuffixLength + 1) {
98 m_hostIsPublicSuffix = true; 98 m_hostIsPublicSuffix = true;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 break; 156 break;
157 }; 157 };
158 158
159 if (m_hostIsPublicSuffix) 159 if (m_hostIsPublicSuffix)
160 return MatchesOriginButIsPublicSuffix; 160 return MatchesOriginButIsPublicSuffix;
161 161
162 return MatchesOrigin; 162 return MatchesOrigin;
163 } 163 }
164 164
165 } // namespace blink 165 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698