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

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

Issue 582913003: Revert of Add GCMChannelStatusSyncer to schedule requests and enable/disable GCM (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « chrome/browser/services/gcm/gcm_desktop_utils.cc ('k') | components/gcm_driver.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <map> 7 #include <map>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 #else 162 #else
163 GCMProfileService::GCMProfileService( 163 GCMProfileService::GCMProfileService(
164 Profile* profile, 164 Profile* profile,
165 scoped_ptr<GCMClientFactory> gcm_client_factory) 165 scoped_ptr<GCMClientFactory> gcm_client_factory)
166 : profile_(profile), 166 : profile_(profile),
167 push_messaging_service_(this, profile) { 167 push_messaging_service_(this, profile) {
168 DCHECK(!profile->IsOffTheRecord()); 168 DCHECK(!profile->IsOffTheRecord());
169 169
170 driver_ = CreateGCMDriverDesktop( 170 driver_ = CreateGCMDriverDesktop(
171 gcm_client_factory.Pass(), 171 gcm_client_factory.Pass(),
172 profile_->GetPrefs(),
173 profile_->GetPath().Append(chrome::kGCMStoreDirname), 172 profile_->GetPath().Append(chrome::kGCMStoreDirname),
174 profile_->GetRequestContext()); 173 profile_->GetRequestContext());
175 174
176 #ifdef CHROMEOS 175 #ifdef CHROMEOS
177 chromeos_connection_observer_.reset(new gcm::ChromeOSGCMConnectionObserver); 176 chromeos_connection_observer_.reset(new gcm::ChromeOSGCMConnectionObserver);
178 driver_->AddConnectionObserver(chromeos_connection_observer_.get()); 177 driver_->AddConnectionObserver(chromeos_connection_observer_.get());
179 #endif 178 #endif
180 179
181 identity_observer_.reset(new IdentityObserver( 180 identity_observer_.reset(new IdentityObserver(
182 profile, static_cast<gcm::GCMDriverDesktop*>(driver_.get()))); 181 profile, static_cast<gcm::GCMDriverDesktop*>(driver_.get())));
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 return identity_observer_ ? identity_observer_->SignedInUserName() 230 return identity_observer_ ? identity_observer_->SignedInUserName()
232 : std::string(); 231 : std::string();
233 #endif // defined(OS_ANDROID) 232 #endif // defined(OS_ANDROID)
234 } 233 }
235 234
236 void GCMProfileService::SetDriverForTesting(GCMDriver* driver) { 235 void GCMProfileService::SetDriverForTesting(GCMDriver* driver) {
237 driver_.reset(driver); 236 driver_.reset(driver);
238 } 237 }
239 238
240 } // namespace gcm 239 } // namespace gcm
OLDNEW
« no previous file with comments | « chrome/browser/services/gcm/gcm_desktop_utils.cc ('k') | components/gcm_driver.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698