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

Side by Side Diff: components/gcm_driver/default_gcm_app_handler.h

Issue 2473813002: Notify GCMAppHandlers when the store is reset, so they clear cached IDs (Closed)
Patch Set: Created 4 years, 1 month 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 (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #ifndef COMPONENTS_GCM_DRIVER_DEFAULT_GCM_APP_HANDLER_H_ 5 #ifndef COMPONENTS_GCM_DRIVER_DEFAULT_GCM_APP_HANDLER_H_
6 #define COMPONENTS_GCM_DRIVER_DEFAULT_GCM_APP_HANDLER_H_ 6 #define COMPONENTS_GCM_DRIVER_DEFAULT_GCM_APP_HANDLER_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "components/gcm_driver/gcm_app_handler.h" 10 #include "components/gcm_driver/gcm_app_handler.h"
11 11
12 namespace gcm { 12 namespace gcm {
13 13
14 // The default app handler that is triggered when there is no registered app 14 // The default app handler that is triggered when there is no registered app
15 // handler for an application id. 15 // handler for an application id.
16 class DefaultGCMAppHandler : public GCMAppHandler { 16 class DefaultGCMAppHandler : public GCMAppHandler {
17 public: 17 public:
18 DefaultGCMAppHandler(); 18 DefaultGCMAppHandler();
19 ~DefaultGCMAppHandler() override; 19 ~DefaultGCMAppHandler() override;
20 20
21 // Overridden from GCMAppHandler: 21 // Overridden from GCMAppHandler:
22 void ShutdownHandler() override; 22 void ShutdownHandler() override;
23 void OnStoreReset() override;
23 void OnMessage(const std::string& app_id, 24 void OnMessage(const std::string& app_id,
24 const IncomingMessage& message) override; 25 const IncomingMessage& message) override;
25 void OnMessagesDeleted(const std::string& app_id) override; 26 void OnMessagesDeleted(const std::string& app_id) override;
26 void OnSendError( 27 void OnSendError(
27 const std::string& app_id, 28 const std::string& app_id,
28 const GCMClient::SendErrorDetails& send_error_details) override; 29 const GCMClient::SendErrorDetails& send_error_details) override;
29 void OnSendAcknowledged(const std::string& app_id, 30 void OnSendAcknowledged(const std::string& app_id,
30 const std::string& message_id) override; 31 const std::string& message_id) override;
31 32
32 private: 33 private:
33 DISALLOW_COPY_AND_ASSIGN(DefaultGCMAppHandler); 34 DISALLOW_COPY_AND_ASSIGN(DefaultGCMAppHandler);
34 }; 35 };
35 36
36 } // namespace gcm 37 } // namespace gcm
37 38
38 #endif // COMPONENTS_GCM_DRIVER_DEFAULT_GCM_APP_HANDLER_H_ 39 #endif // COMPONENTS_GCM_DRIVER_DEFAULT_GCM_APP_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698