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

Side by Side Diff: components/variations/net/variations_http_header_provider.cc

Issue 1182183003: Move EndsWith to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/variations/net/variations_http_header_provider.h" 5 #include "components/variations/net/variations_http_header_provider.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 return true; 273 return true;
274 } 274 }
275 275
276 if (!url.is_valid() || !url.SchemeIsHTTPOrHTTPS()) 276 if (!url.is_valid() || !url.SchemeIsHTTPOrHTTPS())
277 return false; 277 return false;
278 278
279 // Some domains don't have international TLD extensions, so testing for them 279 // Some domains don't have international TLD extensions, so testing for them
280 // is very straight forward. 280 // is very straight forward.
281 const std::string host = url.host(); 281 const std::string host = url.host();
282 for (size_t i = 0; i < arraysize(kSuffixesToSetHeadersFor); ++i) { 282 for (size_t i = 0; i < arraysize(kSuffixesToSetHeadersFor); ++i) {
283 if (EndsWith(host, kSuffixesToSetHeadersFor[i], false)) 283 if (base::EndsWith(host, kSuffixesToSetHeadersFor[i], false))
284 return true; 284 return true;
285 } 285 }
286 286
287 return google_util::IsYoutubeDomainUrl(url, google_util::ALLOW_SUBDOMAIN, 287 return google_util::IsYoutubeDomainUrl(url, google_util::ALLOW_SUBDOMAIN,
288 google_util::ALLOW_NON_STANDARD_PORTS); 288 google_util::ALLOW_NON_STANDARD_PORTS);
289 } 289 }
290 290
291 } // namespace variations 291 } // namespace variations
OLDNEW
« no previous file with comments | « components/translate/core/browser/translate_language_list.cc ('k') | components/wifi/wifi_service_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698