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

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

Issue 1137463003: Support getting and deleting token for Instance ID. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add new files 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 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() { 15 InstanceIDHandler::InstanceIDHandler() {
16 } 16 }
17 17
18 InstanceIDStore::~InstanceIDStore() { 18 InstanceIDHandler::~InstanceIDHandler() {
19 } 19 }
20 20
21 GCMDriver::GCMDriver() : weak_ptr_factory_(this) { 21 GCMDriver::GCMDriver() : weak_ptr_factory_(this) {
22 } 22 }
23 23
24 GCMDriver::~GCMDriver() { 24 GCMDriver::~GCMDriver() {
25 } 25 }
26 26
27 void GCMDriver::Register(const std::string& app_id, 27 void GCMDriver::Register(const std::string& app_id,
28 const std::vector<std::string>& sender_ids, 28 const std::vector<std::string>& sender_ids,
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 GCMClient::Result result) { 244 GCMClient::Result result) {
245 // Invoke the original unregister callback. 245 // Invoke the original unregister callback.
246 unregister_callback.Run(result); 246 unregister_callback.Run(result);
247 247
248 // Trigger the pending registration. 248 // Trigger the pending registration.
249 DCHECK(register_callbacks_.find(app_id) != register_callbacks_.end()); 249 DCHECK(register_callbacks_.find(app_id) != register_callbacks_.end());
250 RegisterImpl(app_id, normalized_sender_ids); 250 RegisterImpl(app_id, normalized_sender_ids);
251 } 251 }
252 252
253 } // namespace gcm 253 } // namespace gcm
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698