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

Side by Side Diff: chrome/installer/util/shell_util.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: Refactoring; renamed OnOsUpgrade() to HandleOsUpgradeForBrowser(). 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 // This file defines functions that integrate Chrome in Windows shell. These 5 // This file defines functions that integrate Chrome in Windows shell. These
6 // functions can be used by Chrome as well as Chrome installer. All of the 6 // functions can be used by Chrome as well as Chrome installer. All of the
7 // work is done by the local functions defined in anonymous namespace in 7 // work is done by the local functions defined in anonymous namespace in
8 // this class. 8 // this class.
9 9
10 #include "chrome/installer/util/shell_util.h" 10 #include "chrome/installer/util/shell_util.h"
(...skipping 1439 matching lines...) Expand 10 before | Expand all | Expand 10 after
1450 // admin. 1450 // admin.
1451 if (root == HKEY_CURRENT_USER || IsUserAnAdmin()) { 1451 if (root == HKEY_CURRENT_USER || IsUserAnAdmin()) {
1452 ScopedVector<RegistryEntry> progid_and_appreg_entries; 1452 ScopedVector<RegistryEntry> progid_and_appreg_entries;
1453 ScopedVector<RegistryEntry> shell_entries; 1453 ScopedVector<RegistryEntry> shell_entries;
1454 RegistryEntry::GetProgIdEntries(dist, chrome_exe, suffix, 1454 RegistryEntry::GetProgIdEntries(dist, chrome_exe, suffix,
1455 &progid_and_appreg_entries); 1455 &progid_and_appreg_entries);
1456 RegistryEntry::GetAppRegistrationEntries(chrome_exe, suffix, 1456 RegistryEntry::GetAppRegistrationEntries(chrome_exe, suffix,
1457 &progid_and_appreg_entries); 1457 &progid_and_appreg_entries);
1458 RegistryEntry::GetShellIntegrationEntries( 1458 RegistryEntry::GetShellIntegrationEntries(
1459 dist, chrome_exe, suffix, &shell_entries); 1459 dist, chrome_exe, suffix, &shell_entries);
1460 return AddRegistryEntries(user_level ? HKEY_CURRENT_USER : 1460 return AddRegistryEntries(root, progid_and_appreg_entries) &&
gab 2012/08/30 17:55:19 Do not check this in!!
grt (UTC plus 2) 2012/08/30 19:10:18 Good catch! +1 to that.
huangs 2012/08/30 20:14:22 Doh! Forgot about this.
1461 HKEY_LOCAL_MACHINE, 1461 AddRegistryEntries(root, shell_entries);
1462 progid_and_appreg_entries) &&
1463 AddRegistryEntries(root, shell_entries);
1464 } 1462 }
1465 1463
1466 // If the user is not an admin and OS is between Vista and Windows 7 1464 // If the user is not an admin and OS is between Vista and Windows 7
1467 // inclusively, try to elevate and register. This is only intended for 1465 // inclusively, try to elevate and register. This is only intended for
1468 // user-level installs as system-level installs should always be run with 1466 // user-level installs as system-level installs should always be run with
1469 // admin rights. 1467 // admin rights.
1470 if (elevate_if_not_admin && 1468 if (elevate_if_not_admin &&
1471 base::win::GetVersion() >= base::win::VERSION_VISTA && 1469 base::win::GetVersion() >= base::win::VERSION_VISTA &&
1472 ElevateAndRegisterChrome(dist, chrome_exe, suffix, L"")) 1470 ElevateAndRegisterChrome(dist, chrome_exe, suffix, L""))
1473 return true; 1471 return true;
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
1756 // are any left...). 1754 // are any left...).
1757 if (free_bits >= 8 && next_byte_index < size) { 1755 if (free_bits >= 8 && next_byte_index < size) {
1758 free_bits -= 8; 1756 free_bits -= 8;
1759 bit_stream += bytes[next_byte_index++] << free_bits; 1757 bit_stream += bytes[next_byte_index++] << free_bits;
1760 } 1758 }
1761 } 1759 }
1762 1760
1763 DCHECK_EQ(ret.length(), encoded_length); 1761 DCHECK_EQ(ret.length(), encoded_length);
1764 return ret; 1762 return ret;
1765 } 1763 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698