OLD | NEW |
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 Loading... |
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 |
OLD | NEW |