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 21 matching lines...) Expand all Loading... | |
32 #include "base/utf_string_conversions.h" | 32 #include "base/utf_string_conversions.h" |
33 #include "base/values.h" | 33 #include "base/values.h" |
34 #include "base/win/registry.h" | 34 #include "base/win/registry.h" |
35 #include "base/win/scoped_co_mem.h" | 35 #include "base/win/scoped_co_mem.h" |
36 #include "base/win/scoped_comptr.h" | 36 #include "base/win/scoped_comptr.h" |
37 #include "base/win/shortcut.h" | 37 #include "base/win/shortcut.h" |
38 #include "base/win/win_util.h" | 38 #include "base/win/win_util.h" |
39 #include "base/win/windows_version.h" | 39 #include "base/win/windows_version.h" |
40 #include "chrome/common/chrome_constants.h" | 40 #include "chrome/common/chrome_constants.h" |
41 #include "chrome/common/chrome_switches.h" | 41 #include "chrome/common/chrome_switches.h" |
42 #include "chrome/installer/util/browser_distribution.h" | |
43 #include "chrome/installer/util/install_util.h" | 42 #include "chrome/installer/util/install_util.h" |
44 #include "chrome/installer/util/l10n_string_util.h" | 43 #include "chrome/installer/util/l10n_string_util.h" |
45 #include "chrome/installer/util/master_preferences.h" | 44 #include "chrome/installer/util/master_preferences.h" |
46 #include "chrome/installer/util/master_preferences_constants.h" | 45 #include "chrome/installer/util/master_preferences_constants.h" |
47 #include "chrome/installer/util/util_constants.h" | 46 #include "chrome/installer/util/util_constants.h" |
48 | 47 |
49 #include "installer_util_strings.h" // NOLINT | 48 #include "installer_util_strings.h" // NOLINT |
50 | 49 |
51 using base::win::RegKey; | 50 using base::win::RegKey; |
52 | 51 |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
211 } | 210 } |
212 | 211 |
213 // This method returns a list of all the registry entries that | 212 // This method returns a list of all the registry entries that |
214 // are needed to register this installation's ProgId and AppId. | 213 // are needed to register this installation's ProgId and AppId. |
215 // These entries need to be registered in HKLM prior to Win8. | 214 // These entries need to be registered in HKLM prior to Win8. |
216 static void GetProgIdEntries(BrowserDistribution* dist, | 215 static void GetProgIdEntries(BrowserDistribution* dist, |
217 const string16& chrome_exe, | 216 const string16& chrome_exe, |
218 const string16& suffix, | 217 const string16& suffix, |
219 ScopedVector<RegistryEntry>* entries) { | 218 ScopedVector<RegistryEntry>* entries) { |
220 string16 icon_path( | 219 string16 icon_path( |
221 ShellUtil::FormatIconLocation(chrome_exe, dist->GetIconIndex())); | 220 ShellUtil::FormatIconLocation( |
221 chrome_exe, | |
222 BrowserDistribution::SHORTCUT_CHROME)); | |
222 string16 open_cmd(ShellUtil::GetChromeShellOpenCmd(chrome_exe)); | 223 string16 open_cmd(ShellUtil::GetChromeShellOpenCmd(chrome_exe)); |
223 string16 delegate_command(ShellUtil::GetChromeDelegateCommand(chrome_exe)); | 224 string16 delegate_command(ShellUtil::GetChromeDelegateCommand(chrome_exe)); |
224 // For user-level installs: entries for the app id and DelegateExecute verb | 225 // For user-level installs: entries for the app id and DelegateExecute verb |
225 // handler will be in HKCU; thus we do not need a suffix on those entries. | 226 // handler will be in HKCU; thus we do not need a suffix on those entries. |
226 string16 app_id( | 227 string16 app_id( |
227 ShellUtil::GetBrowserModelId( | 228 ShellUtil::GetBrowserModelId( |
228 dist, InstallUtil::IsPerUserInstall(chrome_exe.c_str()))); | 229 dist, InstallUtil::IsPerUserInstall(chrome_exe.c_str()))); |
229 string16 delegate_guid; | 230 string16 delegate_guid; |
230 bool set_delegate_execute = | 231 bool set_delegate_execute = |
231 IsChromeMetroSupported() && | 232 IsChromeMetroSupported() && |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
309 string16 chrome_application(chrome_html_prog_id + | 310 string16 chrome_application(chrome_html_prog_id + |
310 ShellUtil::kRegApplication); | 311 ShellUtil::kRegApplication); |
311 entries->push_back(new RegistryEntry( | 312 entries->push_back(new RegistryEntry( |
312 chrome_application, ShellUtil::kRegAppUserModelId, app_id)); | 313 chrome_application, ShellUtil::kRegAppUserModelId, app_id)); |
313 entries->push_back(new RegistryEntry( | 314 entries->push_back(new RegistryEntry( |
314 chrome_application, ShellUtil::kRegApplicationIcon, icon_path)); | 315 chrome_application, ShellUtil::kRegApplicationIcon, icon_path)); |
315 // TODO(grt): http://crbug.com/75152 Write a reference to a localized | 316 // TODO(grt): http://crbug.com/75152 Write a reference to a localized |
316 // resource for name, description, and company. | 317 // resource for name, description, and company. |
317 entries->push_back(new RegistryEntry( | 318 entries->push_back(new RegistryEntry( |
318 chrome_application, ShellUtil::kRegApplicationName, | 319 chrome_application, ShellUtil::kRegApplicationName, |
319 dist->GetAppShortCutName())); | 320 dist->GetShortcutName(BrowserDistribution::SHORTCUT_CHROME))); |
gab
2013/06/18 19:50:29
DisplayName()
calamity
2013/06/27 01:27:44
Done.
| |
320 entries->push_back(new RegistryEntry( | 321 entries->push_back(new RegistryEntry( |
321 chrome_application, ShellUtil::kRegApplicationDescription, | 322 chrome_application, ShellUtil::kRegApplicationDescription, |
322 dist->GetAppDescription())); | 323 dist->GetAppDescription())); |
323 entries->push_back(new RegistryEntry( | 324 entries->push_back(new RegistryEntry( |
324 chrome_application, ShellUtil::kRegApplicationCompany, | 325 chrome_application, ShellUtil::kRegApplicationCompany, |
325 dist->GetPublisherName())); | 326 dist->GetPublisherName())); |
326 } | 327 } |
327 } | 328 } |
328 | 329 |
329 // This method returns a list of the registry entries needed to declare a | 330 // This method returns a list of the registry entries needed to declare a |
(...skipping 12 matching lines...) Expand all Loading... | |
342 // this installation in "RegisteredApplications" on Windows (to appear in | 343 // this installation in "RegisteredApplications" on Windows (to appear in |
343 // Default Programs, StartMenuInternet, etc.). | 344 // Default Programs, StartMenuInternet, etc.). |
344 // These entries need to be registered in HKLM prior to Win8. | 345 // These entries need to be registered in HKLM prior to Win8. |
345 // If |suffix| is not empty, these entries are guaranteed to be unique on this | 346 // If |suffix| is not empty, these entries are guaranteed to be unique on this |
346 // machine. | 347 // machine. |
347 static void GetShellIntegrationEntries(BrowserDistribution* dist, | 348 static void GetShellIntegrationEntries(BrowserDistribution* dist, |
348 const string16& chrome_exe, | 349 const string16& chrome_exe, |
349 const string16& suffix, | 350 const string16& suffix, |
350 ScopedVector<RegistryEntry>* entries) { | 351 ScopedVector<RegistryEntry>* entries) { |
351 const string16 icon_path( | 352 const string16 icon_path( |
352 ShellUtil::FormatIconLocation(chrome_exe, dist->GetIconIndex())); | 353 ShellUtil::FormatIconLocation( |
354 chrome_exe, | |
355 BrowserDistribution::SHORTCUT_CHROME)); | |
353 const string16 quoted_exe_path(L"\"" + chrome_exe + L"\""); | 356 const string16 quoted_exe_path(L"\"" + chrome_exe + L"\""); |
354 | 357 |
355 // Register for the Start Menu "Internet" link (pre-Win7). | 358 // Register for the Start Menu "Internet" link (pre-Win7). |
356 const string16 start_menu_entry(GetBrowserClientKey(dist, suffix)); | 359 const string16 start_menu_entry(GetBrowserClientKey(dist, suffix)); |
357 // Register Chrome's display name. | 360 // Register Chrome's display name. |
358 // TODO(grt): http://crbug.com/75152 Also set LocalizedString; see | 361 // TODO(grt): http://crbug.com/75152 Also set LocalizedString; see |
359 // http://msdn.microsoft.com/en-us/library/windows/desktop/cc144109(v=VS.85) .aspx#registering_the_display_name | 362 // http://msdn.microsoft.com/en-us/library/windows/desktop/cc144109(v=VS.85) .aspx#registering_the_display_name |
360 entries->push_back(new RegistryEntry( | 363 entries->push_back(new RegistryEntry( |
361 start_menu_entry, dist->GetAppShortCutName())); | 364 start_menu_entry, |
365 dist->GetShortcutName(BrowserDistribution::SHORTCUT_CHROME))); | |
gab
2013/06/18 19:50:29
DisplayName()
calamity
2013/06/27 01:27:44
Done.
| |
362 // Register the "open" verb for launching Chrome via the "Internet" link. | 366 // Register the "open" verb for launching Chrome via the "Internet" link. |
363 entries->push_back(new RegistryEntry( | 367 entries->push_back(new RegistryEntry( |
364 start_menu_entry + ShellUtil::kRegShellOpen, quoted_exe_path)); | 368 start_menu_entry + ShellUtil::kRegShellOpen, quoted_exe_path)); |
365 // Register Chrome's icon for the Start Menu "Internet" link. | 369 // Register Chrome's icon for the Start Menu "Internet" link. |
366 entries->push_back(new RegistryEntry( | 370 entries->push_back(new RegistryEntry( |
367 start_menu_entry + ShellUtil::kRegDefaultIcon, icon_path)); | 371 start_menu_entry + ShellUtil::kRegDefaultIcon, icon_path)); |
368 | 372 |
369 // Register installation information. | 373 // Register installation information. |
370 string16 install_info(start_menu_entry + L"\\InstallInfo"); | 374 string16 install_info(start_menu_entry + L"\\InstallInfo"); |
371 // Note: not using CommandLine since it has ambiguous rules for quoting | 375 // Note: not using CommandLine since it has ambiguous rules for quoting |
(...skipping 15 matching lines...) Expand all Loading... | |
387 // Write out Chrome's Default Programs info. | 391 // Write out Chrome's Default Programs info. |
388 // TODO(grt): http://crbug.com/75152 Write a reference to a localized | 392 // TODO(grt): http://crbug.com/75152 Write a reference to a localized |
389 // resource rather than this. | 393 // resource rather than this. |
390 entries->push_back(new RegistryEntry( | 394 entries->push_back(new RegistryEntry( |
391 capabilities, ShellUtil::kRegApplicationDescription, | 395 capabilities, ShellUtil::kRegApplicationDescription, |
392 dist->GetLongAppDescription())); | 396 dist->GetLongAppDescription())); |
393 entries->push_back(new RegistryEntry( | 397 entries->push_back(new RegistryEntry( |
394 capabilities, ShellUtil::kRegApplicationIcon, icon_path)); | 398 capabilities, ShellUtil::kRegApplicationIcon, icon_path)); |
395 entries->push_back(new RegistryEntry( | 399 entries->push_back(new RegistryEntry( |
396 capabilities, ShellUtil::kRegApplicationName, | 400 capabilities, ShellUtil::kRegApplicationName, |
397 dist->GetAppShortCutName())); | 401 dist->GetShortcutName(BrowserDistribution::SHORTCUT_CHROME))); |
gab
2013/06/18 19:50:29
DisplayName()
calamity
2013/06/27 01:27:44
Done.
| |
398 | 402 |
399 entries->push_back(new RegistryEntry(capabilities + L"\\Startmenu", | 403 entries->push_back(new RegistryEntry(capabilities + L"\\Startmenu", |
400 L"StartMenuInternet", reg_app_name)); | 404 L"StartMenuInternet", reg_app_name)); |
401 | 405 |
402 const string16 html_prog_id(GetBrowserProgId(suffix)); | 406 const string16 html_prog_id(GetBrowserProgId(suffix)); |
403 for (int i = 0; ShellUtil::kPotentialFileAssociations[i] != NULL; i++) { | 407 for (int i = 0; ShellUtil::kPotentialFileAssociations[i] != NULL; i++) { |
404 entries->push_back(new RegistryEntry( | 408 entries->push_back(new RegistryEntry( |
405 capabilities + L"\\FileAssociations", | 409 capabilities + L"\\FileAssociations", |
406 ShellUtil::kPotentialFileAssociations[i], html_prog_id)); | 410 ShellUtil::kPotentialFileAssociations[i], html_prog_id)); |
407 } | 411 } |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
493 for (int i = 0; ShellUtil::kDefaultFileAssociations[i] != NULL; i++) { | 497 for (int i = 0; ShellUtil::kDefaultFileAssociations[i] != NULL; i++) { |
494 string16 ext_key(ShellUtil::kRegClasses); | 498 string16 ext_key(ShellUtil::kRegClasses); |
495 ext_key.push_back(base::FilePath::kSeparators[0]); | 499 ext_key.push_back(base::FilePath::kSeparators[0]); |
496 ext_key.append(ShellUtil::kDefaultFileAssociations[i]); | 500 ext_key.append(ShellUtil::kDefaultFileAssociations[i]); |
497 entries->push_back(new RegistryEntry(ext_key, html_prog_id)); | 501 entries->push_back(new RegistryEntry(ext_key, html_prog_id)); |
498 } | 502 } |
499 | 503 |
500 // Protocols associations. | 504 // Protocols associations. |
501 string16 chrome_open = ShellUtil::GetChromeShellOpenCmd(chrome_exe); | 505 string16 chrome_open = ShellUtil::GetChromeShellOpenCmd(chrome_exe); |
502 string16 chrome_icon = | 506 string16 chrome_icon = |
503 ShellUtil::FormatIconLocation(chrome_exe, dist->GetIconIndex()); | 507 ShellUtil::FormatIconLocation( |
508 chrome_exe, | |
509 BrowserDistribution::SHORTCUT_CHROME); | |
504 for (int i = 0; ShellUtil::kBrowserProtocolAssociations[i] != NULL; i++) { | 510 for (int i = 0; ShellUtil::kBrowserProtocolAssociations[i] != NULL; i++) { |
505 GetXPStyleUserProtocolEntries(ShellUtil::kBrowserProtocolAssociations[i], | 511 GetXPStyleUserProtocolEntries(ShellUtil::kBrowserProtocolAssociations[i], |
506 chrome_icon, chrome_open, entries); | 512 chrome_icon, chrome_open, entries); |
507 } | 513 } |
508 | 514 |
509 // start->Internet shortcut. | 515 // start->Internet shortcut. |
510 string16 start_menu(ShellUtil::kRegStartMenuInternet); | 516 string16 start_menu(ShellUtil::kRegStartMenuInternet); |
511 string16 app_name = dist->GetBaseAppName() + suffix; | 517 string16 app_name = dist->GetBaseAppName() + suffix; |
512 entries->push_back(new RegistryEntry(start_menu, app_name)); | 518 entries->push_back(new RegistryEntry(start_menu, app_name)); |
513 } | 519 } |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
898 // Associates Chrome with |protocol| in the registry. This should not be | 904 // Associates Chrome with |protocol| in the registry. This should not be |
899 // required on Vista+ but since some applications still read these registry | 905 // required on Vista+ but since some applications still read these registry |
900 // keys directly, we have to do this on Vista+ as well. | 906 // keys directly, we have to do this on Vista+ as well. |
901 // See http://msdn.microsoft.com/library/aa767914.aspx for more details. | 907 // See http://msdn.microsoft.com/library/aa767914.aspx for more details. |
902 bool RegisterChromeAsDefaultProtocolClientXPStyle(BrowserDistribution* dist, | 908 bool RegisterChromeAsDefaultProtocolClientXPStyle(BrowserDistribution* dist, |
903 const string16& chrome_exe, | 909 const string16& chrome_exe, |
904 const string16& protocol) { | 910 const string16& protocol) { |
905 ScopedVector<RegistryEntry> entries; | 911 ScopedVector<RegistryEntry> entries; |
906 const string16 chrome_open(ShellUtil::GetChromeShellOpenCmd(chrome_exe)); | 912 const string16 chrome_open(ShellUtil::GetChromeShellOpenCmd(chrome_exe)); |
907 const string16 chrome_icon( | 913 const string16 chrome_icon( |
908 ShellUtil::FormatIconLocation(chrome_exe, dist->GetIconIndex())); | 914 ShellUtil::FormatIconLocation( |
915 chrome_exe, | |
916 BrowserDistribution::SHORTCUT_CHROME)); | |
909 RegistryEntry::GetXPStyleUserProtocolEntries(protocol, chrome_icon, | 917 RegistryEntry::GetXPStyleUserProtocolEntries(protocol, chrome_icon, |
910 chrome_open, &entries); | 918 chrome_open, &entries); |
911 // Change the default protocol handler for current user. | 919 // Change the default protocol handler for current user. |
912 if (!AddRegistryEntries(HKEY_CURRENT_USER, entries)) { | 920 if (!AddRegistryEntries(HKEY_CURRENT_USER, entries)) { |
913 LOG(ERROR) << "Could not make Chrome default protocol client (XP)."; | 921 LOG(ERROR) << "Could not make Chrome default protocol client (XP)."; |
914 return false; | 922 return false; |
915 } | 923 } |
916 | 924 |
917 return true; | 925 return true; |
918 } | 926 } |
919 | 927 |
920 // Returns |properties.shortcut_name| if the property is set, otherwise it | 928 // Returns |properties.shortcut_name| if the property is set, otherwise it |
921 // returns dist->GetAppShortcutName(). In any case, it makes sure the | 929 // returns dist->GetShortcutName(BrowserDistribution::SHORTCUT_CHROME). In any |
922 // return value is suffixed with ".lnk". | 930 // case, it makes sure the return value is suffixed with ".lnk". |
923 string16 ExtractShortcutNameFromProperties( | 931 string16 ExtractShortcutNameFromProperties( |
924 BrowserDistribution* dist, | 932 BrowserDistribution* dist, |
925 const ShellUtil::ShortcutProperties& properties) { | 933 const ShellUtil::ShortcutProperties& properties) { |
926 DCHECK(dist); | 934 DCHECK(dist); |
927 string16 shortcut_name; | 935 string16 shortcut_name; |
928 if (properties.has_shortcut_name()) | 936 if (properties.has_shortcut_name()) { |
929 shortcut_name = properties.shortcut_name; | 937 shortcut_name = properties.shortcut_name; |
930 else | 938 } else { |
931 shortcut_name = dist->GetAppShortCutName(); | 939 shortcut_name = |
940 dist->GetShortcutName(BrowserDistribution::SHORTCUT_CHROME); | |
941 } | |
932 | 942 |
933 if (!EndsWith(shortcut_name, installer::kLnkExt, false)) | 943 if (!EndsWith(shortcut_name, installer::kLnkExt, false)) |
934 shortcut_name.append(installer::kLnkExt); | 944 shortcut_name.append(installer::kLnkExt); |
935 | 945 |
936 return shortcut_name; | 946 return shortcut_name; |
937 } | 947 } |
938 | 948 |
939 // Converts ShellUtil::ShortcutOperation to the best-matching value in | 949 // Converts ShellUtil::ShortcutOperation to the best-matching value in |
940 // base::win::ShortcutOperation. | 950 // base::win::ShortcutOperation. |
941 base::win::ShortcutOperation TranslateShortcutOperation( | 951 base::win::ShortcutOperation TranslateShortcutOperation( |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1389 default: | 1399 default: |
1390 NOTREACHED(); | 1400 NOTREACHED(); |
1391 return false; | 1401 return false; |
1392 } | 1402 } |
1393 | 1403 |
1394 if (!PathService::Get(dir_key, path) || path->empty()) { | 1404 if (!PathService::Get(dir_key, path) || path->empty()) { |
1395 NOTREACHED() << dir_key; | 1405 NOTREACHED() << dir_key; |
1396 return false; | 1406 return false; |
1397 } | 1407 } |
1398 | 1408 |
1399 if (add_folder_for_dist) | 1409 if (add_folder_for_dist) { |
1400 *path = path->Append(dist->GetAppShortCutName()); | 1410 // TODO(calamity): Change to GetStartMenuShortcutSubfolder() once it is |
1411 // implemented across all distributions. | |
gab
2013/06/18 19:50:29
Isn't this the case already?
calamity
2013/06/27 01:27:44
Done.
| |
1412 *path = path->Append( | |
1413 dist->GetShortcutName(BrowserDistribution::SHORTCUT_CHROME)); | |
1414 } | |
1401 | 1415 |
1402 return true; | 1416 return true; |
1403 } | 1417 } |
1404 | 1418 |
1405 bool ShellUtil::CreateOrUpdateShortcut( | 1419 bool ShellUtil::CreateOrUpdateShortcut( |
1406 ShellUtil::ShortcutLocation location, | 1420 ShellUtil::ShortcutLocation location, |
1407 BrowserDistribution* dist, | 1421 BrowserDistribution* dist, |
1408 const ShellUtil::ShortcutProperties& properties, | 1422 const ShellUtil::ShortcutProperties& properties, |
1409 ShellUtil::ShortcutOperation operation) { | 1423 ShellUtil::ShortcutOperation operation) { |
1410 // Explicitly whitelist locations to which this is applicable. | 1424 // Explicitly whitelist locations to which this is applicable. |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1483 base::win::GetVersion() >= base::win::VERSION_WIN7) { | 1497 base::win::GetVersion() >= base::win::VERSION_WIN7) { |
1484 ret = base::win::TaskbarPinShortcutLink(chosen_path->value().c_str()); | 1498 ret = base::win::TaskbarPinShortcutLink(chosen_path->value().c_str()); |
1485 if (!ret) { | 1499 if (!ret) { |
1486 LOG(ERROR) << "Failed to pin " << chosen_path->value(); | 1500 LOG(ERROR) << "Failed to pin " << chosen_path->value(); |
1487 } | 1501 } |
1488 } | 1502 } |
1489 | 1503 |
1490 return ret; | 1504 return ret; |
1491 } | 1505 } |
1492 | 1506 |
1493 string16 ShellUtil::FormatIconLocation(const string16& icon_path, | 1507 string16 ShellUtil::FormatIconLocation( |
1494 int icon_index) { | 1508 const string16& icon_path, |
1509 BrowserDistribution::ShortcutEnum shortcut_enum) { | |
1510 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); | |
1495 string16 icon_string(icon_path); | 1511 string16 icon_string(icon_path); |
1496 icon_string.append(L","); | 1512 icon_string.append(L","); |
1497 icon_string.append(base::IntToString16(icon_index)); | 1513 icon_string.append(base::IntToString16(dist->GetIconIndex(shortcut_enum))); |
1498 return icon_string; | 1514 return icon_string; |
1499 } | 1515 } |
1500 | 1516 |
1501 string16 ShellUtil::GetChromeShellOpenCmd(const string16& chrome_exe) { | 1517 string16 ShellUtil::GetChromeShellOpenCmd(const string16& chrome_exe) { |
1502 return L"\"" + chrome_exe + L"\" -- \"%1\""; | 1518 return L"\"" + chrome_exe + L"\" -- \"%1\""; |
1503 } | 1519 } |
1504 | 1520 |
1505 string16 ShellUtil::GetChromeDelegateCommand(const string16& chrome_exe) { | 1521 string16 ShellUtil::GetChromeDelegateCommand(const string16& chrome_exe) { |
1506 return L"\"" + chrome_exe + L"\" -- %*"; | 1522 return L"\"" + chrome_exe + L"\" -- %*"; |
1507 } | 1523 } |
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2080 // are any left...). | 2096 // are any left...). |
2081 if (free_bits >= 8 && next_byte_index < size) { | 2097 if (free_bits >= 8 && next_byte_index < size) { |
2082 free_bits -= 8; | 2098 free_bits -= 8; |
2083 bit_stream += bytes[next_byte_index++] << free_bits; | 2099 bit_stream += bytes[next_byte_index++] << free_bits; |
2084 } | 2100 } |
2085 } | 2101 } |
2086 | 2102 |
2087 DCHECK_EQ(ret.length(), encoded_length); | 2103 DCHECK_EQ(ret.length(), encoded_length); |
2088 return ret; | 2104 return ret; |
2089 } | 2105 } |
OLD | NEW |