Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: components/update_client/task_update.h

Issue 1440393002: Reland of Change the update_client task runner behavior to continue on shutdown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/update_client/task.h ('k') | components/update_client/task_update.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 4
5 #ifndef COMPONENTS_UPDATE_CLIENT_TASK_UPDATE_H_ 5 #ifndef COMPONENTS_UPDATE_CLIENT_TASK_UPDATE_H_
6 #define COMPONENTS_UPDATE_CLIENT_TASK_UPDATE_H_ 6 #define COMPONENTS_UPDATE_CLIENT_TASK_UPDATE_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 22 matching lines...) Expand all
33 // this task when the task is done. 33 // this task when the task is done.
34 TaskUpdate(UpdateEngine* update_engine, 34 TaskUpdate(UpdateEngine* update_engine,
35 bool is_foreground, 35 bool is_foreground,
36 const std::vector<std::string>& ids, 36 const std::vector<std::string>& ids,
37 const UpdateClient::CrxDataCallback& crx_data_callback, 37 const UpdateClient::CrxDataCallback& crx_data_callback,
38 const Callback& callback); 38 const Callback& callback);
39 ~TaskUpdate() override; 39 ~TaskUpdate() override;
40 40
41 void Run() override; 41 void Run() override;
42 42
43 void Cancel() override;
44
43 std::vector<std::string> GetIds() const override; 45 std::vector<std::string> GetIds() const override;
44 46
45 private: 47 private:
46 // Called when the Run function associated with this task has completed. 48 // Called when the task has completed either because the task has run or
47 void RunComplete(int error); 49 // it has been canceled.
50 void TaskComplete(int error);
48 51
49 base::ThreadChecker thread_checker_; 52 base::ThreadChecker thread_checker_;
50 53
51 UpdateEngine* update_engine_; // Not owned by this class. 54 UpdateEngine* update_engine_; // Not owned by this class.
52 55
53 const bool is_foreground_; 56 const bool is_foreground_;
54 const std::vector<std::string> ids_; 57 const std::vector<std::string> ids_;
55 const UpdateClient::CrxDataCallback crx_data_callback_; 58 const UpdateClient::CrxDataCallback crx_data_callback_;
56 const Callback callback_; 59 const Callback callback_;
57 60
58 DISALLOW_COPY_AND_ASSIGN(TaskUpdate); 61 DISALLOW_COPY_AND_ASSIGN(TaskUpdate);
59 }; 62 };
60 63
61 } // namespace update_client 64 } // namespace update_client
62 65
63 #endif // COMPONENTS_UPDATE_CLIENT_TASK_UPDATE_H_ 66 #endif // COMPONENTS_UPDATE_CLIENT_TASK_UPDATE_H_
OLDNEW
« no previous file with comments | « components/update_client/task.h ('k') | components/update_client/task_update.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698