| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 PrefService* local_state); | 80 PrefService* local_state); |
| 81 | 81 |
| 82 private: | 82 private: |
| 83 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, DoNotFetchIfOffline); | 83 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, DoNotFetchIfOffline); |
| 84 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, DoNotFetchIfOnlineToOnline); | 84 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, DoNotFetchIfOnlineToOnline); |
| 85 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, FetchOnReconnect); | 85 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, FetchOnReconnect); |
| 86 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, LoadSeed); | 86 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, LoadSeed); |
| 87 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, StoreSeed); | 87 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, StoreSeed); |
| 88 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, SeedStoredWhenOKStatus); | 88 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, SeedStoredWhenOKStatus); |
| 89 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, SeedNotStoredWhenNonOKStatus); | 89 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, SeedNotStoredWhenNonOKStatus); |
| 90 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, SeedDateUpdatedOn304Status); |
| 90 | 91 |
| 91 // Creates the VariationsService with the given |local_state| prefs service. | 92 // Creates the VariationsService with the given |local_state| prefs service. |
| 92 // Use the |Create| factory method to create a VariationsService. | 93 // Use the |Create| factory method to create a VariationsService. |
| 93 explicit VariationsService(PrefService* local_state); | 94 explicit VariationsService(PrefService* local_state); |
| 94 | 95 |
| 95 // Checks if prerequisites for fetching the Variations seed are met, and if | 96 // Checks if prerequisites for fetching the Variations seed are met, and if |
| 96 // so, performs the actual fetch using |DoActualFetch|. | 97 // so, performs the actual fetch using |DoActualFetch|. |
| 97 void FetchVariationsSeed(); | 98 void FetchVariationsSeed(); |
| 98 | 99 |
| 99 // net::URLFetcherDelegate implementation: | 100 // net::URLFetcherDelegate implementation: |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 // Helper that handles synchronizing Variations with the Registry. | 154 // Helper that handles synchronizing Variations with the Registry. |
| 154 VariationsRegistrySyncer registry_syncer_; | 155 VariationsRegistrySyncer registry_syncer_; |
| 155 #endif | 156 #endif |
| 156 | 157 |
| 157 DISALLOW_COPY_AND_ASSIGN(VariationsService); | 158 DISALLOW_COPY_AND_ASSIGN(VariationsService); |
| 158 }; | 159 }; |
| 159 | 160 |
| 160 } // namespace chrome_variations | 161 } // namespace chrome_variations |
| 161 | 162 |
| 162 #endif // CHROME_BROWSER_METRICS_VARIATIONS_VARIATIONS_SERVICE_H_ | 163 #endif // CHROME_BROWSER_METRICS_VARIATIONS_VARIATIONS_SERVICE_H_ |
| OLD | NEW |