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 "components/gcm_driver/gcm_driver.h" | 10 #include "components/gcm_driver/gcm_driver.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 bool IsStarted() const override; | 32 bool IsStarted() const override; |
33 bool IsConnected() const override; | 33 bool IsConnected() const override; |
34 void GetGCMStatistics(const GetGCMStatisticsCallback& callback, | 34 void GetGCMStatistics(const GetGCMStatisticsCallback& callback, |
35 bool clear_logs) override; | 35 bool clear_logs) override; |
36 void SetGCMRecording(const GetGCMStatisticsCallback& callback, | 36 void SetGCMRecording(const GetGCMStatisticsCallback& callback, |
37 bool recording) override; | 37 bool recording) override; |
38 void SetAccountTokens( | 38 void SetAccountTokens( |
39 const std::vector<GCMClient::AccountTokenInfo>& account_tokens) override; | 39 const std::vector<GCMClient::AccountTokenInfo>& account_tokens) override; |
40 void UpdateAccountMapping(const AccountMapping& account_mapping) override; | 40 void UpdateAccountMapping(const AccountMapping& account_mapping) override; |
41 void RemoveAccountMapping(const std::string& account_id) override; | 41 void RemoveAccountMapping(const std::string& account_id) override; |
| 42 base::Time GetLastTokenFetchTime() override; |
| 43 void SetLastTokenFetchTime(const base::Time& time) override; |
42 | 44 |
43 protected: | 45 protected: |
44 // GCMDriver implementation: | 46 // GCMDriver implementation: |
45 GCMClient::Result EnsureStarted() override; | 47 GCMClient::Result EnsureStarted() override; |
46 void RegisterImpl(const std::string& app_id, | 48 void RegisterImpl(const std::string& app_id, |
47 const std::vector<std::string>& sender_ids) override; | 49 const std::vector<std::string>& sender_ids) override; |
48 void UnregisterImpl(const std::string& app_id) override; | 50 void UnregisterImpl(const std::string& app_id) override; |
49 void SendImpl(const std::string& app_id, | 51 void SendImpl(const std::string& app_id, |
50 const std::string& receiver_id, | 52 const std::string& receiver_id, |
51 const GCMClient::OutgoingMessage& message) override; | 53 const GCMClient::OutgoingMessage& message) override; |
52 | 54 |
53 private: | 55 private: |
54 DISALLOW_COPY_AND_ASSIGN(FakeGCMDriver); | 56 DISALLOW_COPY_AND_ASSIGN(FakeGCMDriver); |
55 }; | 57 }; |
56 | 58 |
57 } // namespace gcm | 59 } // namespace gcm |
58 | 60 |
59 #endif // COMPONENTS_GCM_DRIVER_FAKE_GCM_DRIVER_H_ | 61 #endif // COMPONENTS_GCM_DRIVER_FAKE_GCM_DRIVER_H_ |
OLD | NEW |