Chromium Code Reviews| 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_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_METRICS_VARIATIONS_SERVICE_H_ |
| 6 #define CHROME_BROWSER_METRICS_VARIATIONS_SERVICE_H_ | 6 #define CHROME_BROWSER_METRICS_VARIATIONS_SERVICE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 51 static void RegisterPrefs(PrefService* prefs); | 51 static void RegisterPrefs(PrefService* prefs); |
| 52 | 52 |
| 53 private: | 53 private: |
| 54 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, CheckStudyChannel); | 54 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, CheckStudyChannel); |
| 55 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, CheckStudyPlatform); | 55 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, CheckStudyPlatform); |
| 56 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, CheckStudyVersion); | 56 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, CheckStudyVersion); |
| 57 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, CheckStudyVersionWildcards); | 57 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, CheckStudyVersionWildcards); |
| 58 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, CheckStudyStartDate); | 58 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, CheckStudyStartDate); |
| 59 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, IsStudyExpired); | 59 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, IsStudyExpired); |
| 60 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, ValidateStudy); | 60 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, ValidateStudy); |
| 61 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, StoreSeed); | |
|
SteveT
2012/07/09 19:23:26
Make sure these two are in alpha order.
jwd
2012/07/09 21:08:13
Done.
| |
| 62 FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, LoadSeed); | |
| 61 | 63 |
| 62 // Store the given seed data to the given local prefs. Note that |seed_data| | 64 // Store the given seed data to the given local prefs. Note that |seed_data| |
| 63 // is assumed to be the raw serialized protobuf data stored in a string. It | 65 // is assumed to be the raw serialized protobuf data stored in a string. It |
| 64 // will be Base64Encoded for storage. If the string is invalid or the encoding | 66 // will be Base64Encoded for storage. If the string is invalid or the encoding |
| 65 // fails, the |local_prefs| is left as is. | 67 // fails, the |local_prefs| is left as is. |
| 66 void StoreSeedData(const std::string& seed_data, | 68 void StoreSeedData(const std::string& seed_data, |
| 67 const base::Time& seed_date, | 69 const base::Time& seed_date, |
| 68 PrefService* local_prefs); | 70 PrefService* local_prefs); |
| 69 | 71 |
| 70 // Returns whether |study| should be disabled according to its restriction | 72 // Returns whether |study| should be disabled according to its restriction |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 117 // The URL to use for querying the variations server. | 119 // The URL to use for querying the variations server. |
| 118 GURL variations_server_url_; | 120 GURL variations_server_url_; |
| 119 | 121 |
| 120 // Keep a weak pointer generator so we can bind delayed calls to the server. | 122 // Keep a weak pointer generator so we can bind delayed calls to the server. |
| 121 base::WeakPtrFactory<VariationsService> weak_factory_; | 123 base::WeakPtrFactory<VariationsService> weak_factory_; |
| 122 }; | 124 }; |
| 123 | 125 |
| 124 } // namespace chrome_variations | 126 } // namespace chrome_variations |
| 125 | 127 |
| 126 #endif // CHROME_BROWSER_METRICS_VARIATIONS_SERVICE_H_ | 128 #endif // CHROME_BROWSER_METRICS_VARIATIONS_SERVICE_H_ |
| OLD | NEW |