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

Side by Side Diff: chrome/browser/metrics/variations/variations_http_header_provider.cc

Issue 333723002: Componentize google_util (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + build fix Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/metrics/variations/variations_http_header_provider.h" 5 #include "chrome/browser/metrics/variations/variations_http_header_provider.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
11 #include "base/metrics/histogram.h" 11 #include "base/metrics/histogram.h"
12 #include "base/strings/string_number_conversions.h" 12 #include "base/strings/string_number_conversions.h"
13 #include "base/strings/string_split.h" 13 #include "base/strings/string_split.h"
14 #include "base/strings/string_util.h" 14 #include "base/strings/string_util.h"
15 #include "chrome/browser/google/google_util.h"
16 #include "chrome/common/metrics/proto/chrome_experiments.pb.h" 15 #include "chrome/common/metrics/proto/chrome_experiments.pb.h"
16 #include "components/google/core/browser/google_util.h"
17 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" 17 #include "net/base/registry_controlled_domains/registry_controlled_domain.h"
18 #include "net/http/http_request_headers.h" 18 #include "net/http/http_request_headers.h"
19 #include "url/gurl.h" 19 #include "url/gurl.h"
20 20
21 namespace chrome_variations { 21 namespace chrome_variations {
22 22
23 namespace { 23 namespace {
24 24
25 const char* kSuffixesToSetHeadersFor[] = { 25 const char* kSuffixesToSetHeadersFor[] = {
26 ".android.com", 26 ".android.com",
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 for (size_t i = 0; i < arraysize(kSuffixesToSetHeadersFor); ++i) { 250 for (size_t i = 0; i < arraysize(kSuffixesToSetHeadersFor); ++i) {
251 if (EndsWith(host, kSuffixesToSetHeadersFor[i], false)) 251 if (EndsWith(host, kSuffixesToSetHeadersFor[i], false))
252 return true; 252 return true;
253 } 253 }
254 254
255 return google_util::IsYoutubeDomainUrl(url, google_util::ALLOW_SUBDOMAIN, 255 return google_util::IsYoutubeDomainUrl(url, google_util::ALLOW_SUBDOMAIN,
256 google_util::ALLOW_NON_STANDARD_PORTS); 256 google_util::ALLOW_NON_STANDARD_PORTS);
257 } 257 }
258 258
259 } // namespace chrome_variations 259 } // namespace chrome_variations
OLDNEW
« no previous file with comments | « chrome/browser/media/media_stream_infobar_delegate.cc ('k') | chrome/browser/net/chrome_network_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698