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

Unified Diff: chrome/installer/util/shell_util.h

Issue 10512026: Fix RegisterChromeBrowser definition and usage in shell_util (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixup Created 8 years, 6 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
« no previous file with comments | « no previous file | chrome/installer/util/shell_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/shell_util.h
diff --git a/chrome/installer/util/shell_util.h b/chrome/installer/util/shell_util.h
index 4215ce83e5ddf68d87870812253bb90f4e46bcef..3af494b5130064d39df076efeca7941b5ee18c54 100644
--- a/chrome/installer/util/shell_util.h
+++ b/chrome/installer/util/shell_util.h
@@ -253,27 +253,30 @@ class ShellUtil {
const string16& chrome_exe,
const string16& protocol);
- // This method adds Chrome to the list that shows up in Add/Remove Programs->
- // Set Program Access and Defaults and also creates Chrome ProgIds under
- // Software\Classes. This method requires write access to HKLM so is just
- // best effort deal. If write to HKLM fails and elevate_if_not_admin is true,
- // this method will:
- // - add the ProgId entries to HKCU on XP. HKCU entries will not make
- // Chrome show in Set Program Access and Defaults but they are still useful
- // because we can make Chrome run when user clicks on http link or html
- // file.
- // - will try to launch setup.exe with admin priviledges on Vista to do
- // these tasks. Users will see standard Vista elevation prompt and if they
- // enter the right credentials, the write operation will work.
- // Currently elevate_if_not_admin is true only when user tries to make Chrome
- // default browser (through the UI or through installer options) and Chrome
- // is not registered on the machine.
+ // Registers Chrome as a potential default browser and handler for filetypes
+ // and protocols.
+ // If Chrome is already registered, this method is a no-op.
+ // This method requires write access to HKLM so is just a best effort deal.
+ // If write to HKLM fails and:
+ // - |elevate_if_not_admin| is true (and OS is Vista or above):
+ // tries to launch setup.exe with admin priviledges (by prompting the user
+ // with a UAC) to do these tasks.
+ // - |elevate_if_not_admin| is false (or OS is XP):
+ // adds the ProgId entries to HKCU. These entries will not make Chrome show
+ // in Default Programs but they are still useful because Chrome can be
+ // registered to run when the user clicks on an http link or an html file.
//
// |chrome_exe| full path to chrome.exe.
// |unique_suffix| Optional input. If given, this function appends the value
// to default browser entries names that it creates in the registry.
+ // Currently, this is only used to continue an install with the same suffix
+ // when elevating and calling setup.exe with admin privileges as described
+ // above.
// |elevate_if_not_admin| if true will make this method try alternate methods
- // as described above.
+ // as described above. This should only be true when following a user action
+ // (e.g. "Make Chrome Default") as it allows this method to UAC.
+ //
+ // Returns true if Chrome is successfully registered (or already registered).
static bool RegisterChromeBrowser(BrowserDistribution* dist,
const string16& chrome_exe,
const string16& unique_suffix,
« no previous file with comments | « no previous file | chrome/installer/util/shell_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698