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

Unified Diff: components/update_client/update_checker.h

Issue 2835803002: Refactor the UpdateEngine and its actions in the component updater. (Closed)
Patch Set: Created 3 years, 8 months 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 side-by-side diff with in-line comments
Download patch
Index: components/update_client/update_checker.h
diff --git a/components/update_client/update_checker.h b/components/update_client/update_checker.h
index 7500147beed4702b26e65aac225901cc4ff307d7..ac6e0a468ba7f6967b4f6b5d98e09a501a155757 100644
--- a/components/update_client/update_checker.h
+++ b/components/update_client/update_checker.h
@@ -12,33 +12,35 @@
#include "base/callback.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
-#include "components/update_client/crx_update_item.h"
+#include "components/update_client/component.h"
#include "components/update_client/update_response.h"
#include "url/gurl.h"
namespace update_client {
-class PersistedData;
class Configurator;
+class PersistedData;
class UpdateChecker {
public:
using UpdateCheckCallback =
- base::Callback<void(int error,
- const UpdateResponse::Results& results,
- int retry_after_sec)>;
+ base::Callback<void(int error, int retry_after_sec)>;
using Factory = std::unique_ptr<UpdateChecker> (*)(
const scoped_refptr<Configurator>& config,
PersistedData* persistent);
- virtual ~UpdateChecker() {}
+ virtual ~UpdateChecker() = default;
- // Initiates an update check for the |items_to_check|. |additional_attributes|
- // provides a way to customize the <request> element. This value is inserted
- // as-is, therefore it must be well-formed as an XML attribute string.
+ // Initiates an update check for the components specified by their ids.
+ // |additional_attributes| provides a way to customize the <request> element.
+ // This value is inserted as-is, therefore it must be well-formed as an
+ // XML attribute string.
+ // On completion, the state of |components| is mutated as required by the
+ // server response received.
virtual bool CheckForUpdates(
- const IdToCrxUpdateItemMap& items_to_check,
+ const std::vector<std::string>& ids_to_check,
+ const IdToComponentPtrMap& components,
const std::string& additional_attributes,
bool enabled_component_updates,
const UpdateCheckCallback& update_check_callback) = 0;
@@ -48,7 +50,7 @@ class UpdateChecker {
PersistedData* persistent);
protected:
- UpdateChecker() {}
+ UpdateChecker() = default;
private:
DISALLOW_COPY_AND_ASSIGN(UpdateChecker);

Powered by Google App Engine
This is Rietveld 408576698