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

Unified Diff: components/component_updater/component_updater_service.cc

Issue 2498873003: Refactor how the updater state data is serialized in update checks. (Closed)
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: components/component_updater/component_updater_service.cc
diff --git a/components/component_updater/component_updater_service.cc b/components/component_updater/component_updater_service.cc
index d6c4261b186970fda6edc11df75d3fb580e8fd1e..b8b27baf251d81e2834724da35ce94c3f019efcd 100644
--- a/components/component_updater/component_updater_service.cc
+++ b/components/component_updater/component_updater_service.cc
@@ -29,9 +29,6 @@
#include "base/timer/timer.h"
#include "components/component_updater/component_updater_service_internal.h"
#include "components/component_updater/timer.h"
-#if defined(OS_WIN)
-#include "components/component_updater/updater_state_win.h"
-#endif
#include "components/update_client/configurator.h"
#include "components/update_client/crx_update_item.h"
#include "components/update_client/update_client.h"
@@ -50,8 +47,6 @@ enum UpdateType {
UPDATE_TYPE_COUNT,
};
-const char kRecoveryComponentId[] = "npdjjkjlcidkjlamlmmdelcjbcpdjocm";
-
} // namespace
namespace component_updater {
@@ -361,17 +356,8 @@ void CrxUpdateService::OnUpdate(const std::vector<std::string>& ids,
for (const auto& id : ids) {
const update_client::CrxComponent* registered_component(GetComponent(id));
- if (registered_component) {
+ if (registered_component)
components->push_back(*registered_component);
- if (id == kRecoveryComponentId) {
- // Override the installer attributes for the recovery component in the
- // components which will be checked for updates.
- update_client::CrxComponent& recovery_component(components->back());
- recovery_component.installer_attributes =
- GetInstallerAttributesForRecoveryComponentInstaller(
- recovery_component);
- }
- }
}
}
@@ -432,25 +418,6 @@ void CrxUpdateService::OnEvent(Events event, const std::string& id) {
}
}
-update_client::InstallerAttributes
-CrxUpdateService::GetInstallerAttributesForRecoveryComponentInstaller(
- const CrxComponent& crx_component) const {
- update_client::InstallerAttributes installer_attributes;
-#if defined(OS_WIN)
- DCHECK_EQ("recovery", crx_component.name);
-
- const bool is_machine =
- crx_component.installer_attributes.count("ismachine") &&
- crx_component.installer_attributes.at("ismachine") == "1";
-
- auto updater_state(UpdaterState::Create(is_machine));
- if (updater_state) {
- installer_attributes = updater_state->MakeInstallerAttributes();
- }
-#endif
- return installer_attributes;
-}
-
///////////////////////////////////////////////////////////////////////////////
// The component update factory. Using the component updater as a singleton
« no previous file with comments | « components/component_updater/BUILD.gn ('k') | components/component_updater/component_updater_service_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698