diff options
author | kuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-03 21:42:37 +0000 |
---|---|---|
committer | kuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-03 21:42:37 +0000 |
commit | 6f2e2824b8143ee4d6c8845b4c17e106acaa04f4 (patch) | |
tree | f8f816ceba805db9ed2f05f55f900bf474f4a8e4 /chrome/installer/setup/setup_main.cc | |
parent | 720ce12948a8289f76877927750d9c8f8878b4d1 (diff) | |
download | chromium_src-6f2e2824b8143ee4d6c8845b4c17e106acaa04f4.zip chromium_src-6f2e2824b8143ee4d6c8845b4c17e106acaa04f4.tar.gz chromium_src-6f2e2824b8143ee4d6c8845b4c17e106acaa04f4.tar.bz2 |
Use alternate icon for Chrome shortcuts if specified in master preferences.
This change depends on change 159539 that is currently under review and a new chrome2.ico that is yet to be added to the repository.
BUG=12701
TEST=Specify an alternate icon in --installerdata file and make sure that icon is used for shortcuts and it not changed later by updates.
Review URL: http://codereview.chromium.org/159618
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22314 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/setup/setup_main.cc')
-rw-r--r-- | chrome/installer/setup/setup_main.cc | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/chrome/installer/setup/setup_main.cc b/chrome/installer/setup/setup_main.cc index eb2e8ba..3c314ff 100644 --- a/chrome/installer/setup/setup_main.cc +++ b/chrome/installer/setup/setup_main.cc @@ -245,21 +245,6 @@ DictionaryValue* GetInstallPreferences(const CommandLine& cmd_line) { return prefs; } -// Copy master preferences file provided to installer, in the same folder -// as chrome.exe so Chrome first run can find it. This function will be called -// only on the first install of Chrome. -void CopyPreferenceFileForFirstRun(bool system_level, - const CommandLine& cmd_line) { - std::wstring prefs_source_path = cmd_line.GetSwitchValue( - installer_util::switches::kInstallerData); - std::wstring prefs_dest_path( - installer::GetChromeInstallPath(system_level)); - file_util::AppendToPath(&prefs_dest_path, - installer_util::kDefaultMasterPrefs); - if (!file_util::CopyFile(prefs_source_path, prefs_dest_path)) - LOG(ERROR) << "failed copying master profile"; -} - bool CheckPreInstallConditions(const installer::Version* installed_version, bool system_install, installer_util::InstallStatus& status) { @@ -369,9 +354,11 @@ installer_util::InstallStatus InstallChrome(const CommandLine& cmd_line, std::wstring archive_to_copy(temp_path); file_util::AppendToPath(&archive_to_copy, std::wstring(installer::kChromeArchive)); + std::wstring prefs_source_path = cmd_line.GetSwitchValue( + installer_util::switches::kInstallerData); install_status = installer::InstallOrUpdateChrome( - cmd_line.program(), archive_to_copy, temp_path, prefs, - *installer_version, installed_version); + cmd_line.program(), archive_to_copy, temp_path, prefs_source_path, + prefs, *installer_version, installed_version); int install_msg_base = IDS_INSTALL_FAILED_BASE; std::wstring chrome_exe; @@ -392,7 +379,6 @@ installer_util::InstallStatus InstallChrome(const CommandLine& cmd_line, install_msg_base, &chrome_exe); if (install_status == installer_util::FIRST_INSTALL_SUCCESS) { LOG(INFO) << "First install successful."; - CopyPreferenceFileForFirstRun(system_level, cmd_line); // We never want to launch Chrome in system level install mode. if (!system_level && !installer_util::GetDistroBooleanPreference(prefs, installer_util::master_preferences::kDoNotLaunchChrome)) |