OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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_SERVICES_GCM_INSTANCE_ID_INSTANCE_ID_PROFILE_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SERVICES_GCM_INSTANCE_ID_INSTANCE_ID_PROFILE_SERVICE_H_ |
6 #define CHROME_BROWSER_SERVICES_GCM_INSTANCE_ID_INSTANCE_ID_PROFILE_SERVICE_H_ | 6 #define CHROME_BROWSER_SERVICES_GCM_INSTANCE_ID_INSTANCE_ID_PROFILE_SERVICE_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "components/keyed_service/core/keyed_service.h" | 10 #include "components/keyed_service/core/keyed_service.h" |
11 | 11 |
12 class Profile; | 12 class Profile; |
13 | 13 |
14 namespace instance_id { | 14 namespace instance_id { |
15 | 15 |
16 class InstanceIDDriver; | 16 class InstanceIDDriver; |
17 | 17 |
18 // Providing Instance ID support, via InstanceIDDriver, to a profile. | 18 // Providing Instance ID support, via InstanceIDDriver, to a profile. |
19 class InstanceIDProfileService : public KeyedService { | 19 class InstanceIDProfileService : public KeyedService { |
20 public: | 20 public: |
| 21 // Returns whether InstanceID is enabled for |profile|. |
| 22 static bool IsInstanceIDEnabled(Profile* profile); |
| 23 |
21 explicit InstanceIDProfileService(Profile* profile); | 24 explicit InstanceIDProfileService(Profile* profile); |
22 ~InstanceIDProfileService() override; | 25 ~InstanceIDProfileService() override; |
23 | 26 |
| 27 InstanceIDDriver* driver() const { return driver_.get(); } |
| 28 |
24 private: | 29 private: |
25 scoped_ptr<InstanceIDDriver> driver_; | 30 scoped_ptr<InstanceIDDriver> driver_; |
26 | 31 |
27 DISALLOW_COPY_AND_ASSIGN(InstanceIDProfileService); | 32 DISALLOW_COPY_AND_ASSIGN(InstanceIDProfileService); |
28 }; | 33 }; |
29 | 34 |
30 } // namespace instance_id | 35 } // namespace instance_id |
31 | 36 |
32 #endif // CHROME_BROWSER_SERVICES_GCM_INSTANCE_ID_INSTANCE_ID_PROFILE_SERVICE_H
_ | 37 #endif // CHROME_BROWSER_SERVICES_GCM_INSTANCE_ID_INSTANCE_ID_PROFILE_SERVICE_H
_ |
OLD | NEW |