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