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

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

Issue 2657823005: Move //c/b/services/gcm/ to //c/b/gcm/ (Closed)
Patch Set: Created 3 years, 10 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
(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 #include "chrome/browser/services/gcm/instance_id/instance_id_profile_service.h"
6
7 #include "base/logging.h"
8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h"
10 #include "components/gcm_driver/gcm_profile_service.h"
11 #include "components/gcm_driver/instance_id/instance_id_driver.h"
12
13 namespace instance_id {
14
15 // static
16 bool InstanceIDProfileService::IsInstanceIDEnabled(Profile* profile) {
17 // Instance ID depends on GCM which has to been enabled.
18 if (!gcm::GCMProfileService::IsGCMEnabled(profile->GetPrefs()))
19 return false;
20
21 return InstanceIDDriver::IsInstanceIDEnabled();
22 }
23
24 InstanceIDProfileService::InstanceIDProfileService(Profile* profile) {
25 DCHECK(!profile->IsOffTheRecord());
26
27 driver_.reset(new InstanceIDDriver(
28 gcm::GCMProfileServiceFactory::GetForProfile(profile)->driver()));
29 }
30
31 InstanceIDProfileService::~InstanceIDProfileService() {
32 }
33
34 } // namespace instance_id
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698