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

Side by Side Diff: components/gcm_driver/gcm_driver.cc

Issue 1126233004: Persist Instance ID data to GCM store. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix mac 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
« no previous file with comments | « components/gcm_driver/gcm_driver.h ('k') | components/gcm_driver/gcm_driver_android.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/gcm_driver/gcm_driver.h" 5 #include "components/gcm_driver/gcm_driver.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "components/gcm_driver/gcm_app_handler.h" 11 #include "components/gcm_driver/gcm_app_handler.h"
12 12
13 namespace gcm { 13 namespace gcm {
14 14
15 InstanceIDStore::InstanceIDStore() {
16 }
17
18 InstanceIDStore::~InstanceIDStore() {
19 }
20
15 GCMDriver::GCMDriver() : weak_ptr_factory_(this) { 21 GCMDriver::GCMDriver() : weak_ptr_factory_(this) {
16 } 22 }
17 23
18 GCMDriver::~GCMDriver() { 24 GCMDriver::~GCMDriver() {
19 } 25 }
20 26
21 void GCMDriver::Register(const std::string& app_id, 27 void GCMDriver::Register(const std::string& app_id,
22 const std::vector<std::string>& sender_ids, 28 const std::vector<std::string>& sender_ids,
23 const RegisterCallback& callback) { 29 const RegisterCallback& callback) {
24 DCHECK(!app_id.empty()); 30 DCHECK(!app_id.empty());
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 GCMClient::Result result) { 244 GCMClient::Result result) {
239 // Invoke the original unregister callback. 245 // Invoke the original unregister callback.
240 unregister_callback.Run(result); 246 unregister_callback.Run(result);
241 247
242 // Trigger the pending registration. 248 // Trigger the pending registration.
243 DCHECK(register_callbacks_.find(app_id) != register_callbacks_.end()); 249 DCHECK(register_callbacks_.find(app_id) != register_callbacks_.end());
244 RegisterImpl(app_id, normalized_sender_ids); 250 RegisterImpl(app_id, normalized_sender_ids);
245 } 251 }
246 252
247 } // namespace gcm 253 } // namespace gcm
OLDNEW
« no previous file with comments | « components/gcm_driver/gcm_driver.h ('k') | components/gcm_driver/gcm_driver_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698