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/thread_task_runner_handle.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 if (ids_.empty()) { | 34 if (ids_.empty()) { |
35 RunComplete(-1); | 35 RunComplete(-1); |
36 return; | 36 return; |
37 } | 37 } |
38 | 38 |
39 update_engine_->Update( | 39 update_engine_->Update( |
40 is_foreground_, ids_, crx_data_callback_, | 40 is_foreground_, ids_, crx_data_callback_, |
41 base::Bind(&TaskUpdate::RunComplete, base::Unretained(this))); | 41 base::Bind(&TaskUpdate::RunComplete, base::Unretained(this))); |
42 } | 42 } |
43 | 43 |
| 44 std::vector<std::string> TaskUpdate::GetIds() const { |
| 45 return ids_; |
| 46 } |
| 47 |
44 void TaskUpdate::RunComplete(int error) { | 48 void TaskUpdate::RunComplete(int error) { |
45 DCHECK(thread_checker_.CalledOnValidThread()); | 49 DCHECK(thread_checker_.CalledOnValidThread()); |
46 | 50 |
47 callback_.Run(this, error); | 51 callback_.Run(this, error); |
48 } | 52 } |
49 | 53 |
50 } // namespace update_client | 54 } // namespace update_client |
OLD | NEW |