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

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

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 side-by-side diff with in-line comments
Download patch
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 d5f9dd112faccfcdc28614cdb9a95a6892dff71e..c5c6a7eff697e79650c0c2a19a7aee7e12cb2148 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
@@ -15,24 +15,34 @@
namespace instance_id {
class FakeGCMDriverForInstanceID : public gcm::FakeGCMDriver,
- public gcm::InstanceIDStore {
+ public gcm::InstanceIDHandler {
public:
FakeGCMDriverForInstanceID();
~FakeGCMDriverForInstanceID() override;
// FakeGCMDriver overrides:
- gcm::InstanceIDStore* GetInstanceIDStore() override;
-
- // InstanceIDStore overrides:
+ gcm::InstanceIDHandler* GetInstanceIDHandler() override;
+
+ // InstanceIDHandler overrides:
+ void GetToken(const std::string& app_id,
+ const std::string& authorized_entity,
+ const std::string& scope,
+ const std::map<std::string, std::string>& options,
+ const GetTokenCallback& callback) override;
+ void DeleteToken(const std::string& app_id,
+ const std::string& authorized_entity,
+ const std::string& scope,
+ const DeleteTokenCallback& callback) override;
void AddInstanceIDData(const std::string& app_id,
const std::string& instance_id_data) override;
void RemoveInstanceIDData(const std::string& app_id) override;
void GetInstanceIDData(
const std::string& app_id,
- const gcm::InstanceIDStore::GetInstanceIDDataCallback& callback) override;
+ const GetInstanceIDDataCallback& callback) override;
private:
std::map<std::string, std::string> instance_id_data_;
+ std::map<std::string, std::string> tokens_;
DISALLOW_COPY_AND_ASSIGN(FakeGCMDriverForInstanceID);
};

Powered by Google App Engine
This is Rietveld 408576698