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

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

Issue 10823437: Callback flow to register Chrome and update shortcuts after OS upgrade to Windows 8 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Abandoning the use of ON_OS_UPGRADE_SUCCESSFUL installer message. Created 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/installer/setup/install.h" 5 #include "chrome/installer/setup/install.h"
6 6
7 #include <shlobj.h> 7 #include <shlobj.h>
8 #include <time.h> 8 #include <time.h>
9 #include <winuser.h> 9 #include <winuser.h>
10 10
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 545
546 installer_state.RemoveOldVersionDirectories( 546 installer_state.RemoveOldVersionDirectories(
547 new_version, 547 new_version,
548 existing_version.get(), 548 existing_version.get(),
549 install_temp_path); 549 install_temp_path);
550 } 550 }
551 551
552 return result; 552 return result;
553 } 553 }
554 554
555 bool OnOsUpgrade(const InstallationState& original_state,
556 const InstallerState& installer_state,
557 const FilePath& setup_exe) {
558 const Product* chrome_install =
559 installer_state.FindProduct(BrowserDistribution::CHROME_BROWSER);
560 DCHECK(chrome_install);
grt (UTC plus 2) 2012/08/30 04:15:25 if (!chrome_install) { NOTREACHED(); return fa
huangs 2012/08/30 17:13:07 No longer need this, as we'll pass Product& chrome
561
562 // Upon upgrading to Windows 8, we need to fix Chrome shortcuts and register
563 // Chrome, so that Metro Chrome would work if Chrome is the default browser.
564 if (base::win::GetVersion() >= base::win::VERSION_WIN8) {
565 VLOG(1) << "Updating and registering shortcut for Windows 8.";
grt (UTC plus 2) 2012/08/30 04:15:25 "shortcut" -> "shortcuts" and remove "Windows 8" s
huangs 2012/08/30 17:13:07 Done.
566 uint32 shortcut_options = ShellUtil::SHORTCUT_DUAL_MODE;
567 CreateOrUpdateDesktopAndQuickLaunchShortcuts(
568 installer_state, *chrome_install, shortcut_options);
569 CreateOrUpdateStartMenuAndTaskbarShortcuts(
570 installer_state, setup_exe, *chrome_install, shortcut_options);
571 RegisterChromeOnMachine(installer_state, *chrome_install, false);
572 SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, NULL, NULL);
gab 2012/08/30 14:24:32 You should not need to SHChangeNotify, the shortcu
huangs 2012/08/30 17:13:07 Done.
573 }
574 return true;
575 }
576
555 } // namespace installer 577 } // namespace installer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698