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

Side by Side Diff: components/invalidation/impl/profile_invalidation_provider.h

Issue 1418573005: [invalidation] Componentize TiclProfileSettingsProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Maintain pref registration on Android Created 5 years, 1 month 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_INVALIDATION_IMPL_PROFILE_INVALIDATION_PROVIDER_H_ 5 #ifndef COMPONENTS_INVALIDATION_IMPL_PROFILE_INVALIDATION_PROVIDER_H_
6 #define COMPONENTS_INVALIDATION_IMPL_PROFILE_INVALIDATION_PROVIDER_H_ 6 #define COMPONENTS_INVALIDATION_IMPL_PROFILE_INVALIDATION_PROVIDER_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "components/keyed_service/core/keyed_service.h" 11 #include "components/keyed_service/core/keyed_service.h"
12 12
13 namespace user_prefs {
14 class PrefRegistrySyncable;
15 }
16
13 namespace invalidation { 17 namespace invalidation {
14 18
15 class InvalidationService; 19 class InvalidationService;
16 20
17 // A KeyedService that owns an InvalidationService. 21 // A KeyedService that owns an InvalidationService.
18 class ProfileInvalidationProvider : public KeyedService { 22 class ProfileInvalidationProvider : public KeyedService {
19 public: 23 public:
20 explicit ProfileInvalidationProvider( 24 explicit ProfileInvalidationProvider(
21 scoped_ptr<InvalidationService> invalidation_service); 25 scoped_ptr<InvalidationService> invalidation_service);
22 ~ProfileInvalidationProvider() override; 26 ~ProfileInvalidationProvider() override;
23 27
24 InvalidationService* GetInvalidationService(); 28 InvalidationService* GetInvalidationService();
25 29
26 // KeyedService: 30 // KeyedService:
27 void Shutdown() override; 31 void Shutdown() override;
28 32
33 // Register prefs to be used by per-Profile instances of this class which
34 // store invalidation state in Profile prefs.
35 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
36
29 private: 37 private:
30 scoped_ptr<InvalidationService> invalidation_service_; 38 scoped_ptr<InvalidationService> invalidation_service_;
31 39
32 DISALLOW_COPY_AND_ASSIGN(ProfileInvalidationProvider); 40 DISALLOW_COPY_AND_ASSIGN(ProfileInvalidationProvider);
33 }; 41 };
34 42
35 } // namespace invalidation 43 } // namespace invalidation
36 44
37 #endif // COMPONENTS_INVALIDATION_IMPL_PROFILE_INVALIDATION_PROVIDER_H_ 45 #endif // COMPONENTS_INVALIDATION_IMPL_PROFILE_INVALIDATION_PROVIDER_H_
OLDNEW
« no previous file with comments | « components/invalidation/impl/invalidation_switches.cc ('k') | components/invalidation/impl/profile_invalidation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698