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 #include "components/gcm_driver/fake_gcm_client.h" | 5 #include "components/gcm_driver/fake_gcm_client.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/sequenced_task_runner.h" | 10 #include "base/sequenced_task_runner.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 void FakeGCMClient::SetRecording(bool recording) { | 108 void FakeGCMClient::SetRecording(bool recording) { |
109 } | 109 } |
110 | 110 |
111 void FakeGCMClient::ClearActivityLogs() { | 111 void FakeGCMClient::ClearActivityLogs() { |
112 } | 112 } |
113 | 113 |
114 GCMClient::GCMStatistics FakeGCMClient::GetStatistics() const { | 114 GCMClient::GCMStatistics FakeGCMClient::GetStatistics() const { |
115 return GCMClient::GCMStatistics(); | 115 return GCMClient::GCMStatistics(); |
116 } | 116 } |
117 | 117 |
| 118 void FakeGCMClient::SetAccountsForCheckin( |
| 119 const std::map<std::string, std::string>& account_tokens) { |
| 120 } |
| 121 |
118 void FakeGCMClient::PerformDelayedLoading() { | 122 void FakeGCMClient::PerformDelayedLoading() { |
119 DCHECK(ui_thread_->RunsTasksOnCurrentThread()); | 123 DCHECK(ui_thread_->RunsTasksOnCurrentThread()); |
120 | 124 |
121 io_thread_->PostTask( | 125 io_thread_->PostTask( |
122 FROM_HERE, | 126 FROM_HERE, |
123 base::Bind(&FakeGCMClient::DoLoading, weak_ptr_factory_.GetWeakPtr())); | 127 base::Bind(&FakeGCMClient::DoLoading, weak_ptr_factory_.GetWeakPtr())); |
124 } | 128 } |
125 | 129 |
126 void FakeGCMClient::ReceiveMessage(const std::string& app_id, | 130 void FakeGCMClient::ReceiveMessage(const std::string& app_id, |
127 const IncomingMessage& message) { | 131 const IncomingMessage& message) { |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 } | 218 } |
215 | 219 |
216 void FakeGCMClient::MessageSendError( | 220 void FakeGCMClient::MessageSendError( |
217 const std::string& app_id, | 221 const std::string& app_id, |
218 const GCMClient::SendErrorDetails& send_error_details) { | 222 const GCMClient::SendErrorDetails& send_error_details) { |
219 if (delegate_) | 223 if (delegate_) |
220 delegate_->OnMessageSendError(app_id, send_error_details); | 224 delegate_->OnMessageSendError(app_id, send_error_details); |
221 } | 225 } |
222 | 226 |
223 } // namespace gcm | 227 } // namespace gcm |
OLD | NEW |