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

Unified Diff: chrome/browser/component_updater/supervised_user_whitelist_installer.cc

Issue 2483513002: Revert of Makes the component installers return a Result instead of a bool. (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: chrome/browser/component_updater/supervised_user_whitelist_installer.cc
diff --git a/chrome/browser/component_updater/supervised_user_whitelist_installer.cc b/chrome/browser/component_updater/supervised_user_whitelist_installer.cc
index d0e79cc75ef8cf49232563042cf1ae2ad670a5f1..ade964db53e3164a7f2a1ba7bd3fd634d4ec6a4c 100644
--- a/chrome/browser/component_updater/supervised_user_whitelist_installer.cc
+++ b/chrome/browser/component_updater/supervised_user_whitelist_installer.cc
@@ -40,7 +40,6 @@
#include "components/prefs/pref_service.h"
#include "components/prefs/scoped_user_pref_update.h"
#include "components/safe_json/json_sanitizer.h"
-#include "components/update_client/update_client_errors.h"
#include "content/public/browser/browser_thread.h"
namespace component_updater {
@@ -253,9 +252,8 @@
const base::FilePath& install_dir) const override;
bool SupportsGroupPolicyEnabledComponentUpdates() const override;
bool RequiresNetworkEncryption() const override;
- update_client::CrxInstaller::Result OnCustomInstall(
- const base::DictionaryValue& manifest,
- const base::FilePath& install_dir) override;
+ bool OnCustomInstall(const base::DictionaryValue& manifest,
+ const base::FilePath& install_dir) override;
void ComponentReady(const base::Version& version,
const base::FilePath& install_dir,
std::unique_ptr<base::DictionaryValue> manifest) override;
@@ -290,16 +288,11 @@
return true;
}
-update_client::CrxInstaller::Result
-SupervisedUserWhitelistComponentInstallerTraits::OnCustomInstall(
+bool SupervisedUserWhitelistComponentInstallerTraits::OnCustomInstall(
const base::DictionaryValue& manifest,
const base::FilePath& install_dir) {
// Delete the existing sanitized whitelist.
- const bool success =
- base::DeleteFile(GetSanitizedWhitelistPath(crx_id_), false);
- return update_client::CrxInstaller::Result(
- success ? update_client::InstallError::NONE
- : update_client::InstallError::GENERIC_ERROR);
+ return base::DeleteFile(GetSanitizedWhitelistPath(crx_id_), false);
}
void SupervisedUserWhitelistComponentInstallerTraits::ComponentReady(

Powered by Google App Engine
This is Rietveld 408576698