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

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

Issue 12314053: Log the freshness of the Variations seed in a histogram. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: check comment Created 7 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
« no previous file with comments | « no previous file | chrome/browser/metrics/variations/variations_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 // there is a problem with loading, the pref value is cleared and false is 157 // there is a problem with loading, the pref value is cleared and false is
158 // returned. If successful, |seed| will contain the loaded data and true is 158 // returned. If successful, |seed| will contain the loaded data and true is
159 // returned. 159 // returned.
160 bool LoadTrialsSeedFromPref(PrefService* local_prefs, TrialsSeed* seed); 160 bool LoadTrialsSeedFromPref(PrefService* local_prefs, TrialsSeed* seed);
161 161
162 // Creates and registers a field trial from the |study| data. Disables the 162 // Creates and registers a field trial from the |study| data. Disables the
163 // trial if IsStudyExpired(study, reference_date) is true. 163 // trial if IsStudyExpired(study, reference_date) is true.
164 void CreateTrialFromStudy(const Study& study, 164 void CreateTrialFromStudy(const Study& study,
165 const base::Time& reference_date); 165 const base::Time& reference_date);
166 166
167 // Record the time of the most recent successful fetch.
168 void RecordLastFetchTime();
169
167 // The pref service used to store persist the variations seed. 170 // The pref service used to store persist the variations seed.
168 PrefService* local_state_; 171 PrefService* local_state_;
169 172
170 // Contains the current seed request. Will only have a value while a request 173 // Contains the current seed request. Will only have a value while a request
171 // is pending, and will be reset by |OnURLFetchComplete|. 174 // is pending, and will be reset by |OnURLFetchComplete|.
172 scoped_ptr<net::URLFetcher> pending_seed_request_; 175 scoped_ptr<net::URLFetcher> pending_seed_request_;
173 176
174 // The URL to use for querying the Variations server. 177 // The URL to use for querying the Variations server.
175 GURL variations_server_url_; 178 GURL variations_server_url_;
176 179
(...skipping 22 matching lines...) Expand all
199 202
200 #if defined(OS_WIN) 203 #if defined(OS_WIN)
201 // Helper that handles synchronizing Variations with the Registry. 204 // Helper that handles synchronizing Variations with the Registry.
202 VariationsRegistrySyncer registry_syncer_; 205 VariationsRegistrySyncer registry_syncer_;
203 #endif 206 #endif
204 }; 207 };
205 208
206 } // namespace chrome_variations 209 } // namespace chrome_variations
207 210
208 #endif // CHROME_BROWSER_METRICS_VARIATIONS_VARIATIONS_SERVICE_H_ 211 #endif // CHROME_BROWSER_METRICS_VARIATIONS_VARIATIONS_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/metrics/variations/variations_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698