OLD | NEW |
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_PROFILE_INVALIDATION_PROVIDER_H_ | 5 #ifndef COMPONENTS_INVALIDATION_PROFILE_INVALIDATION_PROVIDER_H_ |
6 #define COMPONENTS_INVALIDATION_PROFILE_INVALIDATION_PROVIDER_H_ | 6 #define COMPONENTS_INVALIDATION_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 invalidation { | 13 namespace invalidation { |
14 | 14 |
15 class InvalidationService; | 15 class InvalidationService; |
16 | 16 |
17 // A KeyedService that owns an InvalidationService. | 17 // A KeyedService that owns an InvalidationService. |
18 class ProfileInvalidationProvider : public KeyedService { | 18 class ProfileInvalidationProvider : public KeyedService { |
19 public: | 19 public: |
20 explicit ProfileInvalidationProvider( | 20 explicit ProfileInvalidationProvider( |
21 scoped_ptr<InvalidationService> invalidation_service); | 21 scoped_ptr<InvalidationService> invalidation_service); |
22 virtual ~ProfileInvalidationProvider(); | 22 virtual ~ProfileInvalidationProvider(); |
23 | 23 |
24 InvalidationService* GetInvalidationService(); | 24 InvalidationService* GetInvalidationService(); |
25 | 25 |
26 // KeyedService: | 26 // KeyedService: |
27 virtual void Shutdown() OVERRIDE; | 27 virtual void Shutdown() override; |
28 | 28 |
29 private: | 29 private: |
30 scoped_ptr<InvalidationService> invalidation_service_; | 30 scoped_ptr<InvalidationService> invalidation_service_; |
31 | 31 |
32 DISALLOW_COPY_AND_ASSIGN(ProfileInvalidationProvider); | 32 DISALLOW_COPY_AND_ASSIGN(ProfileInvalidationProvider); |
33 }; | 33 }; |
34 | 34 |
35 } // namespace invalidation | 35 } // namespace invalidation |
36 | 36 |
37 #endif // COMPONENTS_INVALIDATION_PROFILE_INVALIDATION_PROVIDER_H_ | 37 #endif // COMPONENTS_INVALIDATION_PROFILE_INVALIDATION_PROVIDER_H_ |
OLD | NEW |