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 940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
951 L"Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\" | 951 L"Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\" |
952 L"http\\UserChoice"; | 952 L"http\\UserChoice"; |
953 const wchar_t* ShellUtil::kAppPathsRegistryKey = | 953 const wchar_t* ShellUtil::kAppPathsRegistryKey = |
954 L"Software\\Microsoft\\Windows\\CurrentVersion\\App Paths"; | 954 L"Software\\Microsoft\\Windows\\CurrentVersion\\App Paths"; |
955 const wchar_t* ShellUtil::kAppPathsRegistryPathName = L"Path"; | 955 const wchar_t* ShellUtil::kAppPathsRegistryPathName = L"Path"; |
956 | 956 |
957 #if defined(GOOGLE_CHROME_BUILD) | 957 #if defined(GOOGLE_CHROME_BUILD) |
958 const wchar_t* ShellUtil::kChromeHTMLProgId = L"ChromeHTML"; | 958 const wchar_t* ShellUtil::kChromeHTMLProgId = L"ChromeHTML"; |
959 const wchar_t* ShellUtil::kChromeHTMLProgIdDesc = L"Chrome HTML Document"; | 959 const wchar_t* ShellUtil::kChromeHTMLProgIdDesc = L"Chrome HTML Document"; |
960 #else | 960 #else |
961 const wchar_t* ShellUtil::kChromeHTMLProgId = L"ChromiumHTML"; | 961 // This used to be "ChromiumHTML", but was forced to become "ChromiumHTM" |
| 962 // because of http://crbug.com/153349 as with the '.' and 26 characters suffix |
| 963 // added on user-level installs, the generated progid for Chromium was 39 |
| 964 // characters long which, according to MSDN ( |
| 965 // http://msdn.microsoft.com/library/aa911706.aspx), is the maximum length |
| 966 // for a progid. It was however determined through experimentation that the 39 |
| 967 // character limit mentioned on MSDN includes the NULL character... |
| 968 const wchar_t* ShellUtil::kChromeHTMLProgId = L"ChromiumHTM"; |
962 const wchar_t* ShellUtil::kChromeHTMLProgIdDesc = L"Chromium HTML Document"; | 969 const wchar_t* ShellUtil::kChromeHTMLProgIdDesc = L"Chromium HTML Document"; |
963 #endif | 970 #endif |
964 | 971 |
965 const wchar_t* ShellUtil::kFileAssociations[] = {L".htm", L".html", L".shtml", | 972 const wchar_t* ShellUtil::kFileAssociations[] = {L".htm", L".html", L".shtml", |
966 L".xht", L".xhtml", NULL}; | 973 L".xht", L".xhtml", NULL}; |
967 const wchar_t* ShellUtil::kBrowserProtocolAssociations[] = {L"ftp", L"http", | 974 const wchar_t* ShellUtil::kBrowserProtocolAssociations[] = {L"ftp", L"http", |
968 L"https", NULL}; | 975 L"https", NULL}; |
969 const wchar_t* ShellUtil::kPotentialProtocolAssociations[] = {L"ftp", L"http", | 976 const wchar_t* ShellUtil::kPotentialProtocolAssociations[] = {L"ftp", L"http", |
970 L"https", L"irc", L"mailto", L"mms", L"news", L"nntp", L"sms", L"smsto", | 977 L"https", L"irc", L"mailto", L"mms", L"news", L"nntp", L"sms", L"smsto", |
971 L"tel", L"urn", L"webcal", NULL}; | 978 L"tel", L"urn", L"webcal", NULL}; |
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1763 // are any left...). | 1770 // are any left...). |
1764 if (free_bits >= 8 && next_byte_index < size) { | 1771 if (free_bits >= 8 && next_byte_index < size) { |
1765 free_bits -= 8; | 1772 free_bits -= 8; |
1766 bit_stream += bytes[next_byte_index++] << free_bits; | 1773 bit_stream += bytes[next_byte_index++] << free_bits; |
1767 } | 1774 } |
1768 } | 1775 } |
1769 | 1776 |
1770 DCHECK_EQ(ret.length(), encoded_length); | 1777 DCHECK_EQ(ret.length(), encoded_length); |
1771 return ret; | 1778 return ret; |
1772 } | 1779 } |
OLD | NEW |