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

Unified Diff: chrome/browser/component_updater/recovery_component_installer.h

Issue 321473003: Elevated install of recovery component (component update part) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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: chrome/browser/component_updater/recovery_component_installer.h
diff --git a/chrome/browser/component_updater/recovery_component_installer.h b/chrome/browser/component_updater/recovery_component_installer.h
index 260083decf1f7877fcff7543c023117bcdf95526..e5e3112636a3adf5beb43f60df95652339d78423 100644
--- a/chrome/browser/component_updater/recovery_component_installer.h
+++ b/chrome/browser/component_updater/recovery_component_installer.h
@@ -1,25 +1,38 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_COMPONENT_UPDATER_RECOVERY_COMPONENT_INSTALLER_H_
-#define CHROME_BROWSER_COMPONENT_UPDATER_RECOVERY_COMPONENT_INSTALLER_H_
-
-class PrefRegistrySimple;
-class PrefService;
-
-namespace component_updater {
-
-class ComponentUpdateService;
-
-// Component update registration for the recovery component. The job of the
-// recovery component is to repair the chrome installation or repair the Google
-// update installation. This is a last resort safety mechanism.
-void RegisterRecoveryComponent(ComponentUpdateService* cus, PrefService* prefs);
-
-// Register user preferences related to the recovery component.
-void RegisterPrefsForRecoveryComponent(PrefRegistrySimple* registry);
-
-} // namespace component_updater
-
-#endif // CHROME_BROWSER_COMPONENT_UPDATER_RECOVERY_COMPONENT_INSTALLER_H_
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_COMPONENT_UPDATER_RECOVERY_COMPONENT_INSTALLER_H_
+#define CHROME_BROWSER_COMPONENT_UPDATER_RECOVERY_COMPONENT_INSTALLER_H_
+
+#include <string>
+
+#include "base/callback_forward.h"
+
+class PrefRegistrySimple;
+class PrefService;
+
+namespace component_updater {
+
+class ComponentUpdateService;
+
+// Component update registration for the recovery component. The job of the
+// recovery component is to repair the chrome installation or repair the Google
+// update installation. This is a last resort safety mechanism.
+void RegisterRecoveryComponent(ComponentUpdateService* cus, PrefService* prefs);
+
+// Register user preferences related to the recovery component.
+void RegisterPrefsForRecoveryComponent(PrefRegistrySimple* registry);
+
+// When |elevation_allowed|, launches an elevated process to do recovery.
+// |callback| is called when the preference flag is set for external consumer
+// to check.
+void StartElevatedRecoveryProcess(
+ PrefService* prefs, bool elevation_allowed, const base::Closure& callback);
+
+// Install the recovery component with elevated privilege.
+void InstallRecoveryComponentElevated(const std::string& version_str);
+
+} // namespace component_updater
+
+#endif // CHROME_BROWSER_COMPONENT_UPDATER_RECOVERY_COMPONENT_INSTALLER_H_

Powered by Google App Engine
This is Rietveld 408576698