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

Unified Diff: components/gcm_driver/instance_id/fake_gcm_driver_for_instance_id.h

Issue 2610933002: GCM: Make InstanceIDHandler implementations use protected inheritance (Closed)
Patch Set: s/implementation/overrides/ Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/gcm_driver/gcm_driver_desktop.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/gcm_driver/instance_id/fake_gcm_driver_for_instance_id.h
diff --git a/components/gcm_driver/instance_id/fake_gcm_driver_for_instance_id.h b/components/gcm_driver/instance_id/fake_gcm_driver_for_instance_id.h
index a914c89aa005c6ba35a8b115aeb491cd821738bb..5e5d038049527afa43ba836415bd5a90af273943 100644
--- a/components/gcm_driver/instance_id/fake_gcm_driver_for_instance_id.h
+++ b/components/gcm_driver/instance_id/fake_gcm_driver_for_instance_id.h
@@ -20,7 +20,7 @@ class SequencedTaskRunner;
namespace instance_id {
class FakeGCMDriverForInstanceID : public gcm::FakeGCMDriver,
- public gcm::InstanceIDHandler {
+ protected gcm::InstanceIDHandler {
public:
FakeGCMDriverForInstanceID();
explicit FakeGCMDriverForInstanceID(
@@ -30,6 +30,17 @@ class FakeGCMDriverForInstanceID : public gcm::FakeGCMDriver,
// FakeGCMDriver overrides:
gcm::InstanceIDHandler* GetInstanceIDHandlerInternal() override;
+ const std::string& last_gettoken_app_id() const {
+ return last_gettoken_app_id_;
+ }
+ const std::string& last_gettoken_authorized_entity() const {
+ return last_gettoken_authorized_entity_;
+ }
+ const std::string& last_deletetoken_app_id() const {
+ return last_deletetoken_app_id_;
+ }
+
+ protected:
// InstanceIDHandler overrides:
void GetToken(const std::string& app_id,
const std::string& authorized_entity,
@@ -48,16 +59,6 @@ class FakeGCMDriverForInstanceID : public gcm::FakeGCMDriver,
const std::string& app_id,
const GetInstanceIDDataCallback& callback) override;
- const std::string& last_gettoken_app_id() const {
- return last_gettoken_app_id_;
- }
- const std::string& last_gettoken_authorized_entity() const {
- return last_gettoken_authorized_entity_;
- }
- const std::string& last_deletetoken_app_id() const {
- return last_deletetoken_app_id_;
- }
-
private:
std::map<std::string, std::pair<std::string, std::string>> instance_id_data_;
std::map<std::string, std::string> tokens_;
« no previous file with comments | « components/gcm_driver/gcm_driver_desktop.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698