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

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

Issue 147723010: Expose a method in VariationsService to trigger a seed fetch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // Calls FetchVariationsSeed once and repeats this periodically. See 46 // Calls FetchVariationsSeed once and repeats this periodically. See
47 // implementation for details on the period. Must be called after 47 // implementation for details on the period. Must be called after
48 // |CreateTrialsFromSeed|. 48 // |CreateTrialsFromSeed|.
49 void StartRepeatedVariationsSeedFetch(); 49 void StartRepeatedVariationsSeedFetch();
50 50
51 // Returns the variations server URL, which can vary if a command-line flag is 51 // Returns the variations server URL, which can vary if a command-line flag is
52 // set and/or the variations restrict pref is set in |local_prefs|. Declared 52 // set and/or the variations restrict pref is set in |local_prefs|. Declared
53 // static for test purposes. 53 // static for test purposes.
54 static GURL GetVariationsServerURL(PrefService* local_prefs); 54 static GURL GetVariationsServerURL(PrefService* local_prefs);
55 55
56 // Potentially triggers a FetchVariationsSeed call. This may depend on how
57 // long it has been since the previous fetch occurred.
58 void ScheduleFetch();
Alexei Svitkine (slow) 2014/02/12 16:22:47 I prefer if this is done similarly to MetricsServi
59
56 #if defined(OS_WIN) 60 #if defined(OS_WIN)
57 // Starts syncing Google Update Variation IDs with the registry. 61 // Starts syncing Google Update Variation IDs with the registry.
58 void StartGoogleUpdateRegistrySync(); 62 void StartGoogleUpdateRegistrySync();
59 #endif 63 #endif
60 64
61 // Exposed for testing. 65 // Exposed for testing.
62 void SetCreateTrialsFromSeedCalledForTesting(bool called); 66 void SetCreateTrialsFromSeedCalledForTesting(bool called);
63 67
64 // Exposed for testing. 68 // Exposed for testing.
65 static std::string GetDefaultVariationsServerURLForTesting(); 69 static std::string GetDefaultVariationsServerURLForTesting();
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 // Helper that handles synchronizing Variations with the Registry. 147 // Helper that handles synchronizing Variations with the Registry.
144 VariationsRegistrySyncer registry_syncer_; 148 VariationsRegistrySyncer registry_syncer_;
145 #endif 149 #endif
146 150
147 DISALLOW_COPY_AND_ASSIGN(VariationsService); 151 DISALLOW_COPY_AND_ASSIGN(VariationsService);
148 }; 152 };
149 153
150 } // namespace chrome_variations 154 } // namespace chrome_variations
151 155
152 #endif // CHROME_BROWSER_METRICS_VARIATIONS_VARIATIONS_SERVICE_H_ 156 #endif // CHROME_BROWSER_METRICS_VARIATIONS_VARIATIONS_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698