diff options
author | rahulk@google.com <rahulk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-18 21:39:43 +0000 |
---|---|---|
committer | rahulk@google.com <rahulk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-18 21:39:43 +0000 |
commit | 8bcdcbe8e59f804e03f75e86744211210c64484a (patch) | |
tree | 06a04450b42770a59ecab09998608c005fed391d /chrome/installer/util/shell_util.cc | |
parent | af784739ebdc4ca47d9d52e366587e4c7ba2313b (diff) | |
download | chromium_src-8bcdcbe8e59f804e03f75e86744211210c64484a.zip chromium_src-8bcdcbe8e59f804e03f75e86744211210c64484a.tar.gz chromium_src-8bcdcbe8e59f804e03f75e86744211210c64484a.tar.bz2 |
First set of changes to start separating Google specific branding from Chromium. This change mostly tries to modify installer to install Chromium or Google Chrome depending on a compile flag. The goal is to try to isolate all the differences in a single class that can be overridden for customization. There is also a lot of refactoring to make this happen.
Some changes are yet to be done but I didn't want to make this change even bigger than it already is. With all these changes the default build should still work as it is (Google Chrome should get installed/uninstalled). The changes yet to be done:
- Separating string resources (this is marked by TODO in one of the files)
- Generate different chrome.7z (Chromium will not include rlz.dll) for mini_installer
BUG=1296800
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@999 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/util/shell_util.cc')
-rw-r--r-- | chrome/installer/util/shell_util.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc index c8ebfc8..bc8b882 100644 --- a/chrome/installer/util/shell_util.cc +++ b/chrome/installer/util/shell_util.cc @@ -47,6 +47,7 @@ #include "base/win_util.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_switches.h" +#include "chrome/installer/util/browser_distribution.h" #include "chrome/installer/util/create_reg_key_work_item.h" #include "chrome/installer/util/l10n_string_util.h" #include "chrome/installer/util/set_reg_value_work_item.h" @@ -80,9 +81,10 @@ class RegistryEntry { entries.push_front(new RegistryEntry( L"Software\\Classes\\ChromeHTML\\shell\\open\\command", open_cmd)); + BrowserDistribution* dist = BrowserDistribution::GetDistribution(); entries.push_front(new RegistryEntry( L"Software\\Clients\\StartMenuInternet\\chrome.exe", - installer_util::kApplicationName)); + dist->GetApplicationName())); entries.push_front(new RegistryEntry( L"Software\\Clients\\StartMenuInternet\\chrome.exe\\shell\\open\\command", quoted_exe_path)); @@ -107,17 +109,17 @@ class RegistryEntry { entries.push_front(new RegistryEntry( ShellUtil::kRegRegisteredApplications, - installer_util::kApplicationName, + dist->GetApplicationName(), L"Software\\Clients\\StartMenuInternet\\chrome.exe\\Capabilities")); entries.push_front(new RegistryEntry( L"Software\\Clients\\StartMenuInternet\\chrome.exe\\Capabilities", - L"ApplicationDescription", installer_util::kApplicationName)); + L"ApplicationDescription", dist->GetApplicationName())); entries.push_front(new RegistryEntry( L"Software\\Clients\\StartMenuInternet\\chrome.exe\\Capabilities", L"ApplicationIcon", icon_path)); entries.push_front(new RegistryEntry( L"Software\\Clients\\StartMenuInternet\\chrome.exe\\Capabilities", - L"ApplicationName", installer_util::kApplicationName)); + L"ApplicationName", dist->GetApplicationName())); entries.push_front(new RegistryEntry( L"Software\\Clients\\StartMenuInternet\\chrome.exe\\Capabilities\\StartMenu", @@ -251,7 +253,8 @@ ShellUtil::RegisterStatus RegisterOnVista(const std::wstring& chrome_exe, std::wstring exe_path(file_util::GetDirectoryFromPath(chrome_exe)); file_util::AppendToPath(&exe_path, installer_util::kSetupExe); if (!file_util::PathExists(exe_path)) { - RegKey key(HKEY_CURRENT_USER, installer_util::kUninstallRegPath); + BrowserDistribution* dist = BrowserDistribution::GetDistribution(); + RegKey key(HKEY_CURRENT_USER, dist->GetUninstallRegPath().c_str()); key.ReadValue(installer_util::kUninstallStringField, &exe_path); exe_path = exe_path.substr(0, exe_path.find_first_of(L" --")); TrimString(exe_path, L" \"", &exe_path); |