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

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

Issue 562423002: Clear GCM data when the user clears cookies and other site data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix ExtensionBrowsingDataTest tests 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
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 #ifndef COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_ 5 #ifndef COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_
6 #define COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_ 6 #define COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 const std::string& receiver_id, 65 const std::string& receiver_id,
66 const GCMClient::OutgoingMessage& message, 66 const GCMClient::OutgoingMessage& message,
67 const SendCallback& callback); 67 const SendCallback& callback);
68 68
69 const GCMAppHandlerMap& app_handlers() const { return app_handlers_; } 69 const GCMAppHandlerMap& app_handlers() const { return app_handlers_; }
70 70
71 // This method must be called before destroying the GCMDriver. Once it has 71 // This method must be called before destroying the GCMDriver. Once it has
72 // been called, no other GCMDriver methods may be used. 72 // been called, no other GCMDriver methods may be used.
73 virtual void Shutdown(); 73 virtual void Shutdown();
74 74
75 // Call this method when the user signs in to a GAIA account. 75 // Call this method when the user signs in to or out of a GAIA account.
76 // TODO(jianli): To be removed when sign-in enforcement is dropped. 76 // TODO(jianli): To be removed when sign-in enforcement is dropped.
fgorski 2014/09/12 20:15:53 do you need the todo?
jianli 2014/09/12 22:13:10 Removed. The original comment was not exactly righ
77 virtual void OnSignedIn() = 0; 77 virtual void OnSignedIn() = 0;
78 virtual void OnSignedOut() = 0;
78 79
79 // Removes all the cached and persisted GCM data. If the GCM service is 80 // Removes all the cached and persisted GCM data. If the GCM service is
80 // restarted after the purge, a new Android ID will be obtained. 81 // restarted after the purge, a new Android ID will be obtained.
81 virtual void Purge() = 0; 82 virtual void Purge() = 0;
82 83
83 // Adds a handler for a given app. 84 // Adds a handler for a given app.
84 virtual void AddAppHandler(const std::string& app_id, GCMAppHandler* handler); 85 virtual void AddAppHandler(const std::string& app_id, GCMAppHandler* handler);
85 86
86 // Remove the handler for a given app. 87 // Remove the handler for a given app.
87 virtual void RemoveAppHandler(const std::string& app_id); 88 virtual void RemoveAppHandler(const std::string& app_id);
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 180
180 // The default handler when no app handler can be found in the map. 181 // The default handler when no app handler can be found in the map.
181 DefaultGCMAppHandler default_app_handler_; 182 DefaultGCMAppHandler default_app_handler_;
182 183
183 DISALLOW_COPY_AND_ASSIGN(GCMDriver); 184 DISALLOW_COPY_AND_ASSIGN(GCMDriver);
184 }; 185 };
185 186
186 } // namespace gcm 187 } // namespace gcm
187 188
188 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_ 189 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698