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

Side by Side Diff: components/update_client/task.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_H_ 5 #ifndef COMPONENTS_UPDATE_CLIENT_TASK_H_
6 #define COMPONENTS_UPDATE_CLIENT_TASK_H_ 6 #define COMPONENTS_UPDATE_CLIENT_TASK_H_
7 7
8 #include <string>
9 #include <vector>
10
8 #include "base/callback.h" 11 #include "base/callback.h"
9 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
10 #include "components/update_client/update_client.h" 13 #include "components/update_client/update_client.h"
11 14
12 namespace update_client { 15 namespace update_client {
13 16
14 class Task; 17 class Task;
15 18
16 // Defines an abstraction for a unit of work done by the update client. 19 // Defines an abstraction for a unit of work done by the update client.
17 // Each invocation of the update client API results in a task being created and 20 // Each invocation of the update client API results in a task being created and
18 // run. In most cases, a task corresponds to a set of CRXs, which are updated 21 // run. In most cases, a task corresponds to a set of CRXs, which are updated
19 // together. 22 // together.
20 class Task { 23 class Task {
21 public: 24 public:
22 virtual ~Task() {} 25 virtual ~Task() {}
23 26
24 virtual void Run() = 0; 27 virtual void Run() = 0;
28
29 // Returns the ids corresponding to the CRXs associated with this update task.
30 virtual std::vector<std::string> GetIds() const = 0;
25 }; 31 };
26 32
27 } // namespace update_client 33 } // namespace update_client
28 34
29 #endif // COMPONENTS_UPDATE_CLIENT_TASK_H_ 35 #endif // COMPONENTS_UPDATE_CLIENT_TASK_H_
OLDNEW
« no previous file with comments | « no previous file | components/update_client/task_update.h » ('j') | components/update_client/update_client.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698