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

Unified Diff: chrome/browser/shell_integration_win.cc

Issue 10451074: Always suffix ChromeHTML entries on Windows for user-level installs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: no UAC on uninstall if nothing in HKLM 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/setup/setup_main.cc » ('j') | chrome/installer/setup/setup_main.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/shell_integration_win.cc
diff --git a/chrome/browser/shell_integration_win.cc b/chrome/browser/shell_integration_win.cc
index f4c8609f43ec88bc8c84e97eb715f7ec009cafb8..40fb870d140a44830041578c9146447ee27e95ce 100644
--- a/chrome/browser/shell_integration_win.cc
+++ b/chrome/browser/shell_integration_win.cc
@@ -75,15 +75,14 @@ ShellIntegration::DefaultWebClientState ProbeCurrentDefaultHandlers(
if (FAILED(hr))
return ShellIntegration::UNKNOWN_DEFAULT_WEB_CLIENT;
- string16 prog_id(ShellUtil::kChromeHTMLProgId);
-
- // If a user specific default browser entry exists, we check for that ProgID
- // being default. If not, then the ProgID is ChromeHTML or ChromiumHTML so we
- // do not append a suffix to the ProgID.
- string16 suffix;
BrowserDistribution* dist = BrowserDistribution::GetDistribution();
- if (ShellUtil::GetUserSpecificDefaultBrowserSuffix(dist, &suffix))
- prog_id += suffix;
+ FilePath chrome_exe;
+ if (!PathService::Get(base::FILE_EXE, &chrome_exe)) {
+ LOG(DFATAL) << "PathService::Get failed.";
grt (UTC plus 2) 2012/06/08 17:51:46 use plain-old NOTREACHED(); here since this is Chr
gab 2012/06/08 20:15:52 Done.
+ return ShellIntegration::UNKNOWN_DEFAULT_WEB_CLIENT;
+ }
+ string16 prog_id(ShellUtil::kChromeHTMLProgId);
+ prog_id += ShellUtil::GetCurrentInstallationSuffix(dist, chrome_exe.value());
for (size_t i = 0; i < num_protocols; ++i) {
base::win::ScopedCoMem<wchar_t> current_app;
@@ -108,14 +107,13 @@ ShellIntegration::DefaultWebClientState ProbeAppIsDefaultHandlers(
return ShellIntegration::UNKNOWN_DEFAULT_WEB_CLIENT;
BrowserDistribution* dist = BrowserDistribution::GetDistribution();
+ FilePath chrome_exe;
+ if (!PathService::Get(base::FILE_EXE, &chrome_exe)) {
+ LOG(DFATAL) << "PathService::Get failed.";
grt (UTC plus 2) 2012/06/08 17:51:46 NOTREACHED();
gab 2012/06/08 20:15:52 Done.
+ return ShellIntegration::UNKNOWN_DEFAULT_WEB_CLIENT;
+ }
string16 app_name(dist->GetApplicationName());
-
- // If a user specific default browser entry exists, we check for that
- // app name being default. If not, then default browser is just called
- // Google Chrome or Chromium so we do not append a suffix to the app name.
- string16 suffix;
- if (ShellUtil::GetUserSpecificDefaultBrowserSuffix(dist, &suffix))
- app_name += suffix;
+ app_name += ShellUtil::GetCurrentInstallationSuffix(dist, chrome_exe.value());
BOOL result;
for (size_t i = 0; i < num_protocols; ++i) {
« no previous file with comments | « no previous file | chrome/installer/setup/setup_main.cc » ('j') | chrome/installer/setup/setup_main.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698