OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CHROME_BROWSER_SERVICES_GCM_GCM_CLIENT_MOCK_H_ | 5 #ifndef CHROME_BROWSER_SERVICES_GCM_GCM_CLIENT_MOCK_H_ |
6 #define CHROME_BROWSER_SERVICES_GCM_GCM_CLIENT_MOCK_H_ | 6 #define CHROME_BROWSER_SERVICES_GCM_GCM_CLIENT_MOCK_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "google_apis/gcm/gcm_client.h" | 10 #include "google_apis/gcm/gcm_client.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 Delegate* delegate) OVERRIDE; | 41 Delegate* delegate) OVERRIDE; |
42 virtual void Load() OVERRIDE; | 42 virtual void Load() OVERRIDE; |
43 virtual void Stop() OVERRIDE; | 43 virtual void Stop() OVERRIDE; |
44 virtual void CheckOut() OVERRIDE; | 44 virtual void CheckOut() OVERRIDE; |
45 virtual void Register(const std::string& app_id, | 45 virtual void Register(const std::string& app_id, |
46 const std::vector<std::string>& sender_ids) OVERRIDE; | 46 const std::vector<std::string>& sender_ids) OVERRIDE; |
47 virtual void Unregister(const std::string& app_id) OVERRIDE; | 47 virtual void Unregister(const std::string& app_id) OVERRIDE; |
48 virtual void Send(const std::string& app_id, | 48 virtual void Send(const std::string& app_id, |
49 const std::string& receiver_id, | 49 const std::string& receiver_id, |
50 const OutgoingMessage& message) OVERRIDE; | 50 const OutgoingMessage& message) OVERRIDE; |
51 virtual void SetRecording(bool recording) OVERRIDE; | |
52 virtual void ClearActivityLogs() OVERRIDE; | |
53 virtual GCMStatistics GetStatistics() const OVERRIDE; | 51 virtual GCMStatistics GetStatistics() const OVERRIDE; |
54 | 52 |
55 // Initiate the loading that has been delayed. | 53 // Initiate the loading that has been delayed. |
56 // Called on UI thread. | 54 // Called on UI thread. |
57 void PerformDelayedLoading(); | 55 void PerformDelayedLoading(); |
58 | 56 |
59 // Simulate receiving something from the server. | 57 // Simulate receiving something from the server. |
60 // Called on UI thread. | 58 // Called on UI thread. |
61 void ReceiveMessage(const std::string& app_id, | 59 void ReceiveMessage(const std::string& app_id, |
62 const IncomingMessage& message); | 60 const IncomingMessage& message); |
(...skipping 22 matching lines...) Expand all Loading... |
85 Status status_; | 83 Status status_; |
86 LoadingDelay loading_delay_; | 84 LoadingDelay loading_delay_; |
87 base::WeakPtrFactory<GCMClientMock> weak_ptr_factory_; | 85 base::WeakPtrFactory<GCMClientMock> weak_ptr_factory_; |
88 | 86 |
89 DISALLOW_COPY_AND_ASSIGN(GCMClientMock); | 87 DISALLOW_COPY_AND_ASSIGN(GCMClientMock); |
90 }; | 88 }; |
91 | 89 |
92 } // namespace gcm | 90 } // namespace gcm |
93 | 91 |
94 #endif // CHROME_BROWSER_SERVICES_GCM_GCM_CLIENT_MOCK_H_ | 92 #endif // CHROME_BROWSER_SERVICES_GCM_GCM_CLIENT_MOCK_H_ |
OLD | NEW |