| Index: components/variations/variations_http_header_provider.h
|
| diff --git a/components/variations/variations_http_header_provider.h b/components/variations/variations_http_header_provider.h
|
| index 184766d63520a875bcbacd128cdddab2d6db46c2..349fea9951cda61c69562b3cca81db02e030925d 100644
|
| --- a/components/variations/variations_http_header_provider.h
|
| +++ b/components/variations/variations_http_header_provider.h
|
| @@ -7,7 +7,6 @@
|
|
|
| #include <set>
|
| #include <string>
|
| -#include <utility>
|
| #include <vector>
|
|
|
| #include "base/gtest_prod_util.h"
|
| @@ -33,15 +32,12 @@
|
| static VariationsHttpHeaderProvider* GetInstance();
|
|
|
| // Returns the value of the client data header, computing and caching it if
|
| - // necessary. If |is_signed_in| is false, variation ids that should only be
|
| - // sent for signed in users (i.e. GOOGLE_WEB_PROPERTIES_SIGNED_IN entries)
|
| - // will not be included.
|
| - std::string GetClientDataHeader(bool is_signed_in);
|
| + // necessary.
|
| + std::string GetClientDataHeader();
|
|
|
| // Returns a space-separated string containing the list of current active
|
| // variations (as would be reported in the |variation_id| repeated field of
|
| - // the ClientVariations proto). Does not include variation ids that should be
|
| - // sent for signed-in users only. The returned string is guaranteed to have a
|
| + // the ClientVariations proto). The returned string is guaranteed to have a
|
| // a leading and trailing space, e.g. " 123 234 345 ".
|
| std::string GetVariationsString();
|
|
|
| @@ -64,8 +60,6 @@
|
|
|
| private:
|
| friend struct base::DefaultSingletonTraits<VariationsHttpHeaderProvider>;
|
| -
|
| - typedef std::pair<VariationID, IDCollectionKey> VariationIDEntry;
|
|
|
| FRIEND_TEST_ALL_PREFIXES(VariationsHttpHeaderProviderTest,
|
| SetDefaultVariationIds_Valid);
|
| @@ -94,43 +88,35 @@
|
| // new variation IDs.
|
| void InitVariationIDsCacheIfNeeded();
|
|
|
| - // Looks up the associated id for the given trial/group and adds an entry for
|
| - // it to |variation_ids_set_| if found.
|
| - void CacheVariationsId(const std::string& trial_name,
|
| - const std::string& group_name,
|
| - IDCollectionKey key);
|
| -
|
| // Takes whatever is currently in |variation_ids_set_| and recreates
|
| // |variation_ids_header_| with it. Assumes the the |lock_| is currently
|
| // held.
|
| void UpdateVariationIDsHeaderValue();
|
|
|
| - // Generates a base64-encoded proto to be used as a header value for the given
|
| - // |is_signed_in| state.
|
| - std::string GenerateBase64EncodedProto(bool is_signed_in);
|
| -
|
| // Returns the currently active set of variation ids, which includes any
|
| // default values, synthetic variations and actual field trial variations.
|
| - std::set<VariationIDEntry> GetAllVariationIds();
|
| + std::set<VariationID> GetAllVariationIds();
|
|
|
| - // Guards access to variables below.
|
| + // Guards |variation_ids_cache_initialized_|, |variation_ids_set_| and
|
| + // |variation_ids_header_|.
|
| base::Lock lock_;
|
|
|
| - // Whether or not we've initialized the caches.
|
| + // Whether or not we've initialized the cache.
|
| bool variation_ids_cache_initialized_;
|
|
|
| // Keep a cache of variation IDs that are transmitted in headers to Google.
|
| // This consists of a list of valid IDs, and the actual transmitted header.
|
| - std::set<VariationIDEntry> variation_ids_set_;
|
| + std::set<VariationID> variation_ids_set_;
|
| + std::set<VariationID> variation_trigger_ids_set_;
|
|
|
| // Provides the google experiment ids forced from command line.
|
| - std::set<VariationIDEntry> default_variation_ids_set_;
|
| + std::set<VariationID> default_variation_ids_set_;
|
| + std::set<VariationID> default_trigger_id_set_;
|
|
|
| // Variations ids from synthetic field trials.
|
| - std::set<VariationIDEntry> synthetic_variation_ids_set_;
|
| + std::set<VariationID> synthetic_variation_ids_set_;
|
|
|
| - std::string cached_variation_ids_header_;
|
| - std::string cached_variation_ids_header_signed_in_;
|
| + std::string variation_ids_header_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(VariationsHttpHeaderProvider);
|
| };
|
|
|