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

Side by Side Diff: chrome/installer/setup/install.cc

Issue 196068: Adding a --do-not-create-shortcuts icons command line switch to the installer to prev... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/installer/setup/setup_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <shlobj.h> 5 #include <shlobj.h>
6 #include <time.h> 6 #include <time.h>
7 7
8 #include "chrome/installer/setup/install.h" 8 #include "chrome/installer/setup/install.h"
9 9
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 } else { 533 } else {
534 LOG(ERROR) << "Not sure how we got here." 534 LOG(ERROR) << "Not sure how we got here."
535 << " New version: " << new_version.GetString() 535 << " New version: " << new_version.GetString()
536 << ", installed version: " << installed_version->GetString(); 536 << ", installed version: " << installed_version->GetString();
537 // This should never happen but we are seeing some inconsistent exit 537 // This should never happen but we are seeing some inconsistent exit
538 // code reports in Omaha logs. We will treat this case as update to 538 // code reports in Omaha logs. We will treat this case as update to
539 // see if the inconsistency goes away. 539 // see if the inconsistency goes away.
540 result = installer_util::NEW_VERSION_UPDATED; 540 result = installer_util::NEW_VERSION_UPDATED;
541 } 541 }
542 542
543 bool create_all_shortcut = installer_util::GetDistroBooleanPreference(prefs, 543 if (!installer_util::GetDistroBooleanPreference(prefs,
544 installer_util::master_preferences::kCreateAllShortcuts); 544 installer_util::master_preferences::kDoNotCreateShortcuts)) {
545 bool alt_shortcut = installer_util::GetDistroBooleanPreference(prefs, 545 bool create_all_shortcut = installer_util::GetDistroBooleanPreference(
546 installer_util::master_preferences::kAltShortcutText); 546 prefs, installer_util::master_preferences::kCreateAllShortcuts);
547 if (!CreateOrUpdateChromeShortcuts(exe_path, install_path, 547 bool alt_shortcut = installer_util::GetDistroBooleanPreference(prefs,
548 new_version.GetString(), result, 548 installer_util::master_preferences::kAltShortcutText);
549 system_install, create_all_shortcut, 549 if (!CreateOrUpdateChromeShortcuts(exe_path, install_path,
550 alt_shortcut)) 550 new_version.GetString(), result,
551 LOG(WARNING) << "Failed to create/update start menu shortcut."; 551 system_install, create_all_shortcut,
552 alt_shortcut))
553 LOG(WARNING) << "Failed to create/update start menu shortcut.";
554
555 bool make_chrome_default = installer_util::GetDistroBooleanPreference(
556 prefs, installer_util::master_preferences::kMakeChromeDefault);
557 RegisterChromeOnMachine(install_path, system_install,
558 make_chrome_default);
559 }
552 560
553 RemoveOldVersionDirs(install_path, new_version.GetString()); 561 RemoveOldVersionDirs(install_path, new_version.GetString());
554
555 bool make_chrome_default = installer_util::GetDistroBooleanPreference(prefs,
556 installer_util::master_preferences::kMakeChromeDefault);
557 RegisterChromeOnMachine(install_path, system_install, make_chrome_default);
558 } 562 }
559 563
560 return result; 564 return result;
561 } 565 }
562 566
563 std::wstring installer::GetInstallerPathUnderChrome( 567 std::wstring installer::GetInstallerPathUnderChrome(
564 const std::wstring& install_path, const std::wstring& new_version) { 568 const std::wstring& install_path, const std::wstring& new_version) {
565 std::wstring installer_path(install_path); 569 std::wstring installer_path(install_path);
566 file_util::AppendToPath(&installer_path, new_version); 570 file_util::AppendToPath(&installer_path, new_version);
567 file_util::AppendToPath(&installer_path, installer_util::kInstallerDir); 571 file_util::AppendToPath(&installer_path, installer_util::kInstallerDir);
568 return installer_path; 572 return installer_path;
569 } 573 }
OLDNEW
« no previous file with comments | « no previous file | chrome/installer/setup/setup_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698