Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/offline_pages/core/background/offliner_stub.h" | 5 #include "components/offline_pages/core/background/offliner_stub.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/threading/thread_task_runner_handle.h" | 8 #include "base/threading/thread_task_runner_handle.h" |
| 9 #include "components/offline_pages/core/background/save_page_request.h" | 9 #include "components/offline_pages/core/background/save_page_request.h" |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 24 | 24 |
| 25 // Post the callback on the run loop. | 25 // Post the callback on the run loop. |
| 26 if (enable_callback_) { | 26 if (enable_callback_) { |
| 27 base::ThreadTaskRunnerHandle::Get()->PostTask( | 27 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 28 FROM_HERE, | 28 FROM_HERE, |
| 29 base::Bind(callback, request, Offliner::RequestStatus::SAVED)); | 29 base::Bind(callback, request, Offliner::RequestStatus::SAVED)); |
| 30 } | 30 } |
| 31 return true; | 31 return true; |
| 32 } | 32 } |
| 33 | 33 |
| 34 void OfflinerStub::Cancel() { | 34 void OfflinerStub::Cancel(const CancelCallback& callback) { |
| 35 cancel_called_ = true; | 35 cancel_called_ = true; |
| 36 callback.Run(0L); | |
|
fgorski
2017/02/27 18:07:25
0LL?
chili
2017/02/28 00:44:14
Done.
| |
| 36 } | 37 } |
| 37 | 38 |
| 38 } // namespace offline_pages | 39 } // namespace offline_pages |
| OLD | NEW |