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

Unified Diff: chrome/browser/metrics/variations/variations_service.h

Issue 10917120: Activate the VariationsService for ChromeOS and ensure that it does not ping the server until the E… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: nikita nits Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/metrics/variations/variations_service.h
diff --git a/chrome/browser/metrics/variations/variations_service.h b/chrome/browser/metrics/variations/variations_service.h
index 3f341212ecf699343c3fa375ef22928e77eae42e..93dfcbde2a0ec7ceeaae8370559f59f4384291fa 100644
--- a/chrome/browser/metrics/variations/variations_service.h
+++ b/chrome/browser/metrics/variations/variations_service.h
@@ -20,6 +20,10 @@
#include "net/base/network_change_notifier.h"
#include "net/url_request/url_fetcher_delegate.h"
+#if defined(OS_CHROMEOS)
+#include "chrome/browser/chromeos/login/wizard_controller.h"
+#endif
+
class PrefService;
namespace chrome_variations {
@@ -28,7 +32,10 @@ namespace chrome_variations {
// new seed data from the variations server.
class VariationsService
: public net::URLFetcherDelegate,
- public net::NetworkChangeNotifier::ConnectionTypeObserver{
+#if defined(OS_CHROMEOS)
+ public chromeos::WizardController::Observer,
+#endif
+ public net::NetworkChangeNotifier::ConnectionTypeObserver {
public:
VariationsService();
virtual ~VariationsService();
@@ -52,6 +59,15 @@ class VariationsService
// Exposed for testing.
void SetWasOfflineDuringLastRequestAttemptForTesting(bool offline);
+#if defined(OS_CHROMEOS)
+ // chromeos::WizardController::Observer implementation:
+ virtual void OnScreenChanged(chromeos::WizardScreen* next_screen) OVERRIDE;
+
+ virtual void OnSessionStart() OVERRIDE;
Alexei Svitkine (slow) 2012/09/10 16:50:11 Remove empty lines between these functions.
SteveT 2012/09/10 19:33:52 Done.
+
+ virtual void OnEulaAccepted() OVERRIDE;
+#endif
+
// Register Variations related prefs in Local State.
static void RegisterPrefs(PrefService* prefs);
@@ -146,6 +162,12 @@ class VariationsService
// it gets called prior to |StartRepeatedVariationsSeedFetch|.
bool create_trials_from_seed_called_;
+#if defined(OS_CHROMEOS)
+ // Tracks whether or not the service is waiting for the user to accept the
+ // EULA before performing the next request.
+ bool waiting_for_user_to_accept_eula_;
+#endif
+
// Tracks whether or not the last seed request attempt failed due to being
// offline.
bool was_offline_during_last_request_attempt_;

Powered by Google App Engine
This is Rietveld 408576698