| OLD | NEW |
| 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 | 161 |
| 162 // Checks if prerequisites for fetching the Variations seed are met, and if | 162 // Checks if prerequisites for fetching the Variations seed are met, and if |
| 163 // so, performs the actual fetch using |DoActualFetch|. | 163 // so, performs the actual fetch using |DoActualFetch|. |
| 164 void FetchVariationsSeed(); | 164 void FetchVariationsSeed(); |
| 165 | 165 |
| 166 // Notify any observers of this service based on the simulation |result|. | 166 // Notify any observers of this service based on the simulation |result|. |
| 167 void NotifyObservers( | 167 void NotifyObservers( |
| 168 const variations::VariationsSeedSimulator::Result& result); | 168 const variations::VariationsSeedSimulator::Result& result); |
| 169 | 169 |
| 170 // net::URLFetcherDelegate implementation: | 170 // net::URLFetcherDelegate implementation: |
| 171 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; | 171 virtual void OnURLFetchComplete(const net::URLFetcher* source) override; |
| 172 | 172 |
| 173 // ResourceRequestAllowedNotifier::Observer implementation: | 173 // ResourceRequestAllowedNotifier::Observer implementation: |
| 174 virtual void OnResourceRequestsAllowed() OVERRIDE; | 174 virtual void OnResourceRequestsAllowed() override; |
| 175 | 175 |
| 176 // Performs a variations seed simulation with the given |seed| and |version| | 176 // Performs a variations seed simulation with the given |seed| and |version| |
| 177 // and logs the simulation results as histograms. | 177 // and logs the simulation results as histograms. |
| 178 void PerformSimulationWithVersion(scoped_ptr<variations::VariationsSeed> seed, | 178 void PerformSimulationWithVersion(scoped_ptr<variations::VariationsSeed> seed, |
| 179 const base::Version& version); | 179 const base::Version& version); |
| 180 | 180 |
| 181 // Record the time of the most recent successful fetch. | 181 // Record the time of the most recent successful fetch. |
| 182 void RecordLastFetchTime(); | 182 void RecordLastFetchTime(); |
| 183 | 183 |
| 184 // The pref service used to store persist the variations seed. | 184 // The pref service used to store persist the variations seed. |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 #endif | 230 #endif |
| 231 | 231 |
| 232 base::WeakPtrFactory<VariationsService> weak_ptr_factory_; | 232 base::WeakPtrFactory<VariationsService> weak_ptr_factory_; |
| 233 | 233 |
| 234 DISALLOW_COPY_AND_ASSIGN(VariationsService); | 234 DISALLOW_COPY_AND_ASSIGN(VariationsService); |
| 235 }; | 235 }; |
| 236 | 236 |
| 237 } // namespace chrome_variations | 237 } // namespace chrome_variations |
| 238 | 238 |
| 239 #endif // CHROME_BROWSER_METRICS_VARIATIONS_VARIATIONS_SERVICE_H_ | 239 #endif // CHROME_BROWSER_METRICS_VARIATIONS_VARIATIONS_SERVICE_H_ |
| OLD | NEW |