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

Side by Side Diff: components/variations/variations_http_header_provider.h

Issue 666133002: Standardize usage of virtual/override/final in components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 #ifndef COMPONENTS_VARIATIONS_VARIATIONS_HTTP_HEADER_PROVIDER_H_ 5 #ifndef COMPONENTS_VARIATIONS_VARIATIONS_HTTP_HEADER_PROVIDER_H_
6 #define COMPONENTS_VARIATIONS_VARIATIONS_HTTP_HEADER_PROVIDER_H_ 6 #define COMPONENTS_VARIATIONS_VARIATIONS_HTTP_HEADER_PROVIDER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 FRIEND_TEST_ALL_PREFIXES(VariationsHttpHeaderProviderTest, 57 FRIEND_TEST_ALL_PREFIXES(VariationsHttpHeaderProviderTest,
58 ShouldAppendHeaders); 58 ShouldAppendHeaders);
59 FRIEND_TEST_ALL_PREFIXES(VariationsHttpHeaderProviderTest, 59 FRIEND_TEST_ALL_PREFIXES(VariationsHttpHeaderProviderTest,
60 SetDefaultVariationIds_Valid); 60 SetDefaultVariationIds_Valid);
61 FRIEND_TEST_ALL_PREFIXES(VariationsHttpHeaderProviderTest, 61 FRIEND_TEST_ALL_PREFIXES(VariationsHttpHeaderProviderTest,
62 SetDefaultVariationIds_Invalid); 62 SetDefaultVariationIds_Invalid);
63 FRIEND_TEST_ALL_PREFIXES(VariationsHttpHeaderProviderTest, 63 FRIEND_TEST_ALL_PREFIXES(VariationsHttpHeaderProviderTest,
64 OnFieldTrialGroupFinalized); 64 OnFieldTrialGroupFinalized);
65 65
66 VariationsHttpHeaderProvider(); 66 VariationsHttpHeaderProvider();
67 virtual ~VariationsHttpHeaderProvider(); 67 ~VariationsHttpHeaderProvider() override;
68 68
69 // base::FieldTrialList::Observer implementation. 69 // base::FieldTrialList::Observer implementation.
70 // This will add the variation ID associated with |trial_name| and 70 // This will add the variation ID associated with |trial_name| and
71 // |group_name| to the variation ID cache. 71 // |group_name| to the variation ID cache.
72 virtual void OnFieldTrialGroupFinalized( 72 void OnFieldTrialGroupFinalized(const std::string& trial_name,
73 const std::string& trial_name, 73 const std::string& group_name) override;
74 const std::string& group_name) override;
75 74
76 // Prepares the variation IDs cache with initial values if not already done. 75 // Prepares the variation IDs cache with initial values if not already done.
77 // This method also registers the caller with the FieldTrialList to receive 76 // This method also registers the caller with the FieldTrialList to receive
78 // new variation IDs. 77 // new variation IDs.
79 void InitVariationIDsCacheIfNeeded(); 78 void InitVariationIDsCacheIfNeeded();
80 79
81 // Takes whatever is currently in |variation_ids_set_| and recreates 80 // Takes whatever is currently in |variation_ids_set_| and recreates
82 // |variation_ids_header_| with it. Assumes the the |lock_| is currently 81 // |variation_ids_header_| with it. Assumes the the |lock_| is currently
83 // held. 82 // held.
84 void UpdateVariationIDsHeaderValue(); 83 void UpdateVariationIDsHeaderValue();
(...skipping 19 matching lines...) Expand all
104 std::set<VariationID> default_trigger_id_set_; 103 std::set<VariationID> default_trigger_id_set_;
105 104
106 std::string variation_ids_header_; 105 std::string variation_ids_header_;
107 106
108 DISALLOW_COPY_AND_ASSIGN(VariationsHttpHeaderProvider); 107 DISALLOW_COPY_AND_ASSIGN(VariationsHttpHeaderProvider);
109 }; 108 };
110 109
111 } // namespace variations 110 } // namespace variations
112 111
113 #endif // COMPONENTS_VARIATIONS_VARIATIONS_HTTP_HEADER_PROVIDER_H_ 112 #endif // COMPONENTS_VARIATIONS_VARIATIONS_HTTP_HEADER_PROVIDER_H_
OLDNEW
« no previous file with comments | « components/variations/entropy_provider_unittest.cc ('k') | components/variations/variations_seed_simulator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698