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 "google_apis/gcm/gcm_client.h" | 9 #include "google_apis/gcm/gcm_client.h" |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... |
25 // |status| denotes if the fake client is ready or not at the beginning. | 25 // |status| denotes if the fake client is ready or not at the beginning. |
26 // |error_simulation| denotes if we should simulate server error. | 26 // |error_simulation| denotes if we should simulate server error. |
27 GCMClientMock(Status status, ErrorSimulation error_simulation); | 27 GCMClientMock(Status status, ErrorSimulation error_simulation); |
28 virtual ~GCMClientMock(); | 28 virtual ~GCMClientMock(); |
29 | 29 |
30 // Overridden from GCMClient: | 30 // Overridden from GCMClient: |
31 // Called on IO thread. | 31 // Called on IO thread. |
32 virtual void Initialize( | 32 virtual void Initialize( |
33 const checkin_proto::ChromeBuildProto& chrome_build_proto, | 33 const checkin_proto::ChromeBuildProto& chrome_build_proto, |
34 const base::FilePath& store_path, | 34 const base::FilePath& store_path, |
| 35 const std::vector<std::string>& account_ids, |
35 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner, | 36 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner, |
36 const scoped_refptr<net::URLRequestContextGetter>& | 37 const scoped_refptr<net::URLRequestContextGetter>& |
37 url_request_context_getter, | 38 url_request_context_getter, |
38 Delegate* delegate) OVERRIDE; | 39 Delegate* delegate) OVERRIDE; |
39 virtual void CheckOut() OVERRIDE; | 40 virtual void CheckOut() OVERRIDE; |
40 virtual void Register(const std::string& app_id, | 41 virtual void Register(const std::string& app_id, |
41 const std::string& cert, | 42 const std::string& cert, |
42 const std::vector<std::string>& sender_ids) OVERRIDE; | 43 const std::vector<std::string>& sender_ids) OVERRIDE; |
43 virtual void Unregister(const std::string& app_id) OVERRIDE; | 44 virtual void Unregister(const std::string& app_id) OVERRIDE; |
44 virtual void Send(const std::string& app_id, | 45 virtual void Send(const std::string& app_id, |
(...skipping 28 matching lines...) Expand all Loading... |
73 Delegate* delegate_; | 74 Delegate* delegate_; |
74 Status status_; | 75 Status status_; |
75 ErrorSimulation error_simulation_; | 76 ErrorSimulation error_simulation_; |
76 | 77 |
77 DISALLOW_COPY_AND_ASSIGN(GCMClientMock); | 78 DISALLOW_COPY_AND_ASSIGN(GCMClientMock); |
78 }; | 79 }; |
79 | 80 |
80 } // namespace gcm | 81 } // namespace gcm |
81 | 82 |
82 #endif // CHROME_BROWSER_SERVICES_GCM_GCM_CLIENT_MOCK_H_ | 83 #endif // CHROME_BROWSER_SERVICES_GCM_GCM_CLIENT_MOCK_H_ |
OLD | NEW |