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

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

Issue 1851423003: Make Web Push use InstanceID tokens instead of GCM registrations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@iid4default
Patch Set: Rebase Created 4 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 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 c8e9ab7eb9c3efe6428f2c2229eeb37e3a93012e..7d31a36e4898a22bbaad64ed52defa2629e6ca2f 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
@@ -13,12 +13,18 @@
#include "base/macros.h"
#include "components/gcm_driver/fake_gcm_driver.h"
+namespace base {
+class SequencedTaskRunner;
+}
+
namespace instance_id {
class FakeGCMDriverForInstanceID : public gcm::FakeGCMDriver,
public gcm::InstanceIDHandler {
public:
FakeGCMDriverForInstanceID();
+ explicit FakeGCMDriverForInstanceID(
+ const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner);
~FakeGCMDriverForInstanceID() override;
// FakeGCMDriver overrides:
@@ -42,9 +48,19 @@ 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_;
+ }
+
private:
std::map<std::string, std::pair<std::string, std::string>> instance_id_data_;
std::map<std::string, std::string> tokens_;
+ std::string last_gettoken_app_id_;
+ std::string last_gettoken_authorized_entity_;
DISALLOW_COPY_AND_ASSIGN(FakeGCMDriverForInstanceID);
};

Powered by Google App Engine
This is Rietveld 408576698