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

Unified Diff: chrome/browser/metrics/variations/variations_http_header_provider.h

Issue 307743003: Add more Google domains to the list of domains which should have (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix more comments from avd Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/metrics/variations/variations_http_header_provider.h
diff --git a/chrome/browser/metrics/variations/variations_http_header_provider.h b/chrome/browser/metrics/variations/variations_http_header_provider.h
index 4b7d9a81793d7f9160eb8b0d97868dae49288051..c812ba90a9cf323b2a74082b01d393afe36c8057 100644
--- a/chrome/browser/metrics/variations/variations_http_header_provider.h
+++ b/chrome/browser/metrics/variations/variations_http_header_provider.h
@@ -9,6 +9,7 @@
#include <string>
#include "base/basictypes.h"
+#include "base/containers/hash_tables.h"
#include "base/gtest_prod_util.h"
#include "base/metrics/field_trial.h"
#include "base/synchronization/lock.h"
@@ -87,7 +88,7 @@ class VariationsHttpHeaderProvider : base::FieldTrialList::Observer {
// Checks whether variation headers should be appended to requests to the
// specified |url|. Returns true for google.<TLD> and youtube.<TLD> URLs.
- static bool ShouldAppendHeaders(const GURL& url);
+ bool ShouldAppendHeaders(const GURL& url);
// Guards |variation_ids_cache_initialized_|, |variation_ids_set_| and
// |variation_ids_header_|.
@@ -107,6 +108,10 @@ class VariationsHttpHeaderProvider : base::FieldTrialList::Observer {
std::string variation_ids_header_;
+ // Any hostname which ends with one of these suffixes will have
+ // headers transmitted.
+ base::hash_set<std::string> suffixes_to_set_headers_for_;
+
DISALLOW_COPY_AND_ASSIGN(VariationsHttpHeaderProvider);
};

Powered by Google App Engine
This is Rietveld 408576698