OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_GCM_DRIVER_FAKE_GCM_DRIVER_H_ | 5 #ifndef COMPONENTS_GCM_DRIVER_FAKE_GCM_DRIVER_H_ |
6 #define COMPONENTS_GCM_DRIVER_FAKE_GCM_DRIVER_H_ | 6 #define COMPONENTS_GCM_DRIVER_FAKE_GCM_DRIVER_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "components/gcm_driver/gcm_driver.h" | 11 #include "components/gcm_driver/gcm_driver.h" |
12 | 12 |
13 namespace base { | 13 namespace base { |
14 class SequencedTaskRunner; | 14 class SequencedTaskRunner; |
15 } | 15 } |
16 | 16 |
17 namespace gcm { | 17 namespace gcm { |
18 | 18 |
19 class FakeGCMDriver : public GCMDriver { | 19 class FakeGCMDriver : public GCMDriver { |
20 public: | 20 public: |
21 FakeGCMDriver(); | 21 FakeGCMDriver(); |
22 explicit FakeGCMDriver( | 22 explicit FakeGCMDriver( |
23 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner); | 23 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner); |
24 | 24 |
25 ~FakeGCMDriver() override; | 25 ~FakeGCMDriver() override; |
26 | 26 |
27 // GCMDriver overrides: | 27 // GCMDriver overrides: |
| 28 void ValidateRegistration( |
| 29 const std::string& app_id, |
| 30 const std::vector<std::string>& sender_ids, |
| 31 const std::string& registration_id, |
| 32 const ValidateRegistrationCallback& callback) override; |
28 void OnSignedIn() override; | 33 void OnSignedIn() override; |
29 void OnSignedOut() override; | 34 void OnSignedOut() override; |
30 void AddConnectionObserver(GCMConnectionObserver* observer) override; | 35 void AddConnectionObserver(GCMConnectionObserver* observer) override; |
31 void RemoveConnectionObserver(GCMConnectionObserver* observer) override; | 36 void RemoveConnectionObserver(GCMConnectionObserver* observer) override; |
32 void Enable() override; | 37 void Enable() override; |
33 void Disable() override; | 38 void Disable() override; |
34 GCMClient* GetGCMClientForTesting() const override; | 39 GCMClient* GetGCMClientForTesting() const override; |
35 bool IsStarted() const override; | 40 bool IsStarted() const override; |
36 bool IsConnected() const override; | 41 bool IsConnected() const override; |
37 void GetGCMStatistics(const GetGCMStatisticsCallback& callback, | 42 void GetGCMStatistics(const GetGCMStatisticsCallback& callback, |
(...skipping 25 matching lines...) Expand all Loading... |
63 GCMEncryptionProvider::DecryptionResult result) | 68 GCMEncryptionProvider::DecryptionResult result) |
64 override; | 69 override; |
65 | 70 |
66 private: | 71 private: |
67 DISALLOW_COPY_AND_ASSIGN(FakeGCMDriver); | 72 DISALLOW_COPY_AND_ASSIGN(FakeGCMDriver); |
68 }; | 73 }; |
69 | 74 |
70 } // namespace gcm | 75 } // namespace gcm |
71 | 76 |
72 #endif // COMPONENTS_GCM_DRIVER_FAKE_GCM_DRIVER_H_ | 77 #endif // COMPONENTS_GCM_DRIVER_FAKE_GCM_DRIVER_H_ |
OLD | NEW |