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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); | 95 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); |
96 | 96 |
97 base::MessageLoop::current()->PostTask( | 97 base::MessageLoop::current()->PostTask( |
98 FROM_HERE, | 98 FROM_HERE, |
99 base::Bind(&GCMClientMock::SendFinished, | 99 base::Bind(&GCMClientMock::SendFinished, |
100 weak_ptr_factory_.GetWeakPtr(), | 100 weak_ptr_factory_.GetWeakPtr(), |
101 app_id, | 101 app_id, |
102 message)); | 102 message)); |
103 } | 103 } |
104 | 104 |
| 105 void GCMClientMock::SetRecording(bool recording) { |
| 106 } |
| 107 |
| 108 void GCMClientMock::ClearActivityLogs() { |
| 109 } |
| 110 |
105 GCMClient::GCMStatistics GCMClientMock::GetStatistics() const { | 111 GCMClient::GCMStatistics GCMClientMock::GetStatistics() const { |
106 return GCMClient::GCMStatistics(); | 112 return GCMClient::GCMStatistics(); |
107 } | 113 } |
108 | 114 |
109 void GCMClientMock::PerformDelayedLoading() { | 115 void GCMClientMock::PerformDelayedLoading() { |
110 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); | 116 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
111 | 117 |
112 content::BrowserThread::PostTask( | 118 content::BrowserThread::PostTask( |
113 content::BrowserThread::IO, | 119 content::BrowserThread::IO, |
114 FROM_HERE, | 120 FROM_HERE, |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 } | 213 } |
208 | 214 |
209 void GCMClientMock::MessageSendError( | 215 void GCMClientMock::MessageSendError( |
210 const std::string& app_id, | 216 const std::string& app_id, |
211 const GCMClient::SendErrorDetails& send_error_details) { | 217 const GCMClient::SendErrorDetails& send_error_details) { |
212 if (delegate_) | 218 if (delegate_) |
213 delegate_->OnMessageSendError(app_id, send_error_details); | 219 delegate_->OnMessageSendError(app_id, send_error_details); |
214 } | 220 } |
215 | 221 |
216 } // namespace gcm | 222 } // namespace gcm |
OLD | NEW |