| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/location.h" | 6 #include "base/location.h" |
| 7 #include "base/single_thread_task_runner.h" | 7 #include "base/single_thread_task_runner.h" |
| 8 #include "base/thread_task_runner_handle.h" | 8 #include "base/thread_task_runner_handle.h" |
| 9 #include "components/gcm_driver/gcm_driver.h" | 9 #include "components/gcm_driver/gcm_driver.h" |
| 10 #include "components/invalidation/gcm_invalidation_bridge.h" | 10 #include "components/invalidation/gcm_invalidation_bridge.h" |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 // callback so this should be no-op in desktop version as well. | 325 // callback so this should be no-op in desktop version as well. |
| 326 } | 326 } |
| 327 | 327 |
| 328 void GCMInvalidationBridge::OnSendError( | 328 void GCMInvalidationBridge::OnSendError( |
| 329 const std::string& app_id, | 329 const std::string& app_id, |
| 330 const gcm::GCMClient::SendErrorDetails& send_error_details) { | 330 const gcm::GCMClient::SendErrorDetails& send_error_details) { |
| 331 // cacheinvalidation doesn't send messages over GCM. | 331 // cacheinvalidation doesn't send messages over GCM. |
| 332 NOTREACHED(); | 332 NOTREACHED(); |
| 333 } | 333 } |
| 334 | 334 |
| 335 void GCMInvalidationBridge::OnSendAcknowledged( |
| 336 const std::string& app_id, |
| 337 const std::string& message_id) { |
| 338 // cacheinvalidation doesn't send messages over GCM. |
| 339 NOTREACHED(); |
| 340 } |
| 341 |
| 335 void GCMInvalidationBridge::OnConnected(const net::IPEndPoint& ip_endpoint) { | 342 void GCMInvalidationBridge::OnConnected(const net::IPEndPoint& ip_endpoint) { |
| 336 core_thread_task_runner_->PostTask( | 343 core_thread_task_runner_->PostTask( |
| 337 FROM_HERE, | 344 FROM_HERE, |
| 338 base::Bind( | 345 base::Bind( |
| 339 &GCMInvalidationBridge::Core::OnConnectionStateChanged, core_, true)); | 346 &GCMInvalidationBridge::Core::OnConnectionStateChanged, core_, true)); |
| 340 } | 347 } |
| 341 | 348 |
| 342 void GCMInvalidationBridge::OnDisconnected() { | 349 void GCMInvalidationBridge::OnDisconnected() { |
| 343 core_thread_task_runner_->PostTask( | 350 core_thread_task_runner_->PostTask( |
| 344 FROM_HERE, | 351 FROM_HERE, |
| 345 base::Bind(&GCMInvalidationBridge::Core::OnConnectionStateChanged, | 352 base::Bind(&GCMInvalidationBridge::Core::OnConnectionStateChanged, |
| 346 core_, | 353 core_, |
| 347 false)); | 354 false)); |
| 348 } | 355 } |
| 349 | 356 |
| 350 | 357 |
| 351 } // namespace invalidation | 358 } // namespace invalidation |
| OLD | NEW |