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

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: Alexei comments1 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 // Called when the application enters foreground. This may trigger a
57 // FetchVariationsSeed call.
58 // TODO(rkaplow): Handle this and the similar event in metrics_service by
59 // observing an 'OnAppEnterForeground' event instead of requiring the frontend
60 // code to notify each service individually.
61 void OnAppEnterForeground();
62
56 #if defined(OS_WIN) 63 #if defined(OS_WIN)
57 // Starts syncing Google Update Variation IDs with the registry. 64 // Starts syncing Google Update Variation IDs with the registry.
58 void StartGoogleUpdateRegistrySync(); 65 void StartGoogleUpdateRegistrySync();
59 #endif 66 #endif
60 67
61 // Exposed for testing. 68 // Exposed for testing.
62 void SetCreateTrialsFromSeedCalledForTesting(bool called); 69 void SetCreateTrialsFromSeedCalledForTesting(bool called);
63 70
64 // Exposed for testing. 71 // Exposed for testing.
65 static std::string GetDefaultVariationsServerURLForTesting(); 72 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. 150 // Helper that handles synchronizing Variations with the Registry.
144 VariationsRegistrySyncer registry_syncer_; 151 VariationsRegistrySyncer registry_syncer_;
145 #endif 152 #endif
146 153
147 DISALLOW_COPY_AND_ASSIGN(VariationsService); 154 DISALLOW_COPY_AND_ASSIGN(VariationsService);
148 }; 155 };
149 156
150 } // namespace chrome_variations 157 } // namespace chrome_variations
151 158
152 #endif // CHROME_BROWSER_METRICS_VARIATIONS_VARIATIONS_SERVICE_H_ 159 #endif // CHROME_BROWSER_METRICS_VARIATIONS_VARIATIONS_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698