| OLD | NEW |
| 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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 start_menu_entry + ShellUtil::kRegShellOpen, quoted_exe_path)); | 363 start_menu_entry + ShellUtil::kRegShellOpen, quoted_exe_path)); |
| 364 // Register Chrome's icon for the Start Menu "Internet" link. | 364 // Register Chrome's icon for the Start Menu "Internet" link. |
| 365 entries->push_back(new RegistryEntry( | 365 entries->push_back(new RegistryEntry( |
| 366 start_menu_entry + ShellUtil::kRegDefaultIcon, icon_path)); | 366 start_menu_entry + ShellUtil::kRegDefaultIcon, icon_path)); |
| 367 | 367 |
| 368 // Register installation information. | 368 // Register installation information. |
| 369 string16 install_info(start_menu_entry + L"\\InstallInfo"); | 369 string16 install_info(start_menu_entry + L"\\InstallInfo"); |
| 370 // Note: not using CommandLine since it has ambiguous rules for quoting | 370 // Note: not using CommandLine since it has ambiguous rules for quoting |
| 371 // strings. | 371 // strings. |
| 372 entries->push_back(new RegistryEntry(install_info, kReinstallCommand, | 372 entries->push_back(new RegistryEntry(install_info, kReinstallCommand, |
| 373 quoted_exe_path + L" --" + ASCIIToWide(switches::kMakeDefaultBrowser))); | 373 quoted_exe_path + L" --" + |
| 374 base::ASCIIToWide(switches::kMakeDefaultBrowser))); |
| 374 entries->push_back(new RegistryEntry(install_info, L"HideIconsCommand", | 375 entries->push_back(new RegistryEntry(install_info, L"HideIconsCommand", |
| 375 quoted_exe_path + L" --" + ASCIIToWide(switches::kHideIcons))); | 376 quoted_exe_path + L" --" + base::ASCIIToWide(switches::kHideIcons))); |
| 376 entries->push_back(new RegistryEntry(install_info, L"ShowIconsCommand", | 377 entries->push_back(new RegistryEntry(install_info, L"ShowIconsCommand", |
| 377 quoted_exe_path + L" --" + ASCIIToWide(switches::kShowIcons))); | 378 quoted_exe_path + L" --" + base::ASCIIToWide(switches::kShowIcons))); |
| 378 entries->push_back(new RegistryEntry(install_info, L"IconsVisible", 1)); | 379 entries->push_back(new RegistryEntry(install_info, L"IconsVisible", 1)); |
| 379 | 380 |
| 380 // Register with Default Programs. | 381 // Register with Default Programs. |
| 381 const string16 reg_app_name(dist->GetBaseAppName().append(suffix)); | 382 const string16 reg_app_name(dist->GetBaseAppName().append(suffix)); |
| 382 // Tell Windows where to find Chrome's Default Programs info. | 383 // Tell Windows where to find Chrome's Default Programs info. |
| 383 const string16 capabilities(GetCapabilitiesKey(dist, suffix)); | 384 const string16 capabilities(GetCapabilitiesKey(dist, suffix)); |
| 384 entries->push_back(new RegistryEntry(ShellUtil::kRegRegisteredApplications, | 385 entries->push_back(new RegistryEntry(ShellUtil::kRegRegisteredApplications, |
| 385 reg_app_name, capabilities)); | 386 reg_app_name, capabilities)); |
| 386 // Write out Chrome's Default Programs info. | 387 // Write out Chrome's Default Programs info. |
| 387 // TODO(grt): http://crbug.com/75152 Write a reference to a localized | 388 // TODO(grt): http://crbug.com/75152 Write a reference to a localized |
| (...skipping 1612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2000 // are any left...). | 2001 // are any left...). |
| 2001 if (free_bits >= 8 && next_byte_index < size) { | 2002 if (free_bits >= 8 && next_byte_index < size) { |
| 2002 free_bits -= 8; | 2003 free_bits -= 8; |
| 2003 bit_stream += bytes[next_byte_index++] << free_bits; | 2004 bit_stream += bytes[next_byte_index++] << free_bits; |
| 2004 } | 2005 } |
| 2005 } | 2006 } |
| 2006 | 2007 |
| 2007 DCHECK_EQ(ret.length(), encoded_length); | 2008 DCHECK_EQ(ret.length(), encoded_length); |
| 2008 return ret; | 2009 return ret; |
| 2009 } | 2010 } |
| OLD | NEW |