OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
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_ | |
7 | |
8 #include <memory> | |
9 | |
10 #include "base/macros.h" | |
11 #include "components/keyed_service/core/keyed_service.h" | |
12 | |
13 class Profile; | |
14 | |
15 namespace instance_id { | |
16 | |
17 class InstanceIDDriver; | |
18 | |
19 // Providing Instance ID support, via InstanceIDDriver, to a profile. | |
20 class InstanceIDProfileService : public KeyedService { | |
21 public: | |
22 // Returns whether InstanceID is enabled for |profile|. | |
23 static bool IsInstanceIDEnabled(Profile* profile); | |
24 | |
25 explicit InstanceIDProfileService(Profile* profile); | |
26 ~InstanceIDProfileService() override; | |
27 | |
28 InstanceIDDriver* driver() const { return driver_.get(); } | |
29 | |
30 private: | |
31 std::unique_ptr<InstanceIDDriver> driver_; | |
32 | |
33 DISALLOW_COPY_AND_ASSIGN(InstanceIDProfileService); | |
34 }; | |
35 | |
36 } // namespace instance_id | |
37 | |
38 #endif // CHROME_BROWSER_SERVICES_GCM_INSTANCE_ID_INSTANCE_ID_PROFILE_SERVICE_H
_ | |
OLD | NEW |