OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_GCM_DRIVER_INSTANCE_ID_FAKE_GCM_DRIVER__FOR_INSTANCE_ID_H_ |
| 6 #define COMPONENTS_GCM_DRIVER_INSTANCE_ID_FAKE_GCM_DRIVER__FOR_INSTANCE_ID_H_ |
| 7 |
| 8 #include <map> |
| 9 #include <string> |
| 10 |
| 11 #include "base/compiler_specific.h" |
| 12 #include "base/macros.h" |
| 13 #include "components/gcm_driver/fake_gcm_driver.h" |
| 14 |
| 15 namespace instance_id { |
| 16 |
| 17 class FakeGCMDriverForInstanceID : public gcm::FakeGCMDriver, |
| 18 public gcm::InstanceIDStore { |
| 19 public: |
| 20 FakeGCMDriverForInstanceID(); |
| 21 ~FakeGCMDriverForInstanceID() override; |
| 22 |
| 23 // FakeGCMDriver overrides: |
| 24 gcm::InstanceIDStore* GetInstanceIDStore() override; |
| 25 |
| 26 // InstanceIDStore overrides: |
| 27 void AddInstanceIDData(const std::string& app_id, |
| 28 const std::string& instance_id_data) override; |
| 29 void RemoveInstanceIDData(const std::string& app_id) override; |
| 30 void GetInstanceIDData( |
| 31 const std::string& app_id, |
| 32 const gcm::InstanceIDStore::GetInstanceIDDataCallback& callback) override; |
| 33 |
| 34 private: |
| 35 std::map<std::string, std::string> instance_id_data_; |
| 36 |
| 37 DISALLOW_COPY_AND_ASSIGN(FakeGCMDriverForInstanceID); |
| 38 }; |
| 39 |
| 40 } // namespace instance_id |
| 41 |
| 42 #endif // COMPONENTS_GCM_DRIVER_INSTANCE_ID_FAKE_GCM_DRIVER__FOR_INSTANCE_ID_H_ |
OLD | NEW |