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

Side by Side Diff: chrome/browser/metrics/variations/variations_service.h

Issue 183003008: Enforce variations signature verification. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 9 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 #ifndef CHROME_BROWSER_METRICS_VARIATIONS_VARIATIONS_SERVICE_H_ 5 #ifndef CHROME_BROWSER_METRICS_VARIATIONS_VARIATIONS_SERVICE_H_
6 #define CHROME_BROWSER_METRICS_VARIATIONS_VARIATIONS_SERVICE_H_ 6 #define CHROME_BROWSER_METRICS_VARIATIONS_VARIATIONS_SERVICE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 void set_policy_pref_service(PrefService* service) { 89 void set_policy_pref_service(PrefService* service) {
90 DCHECK(service); 90 DCHECK(service);
91 policy_pref_service_ = service; 91 policy_pref_service_ = service;
92 } 92 }
93 93
94 protected: 94 protected:
95 // Starts the fetching process once, where |OnURLFetchComplete| is called with 95 // Starts the fetching process once, where |OnURLFetchComplete| is called with
96 // the response. 96 // the response.
97 virtual void DoActualFetch(); 97 virtual void DoActualFetch();
98 98
99 // Stores the seed to prefs. Set as virtual and protected so that it can be
100 // overridden by tests.
101 virtual void StoreSeed(const std::string& seed_data,
102 const std::string& seed_signature,
103 const base::Time& date_fetched);
104
99 // This constructor exists for injecting a mock notifier. It is meant for 105 // This constructor exists for injecting a mock notifier. It is meant for
100 // testing only. This instance will take ownership of |notifier|. 106 // testing only. This instance will take ownership of |notifier|.
101 VariationsService(ResourceRequestAllowedNotifier* notifier, 107 VariationsService(ResourceRequestAllowedNotifier* notifier,
102 PrefService* local_state); 108 PrefService* local_state);
103 109
104 private: 110 private:
105 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, DoNotFetchIfOffline); 111 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, DoNotFetchIfOffline);
106 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, DoNotFetchIfOnlineToOnline); 112 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, DoNotFetchIfOnlineToOnline);
107 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, FetchOnReconnect); 113 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, FetchOnReconnect);
108 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, LoadSeed); 114 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, LoadSeed);
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 // Helper that handles synchronizing Variations with the Registry. 174 // Helper that handles synchronizing Variations with the Registry.
169 VariationsRegistrySyncer registry_syncer_; 175 VariationsRegistrySyncer registry_syncer_;
170 #endif 176 #endif
171 177
172 DISALLOW_COPY_AND_ASSIGN(VariationsService); 178 DISALLOW_COPY_AND_ASSIGN(VariationsService);
173 }; 179 };
174 180
175 } // namespace chrome_variations 181 } // namespace chrome_variations
176 182
177 #endif // CHROME_BROWSER_METRICS_VARIATIONS_VARIATIONS_SERVICE_H_ 183 #endif // CHROME_BROWSER_METRICS_VARIATIONS_VARIATIONS_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698