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

Side by Side Diff: chrome/installer/util/shell_util.cc

Issue 11035024: ChromiumHTM instead of ChromiumHTML to respect progid restriction of 39 characters INCLUDING the NU… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 940 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698