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 #include "chrome/browser/services/gcm/gcm_client_mock.h" | 5 #include "chrome/browser/services/gcm/gcm_client_mock.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/sys_byteorder.h" | 10 #include "base/sys_byteorder.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); | 88 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); |
89 | 89 |
90 base::MessageLoop::current()->PostTask( | 90 base::MessageLoop::current()->PostTask( |
91 FROM_HERE, | 91 FROM_HERE, |
92 base::Bind(&GCMClientMock::SendFinished, | 92 base::Bind(&GCMClientMock::SendFinished, |
93 weak_ptr_factory_.GetWeakPtr(), | 93 weak_ptr_factory_.GetWeakPtr(), |
94 app_id, | 94 app_id, |
95 message)); | 95 message)); |
96 } | 96 } |
97 | 97 |
| 98 void GCMClientMock::SetRecording(bool recording) { |
| 99 } |
| 100 |
| 101 void GCMClientMock::ClearActivityLogs() { |
| 102 } |
| 103 |
98 GCMClient::GCMStatistics GCMClientMock::GetStatistics() const { | 104 GCMClient::GCMStatistics GCMClientMock::GetStatistics() const { |
99 return GCMClient::GCMStatistics(); | 105 return GCMClient::GCMStatistics(); |
100 } | 106 } |
101 | 107 |
102 void GCMClientMock::PerformDelayedLoading() { | 108 void GCMClientMock::PerformDelayedLoading() { |
103 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); | 109 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
104 | 110 |
105 content::BrowserThread::PostTask( | 111 content::BrowserThread::PostTask( |
106 content::BrowserThread::IO, | 112 content::BrowserThread::IO, |
107 FROM_HERE, | 113 FROM_HERE, |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 } | 202 } |
197 | 203 |
198 void GCMClientMock::MessageSendError( | 204 void GCMClientMock::MessageSendError( |
199 const std::string& app_id, | 205 const std::string& app_id, |
200 const GCMClient::SendErrorDetails& send_error_details) { | 206 const GCMClient::SendErrorDetails& send_error_details) { |
201 if (delegate_) | 207 if (delegate_) |
202 delegate_->OnMessageSendError(app_id, send_error_details); | 208 delegate_->OnMessageSendError(app_id, send_error_details); |
203 } | 209 } |
204 | 210 |
205 } // namespace gcm | 211 } // namespace gcm |
OLD | NEW |