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

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

Issue 1126233004: Persist Instance ID data to GCM store. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix mac 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
new file mode 100644
index 0000000000000000000000000000000000000000..d5f9dd112faccfcdc28614cdb9a95a6892dff71e
--- /dev/null
+++ b/components/gcm_driver/instance_id/fake_gcm_driver_for_instance_id.h
@@ -0,0 +1,42 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_GCM_DRIVER_INSTANCE_ID_FAKE_GCM_DRIVER__FOR_INSTANCE_ID_H_
+#define COMPONENTS_GCM_DRIVER_INSTANCE_ID_FAKE_GCM_DRIVER__FOR_INSTANCE_ID_H_
+
+#include <map>
+#include <string>
+
+#include "base/compiler_specific.h"
+#include "base/macros.h"
+#include "components/gcm_driver/fake_gcm_driver.h"
+
+namespace instance_id {
+
+class FakeGCMDriverForInstanceID : public gcm::FakeGCMDriver,
+ public gcm::InstanceIDStore {
+ public:
+ FakeGCMDriverForInstanceID();
+ ~FakeGCMDriverForInstanceID() override;
+
+ // FakeGCMDriver overrides:
+ gcm::InstanceIDStore* GetInstanceIDStore() override;
+
+ // InstanceIDStore overrides:
+ 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;
+
+ private:
+ std::map<std::string, std::string> instance_id_data_;
+
+ DISALLOW_COPY_AND_ASSIGN(FakeGCMDriverForInstanceID);
+};
+
+} // namespace instance_id
+
+#endif // COMPONENTS_GCM_DRIVER_INSTANCE_ID_FAKE_GCM_DRIVER__FOR_INSTANCE_ID_H_
« no previous file with comments | « components/gcm_driver/instance_id/BUILD.gn ('k') | components/gcm_driver/instance_id/fake_gcm_driver_for_instance_id.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698