| 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_driver.h" | 5 #include "components/gcm_driver/fake_gcm_driver.h" |
| 6 | 6 |
| 7 #include "base/bind.h" |
| 7 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 8 #include "base/sequenced_task_runner.h" | 9 #include "base/sequenced_task_runner.h" |
| 10 #include "base/threading/thread_task_runner_handle.h" |
| 9 | 11 |
| 10 namespace gcm { | 12 namespace gcm { |
| 11 | 13 |
| 12 FakeGCMDriver::FakeGCMDriver() : GCMDriver(base::FilePath(), nullptr) { | 14 FakeGCMDriver::FakeGCMDriver() : GCMDriver(base::FilePath(), nullptr) { |
| 13 } | 15 } |
| 14 | 16 |
| 15 FakeGCMDriver::FakeGCMDriver( | 17 FakeGCMDriver::FakeGCMDriver( |
| 16 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner) | 18 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner) |
| 17 : GCMDriver(base::FilePath(), blocking_task_runner) { | 19 : GCMDriver(base::FilePath(), blocking_task_runner) { |
| 18 } | 20 } |
| 19 | 21 |
| 20 FakeGCMDriver::~FakeGCMDriver() { | 22 FakeGCMDriver::~FakeGCMDriver() { |
| 21 } | 23 } |
| 22 | 24 |
| 25 void FakeGCMDriver::ValidateRegistration( |
| 26 const std::string& app_id, |
| 27 const std::vector<std::string>& sender_ids, |
| 28 const std::string& registration_id, |
| 29 const ValidateRegistrationCallback& callback) { |
| 30 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 31 FROM_HERE, base::Bind(callback, true /* is_valid */)); |
| 32 } |
| 33 |
| 23 void FakeGCMDriver::OnSignedIn() { | 34 void FakeGCMDriver::OnSignedIn() { |
| 24 } | 35 } |
| 25 | 36 |
| 26 void FakeGCMDriver::OnSignedOut() { | 37 void FakeGCMDriver::OnSignedOut() { |
| 27 } | 38 } |
| 28 | 39 |
| 29 void FakeGCMDriver::AddConnectionObserver(GCMConnectionObserver* observer) { | 40 void FakeGCMDriver::AddConnectionObserver(GCMConnectionObserver* observer) { |
| 30 } | 41 } |
| 31 | 42 |
| 32 void FakeGCMDriver::RemoveConnectionObserver(GCMConnectionObserver* observer) { | 43 void FakeGCMDriver::RemoveConnectionObserver(GCMConnectionObserver* observer) { |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 } | 117 } |
| 107 | 118 |
| 108 void FakeGCMDriver::AddHeartbeatInterval(const std::string& scope, | 119 void FakeGCMDriver::AddHeartbeatInterval(const std::string& scope, |
| 109 int interval_ms) { | 120 int interval_ms) { |
| 110 } | 121 } |
| 111 | 122 |
| 112 void FakeGCMDriver::RemoveHeartbeatInterval(const std::string& scope) { | 123 void FakeGCMDriver::RemoveHeartbeatInterval(const std::string& scope) { |
| 113 } | 124 } |
| 114 | 125 |
| 115 } // namespace gcm | 126 } // namespace gcm |
| OLD | NEW |