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

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: 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 85e5fbd7d0f9e8123a5e2b2157810f3ad4ede95f..67e78bddd68738f6313971ce8d4d6a46ddee05f1 100644
--- a/chrome/installer/util/shell_util.h
+++ b/chrome/installer/util/shell_util.h
@@ -244,27 +244,32 @@ 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.
+ // This method first checks if Chrome is fully registered (as outlined below)
+ // on Windows. If it is, this method is a no-op; if it isn't, this method
+ // registers Chrome so that it shows up in the list of Default Programs with
+ // all the protocols and file types it can handle. This method requires write
grt (UTC plus 2) 2012/06/08 15:42:01 "all the protocols" is incorrect since registerPro
gab 2012/06/08 16:03:10 Adapted the comment to reflect this.
+ // access to HKLM so is just a best effort deal.
+ // If write to HKLM fails and:
+ // - elevate_if_not_admin is true (and we are on Vista and above):
+ // this method will try 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 we are on XP):
+ // add the ProgId entries to HKCU. These 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.
// 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.
+ // default browser (through the UI or through installer options).
//
// |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.
+ //
+ // 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