OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "components/update_client/task_update.h" | 4 #include "components/update_client/task_update.h" |
5 | 5 |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/bind_helpers.h" | 7 #include "base/bind_helpers.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
10 #include "base/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
11 #include "components/update_client/update_client.h" | 11 #include "components/update_client/update_client.h" |
12 #include "components/update_client/update_engine.h" | 12 #include "components/update_client/update_engine.h" |
13 | 13 |
14 namespace update_client { | 14 namespace update_client { |
15 | 15 |
16 TaskUpdate::TaskUpdate(UpdateEngine* update_engine, | 16 TaskUpdate::TaskUpdate(UpdateEngine* update_engine, |
17 bool is_foreground, | 17 bool is_foreground, |
18 const std::vector<std::string>& ids, | 18 const std::vector<std::string>& ids, |
19 const UpdateClient::CrxDataCallback& crx_data_callback, | 19 const UpdateClient::CrxDataCallback& crx_data_callback, |
20 const Callback& callback) | 20 const Callback& callback) |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 } | 53 } |
54 | 54 |
55 void TaskUpdate::TaskComplete(int error) { | 55 void TaskUpdate::TaskComplete(int error) { |
56 DCHECK(thread_checker_.CalledOnValidThread()); | 56 DCHECK(thread_checker_.CalledOnValidThread()); |
57 | 57 |
58 base::ThreadTaskRunnerHandle::Get()->PostTask( | 58 base::ThreadTaskRunnerHandle::Get()->PostTask( |
59 FROM_HERE, base::Bind(callback_, this, error)); | 59 FROM_HERE, base::Bind(callback_, this, error)); |
60 } | 60 } |
61 | 61 |
62 } // namespace update_client | 62 } // namespace update_client |
OLD | NEW |