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

Side by Side Diff: chrome/browser/services/gcm/gcm_profile_service.cc

Issue 179843002: Make invalidations work for Chrome OS Kiosk Apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #include "chrome/browser/services/gcm/gcm_profile_service.h" 5 #include "chrome/browser/services/gcm/gcm_profile_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 536 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
537 registry->RegisterListPref( 537 registry->RegisterListPref(
538 prefs::kGCMRegisteredAppIDs, 538 prefs::kGCMRegisteredAppIDs,
539 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 539 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
540 } 540 }
541 541
542 GCMProfileService::GCMProfileService(Profile* profile) 542 GCMProfileService::GCMProfileService(Profile* profile)
543 : profile_(profile), 543 : profile_(profile),
544 gcm_client_ready_(false), 544 gcm_client_ready_(false),
545 weak_ptr_factory_(this) { 545 weak_ptr_factory_(this) {
546 DCHECK(!profile->IsOffTheRecord()); 546 DCHECK(!profile || !profile->IsOffTheRecord());
jianli 2014/03/20 16:47:30 GCMProfileService depends on profile. Even you mak
Mattias Nissler (ping if slow) 2014/03/20 16:51:26 I added this just to get FakeGCMProfileService in
jianli 2014/03/20 16:56:28 Skipping the check in GCMProfileService constructo
Mattias Nissler (ping if slow) 2014/03/20 17:07:37 I'd agree if we were talking about an integration
547 } 547 }
548 548
549 GCMProfileService::~GCMProfileService() { 549 GCMProfileService::~GCMProfileService() {
550 } 550 }
551 551
552 void GCMProfileService::Initialize( 552 void GCMProfileService::Initialize(
553 scoped_ptr<GCMClientFactory> gcm_client_factory) { 553 scoped_ptr<GCMClientFactory> gcm_client_factory) {
554 registrar_.Add(this, 554 registrar_.Add(this,
555 chrome::NOTIFICATION_PROFILE_DESTROYED, 555 chrome::NOTIFICATION_PROFILE_DESTROYED,
556 content::Source<Profile>(profile_)); 556 content::Source<Profile>(profile_));
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
1217 1217
1218 request_gcm_statistics_callback_.Run(stats); 1218 request_gcm_statistics_callback_.Run(stats);
1219 } 1219 }
1220 1220
1221 // static 1221 // static
1222 const char* GCMProfileService::GetPersistentRegisterKeyForTesting() { 1222 const char* GCMProfileService::GetPersistentRegisterKeyForTesting() {
1223 return kRegistrationKey; 1223 return kRegistrationKey;
1224 } 1224 }
1225 1225
1226 } // namespace gcm 1226 } // namespace gcm
OLDNEW
« no previous file with comments | « chrome/browser/invalidation/ticl_invalidation_service_unittest.cc ('k') | chrome/browser/sync/test/integration/sync_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698