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

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

Issue 1419473005: Fix task concurrency in components/update_client (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
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 std::vector<std::string> GetIds() const override;
44
43 private: 45 private:
44 // Called when the Run function associated with this task has completed. 46 // Called when the Run function associated with this task has completed.
45 void RunComplete(int error); 47 void RunComplete(int error);
46 48
47 base::ThreadChecker thread_checker_; 49 base::ThreadChecker thread_checker_;
48 50
49 UpdateEngine* update_engine_; // Not owned by this class. 51 UpdateEngine* update_engine_; // Not owned by this class.
50 52
51 const bool is_foreground_; 53 const bool is_foreground_;
52 const std::vector<std::string> ids_; 54 const std::vector<std::string> ids_;
53 const UpdateClient::CrxDataCallback crx_data_callback_; 55 const UpdateClient::CrxDataCallback crx_data_callback_;
54 const Callback callback_; 56 const Callback callback_;
55 57
56 DISALLOW_COPY_AND_ASSIGN(TaskUpdate); 58 DISALLOW_COPY_AND_ASSIGN(TaskUpdate);
57 }; 59 };
58 60
59 } // namespace update_client 61 } // namespace update_client
60 62
61 #endif // COMPONENTS_UPDATE_CLIENT_TASK_UPDATE_H_ 63 #endif // COMPONENTS_UPDATE_CLIENT_TASK_UPDATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698