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

Side by Side Diff: chrome/browser/services/gcm/instance_id/instance_id_profile_service.h

Issue 1128123003: Implement InstanceID API functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test Created 5 years, 7 months 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 (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 _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698