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

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

Issue 10451074: Always suffix ChromeHTML entries on Windows for user-level installs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase on r142211 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 | « chrome/installer/util/install_util.cc ('k') | 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 0e567e990aa7f9bbaf9ecc94466c326758201594..b711d5ab58a665704dbbb574a71c4162f4e60895 100644
--- a/chrome/installer/util/shell_util.h
+++ b/chrome/installer/util/shell_util.h
@@ -122,6 +122,13 @@ class ShellUtil {
// Registry value name for the DelegateExecute verb handler.
static const wchar_t* kRegDelegateExecute;
+ // Returns true if |chrome_exe| is registered in HKLM with |suffix|.
+ // Note: This only checks one deterministic key in HKLM for |chrome_exe| and
+ // doesn't otherwise validate a full Chrome install in HKLM.
+ static bool QuickIsChromeRegisteredInHKLM(BrowserDistribution* dist,
+ const string16& chrome_exe,
+ const string16& suffix);
+
// Creates Chrome shortcut on the Desktop.
// |dist| gives the type of browser distribution currently in use.
// |chrome_exe| provides the target path information.
@@ -208,15 +215,24 @@ class ShellUtil {
static void GetRegisteredBrowsers(BrowserDistribution* dist,
std::map<string16, string16>* browsers);
- // This function gets a suffix (user's login name) that can be added
- // to Chromium default browser entry in the registry to create a unique name
- // if there are multiple users on the machine, each with their own copy of
- // Chromium that they want to set as default browser.
- // This suffix value is assigned to |entry|. The function also checks for
- // existence of Default Browser registry key with this suffix and
- // returns true if it exists. In all other cases it returns false.
- static bool GetUserSpecificDefaultBrowserSuffix(BrowserDistribution* dist,
- string16* entry);
+ // Returns the suffix this user's Chrome install is registered with.
+ // Always returns the empty string on system-level installs.
+ //
+ // This method is meant for external methods which need to know the suffix of
+ // the current install at run-time, not for install-time decisions.
+ // There are no guarantees that this suffix will not change later:
+ // (e.g. if two user-level installs were previously installed in parallel on
+ // the same machine, both without admin rights and with no user-level install
+ // having claimed the non-suffixed HKLM registrations, they both have no
+ // suffix in their progId entries (as per the old suffix rules). If they were
+ // to both fully register (i.e. click "Make Chrome Default" and go through
+ // UAC; or upgrade to Win8 and get the automatic no UAC full registration)
+ // they would then both get a suffixed registration as per the new suffix
+ // rules).
+ //
+ // |chrome_exe| The path to the currently installed (or running) chrome.exe.
+ static string16 GetCurrentInstallationSuffix(BrowserDistribution* dist,
+ const string16& chrome_exe);
// Make Chrome the default browser. This function works by going through
// the url protocols and file associations that are related to general
« no previous file with comments | « chrome/installer/util/install_util.cc ('k') | chrome/installer/util/shell_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698