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

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

Issue 2697793004: Push API: Validate storage before returning cached subscriptions (Closed)
Patch Set: Fix include Created 3 years, 8 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/metrics/histogram_macros.h" 14 #include "base/metrics/histogram_macros.h"
15 #include "components/gcm_driver/gcm_app_handler.h" 15 #include "components/gcm_driver/gcm_app_handler.h"
16 16
17 namespace gcm { 17 namespace gcm {
18 18
19 namespace {
20
21 const size_t kMaxSenders = 100;
22
23 } // namespace
24
25 InstanceIDHandler::InstanceIDHandler() { 19 InstanceIDHandler::InstanceIDHandler() {
26 } 20 }
27 21
28 InstanceIDHandler::~InstanceIDHandler() { 22 InstanceIDHandler::~InstanceIDHandler() {
29 } 23 }
30 24
31 void InstanceIDHandler::DeleteAllTokensForApp( 25 void InstanceIDHandler::DeleteAllTokensForApp(
32 const std::string& app_id, const DeleteTokenCallback& callback) { 26 const std::string& app_id, const DeleteTokenCallback& callback) {
33 DeleteToken(app_id, "*", "*", callback); 27 DeleteToken(app_id, "*", "*", callback);
34 } 28 }
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 GCMClient::Result result) { 316 GCMClient::Result result) {
323 // Invoke the original unregister callback. 317 // Invoke the original unregister callback.
324 unregister_callback.Run(result); 318 unregister_callback.Run(result);
325 319
326 // Trigger the pending registration. 320 // Trigger the pending registration.
327 DCHECK(register_callbacks_.find(app_id) != register_callbacks_.end()); 321 DCHECK(register_callbacks_.find(app_id) != register_callbacks_.end());
328 RegisterImpl(app_id, normalized_sender_ids); 322 RegisterImpl(app_id, normalized_sender_ids);
329 } 323 }
330 324
331 } // namespace gcm 325 } // 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