Chromium Code Reviews| Index: chrome/browser/metrics/variations_service.h |
| diff --git a/chrome/browser/metrics/variations_service.h b/chrome/browser/metrics/variations_service.h |
| index a431a6dd1498625bf167cd921b22b90428d064bb..014ba46a011d421977b3e40b6dd377bd7e55568a 100644 |
| --- a/chrome/browser/metrics/variations_service.h |
| +++ b/chrome/browser/metrics/variations_service.h |
| @@ -16,6 +16,8 @@ |
| #include "chrome/browser/metrics/proto/study.pb.h" |
| #include "chrome/browser/metrics/proto/trials_seed.pb.h" |
| #include "chrome/common/chrome_version_info.h" |
| +#include "content/public/browser/notification_observer.h" |
| +#include "content/public/browser/notification_registrar.h" |
| #include "googleurl/src/gurl.h" |
| #include "net/url_request/url_fetcher_delegate.h" |
| @@ -29,7 +31,8 @@ namespace chrome_variations { |
| // Used to setup field trials based on stored variations seed data, and fetch |
| // new seed data from the variations server. |
| -class VariationsService : public net::URLFetcherDelegate { |
| +class VariationsService : public net::URLFetcherDelegate, |
| + public content::NotificationObserver { |
| public: |
| VariationsService(); |
| virtual ~VariationsService(); |
| @@ -53,6 +56,11 @@ class VariationsService : public net::URLFetcherDelegate { |
| // Register Variations related prefs in Local State. |
| static void RegisterPrefs(PrefService* prefs); |
| + // Overridden from content::NotificationObserver: |
| + virtual void Observe(int type, |
|
Alexei Svitkine (slow)
2012/07/23 14:42:43
Does this need to be public?
SteveT
2012/07/23 15:24:31
I guess we can make this private and friend it if
Alexei Svitkine (slow)
2012/07/23 15:32:13
I think that makes sense to do. The existing tests
SteveT
2012/07/23 15:44:14
SGTM. Will add the FRIEND stuff when I add the tes
|
| + const content::NotificationSource& source, |
| + const content::NotificationDetails& details) OVERRIDE; |
| + |
| private: |
| FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, CheckStudyChannel); |
| FRIEND_TEST_ALL_PREFIXES(VariationsServiceTest, CheckStudyLocale); |
| @@ -131,6 +139,8 @@ class VariationsService : public net::URLFetcherDelegate { |
| // member so if VariationsService goes out of scope, the timer is |
| // automatically cancelled. |
| base::RepeatingTimer<VariationsService> timer_; |
| + |
| + content::NotificationRegistrar registrar_; |
|
Alexei Svitkine (slow)
2012/07/23 14:42:43
Nit: Add a comment.
SteveT
2012/07/23 15:24:31
Done.
|
| }; |
| } // namespace chrome_variations |