diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-20 15:24:22 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-20 15:24:22 +0000 |
commit | 3fb484784aa97b89c6f11fc9da035fdfcf58da13 (patch) | |
tree | f8396e62239fa0970dd8e73b71672f5a8f19d03f /chrome | |
parent | 2236bd1f2177a38f67c835a9a2ec6f6f3d26aeb3 (diff) | |
download | chromium_src-3fb484784aa97b89c6f11fc9da035fdfcf58da13.zip chromium_src-3fb484784aa97b89c6f11fc9da035fdfcf58da13.tar.gz chromium_src-3fb484784aa97b89c6f11fc9da035fdfcf58da13.tar.bz2 |
Remove the fallback Mozilla code for parsing FTP LIST response.
The new parser seems to be compatible enough to do that. The Mozilla code was very
helpful in the process of developing the new parser.
Also add UI encouraging users to submit bug reports when we can't parse the listings,
and an option to see the raw data sent by the server. This should allow us to fix
remaining compatibility problems with very rare listing types or variations.
When ?raw is found at the end of an FTP url and it is a directory listing, the parsing logic is bypassed and the data is displayed as-is with text/plain MIME type.
TEST=none
BUG=25520
Review URL: http://codereview.chromium.org/549053
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36632 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/app/generated_resources.grd | 3 | ||||
-rw-r--r-- | chrome/browser/resources/about_credits.html | 36 | ||||
-rw-r--r-- | chrome/common/net/net_resource_provider.cc | 4 |
3 files changed, 7 insertions, 36 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index f1ae5b0..2b8bdb5 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd @@ -5564,6 +5564,9 @@ Keep your key file in a safe place. You will need it to create new versions of y <message name="IDS_DIRECTORY_LISTING_DATE_MODIFIED" desc="When viewing a local directory, this is the text for the column above the last modified dates."> Date Modified </message> + <message name="IDS_DIRECTORY_LISTING_PARSING_ERROR_BOX_TEXT" desc="Text to show in a box when we failed to parse FTP directory listing."> + Oh, no! This server is sending data <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> can't understand. Please <ph name="BEGIN_LINK"><a href="http://code.google.com/p/chromium/issues/entry"></ph>report a bug<ph name="END_LINK"></a></ph>, and include the <ph name="BEGIN2_LINK"><a href="LOCATION"></ph>raw listing<ph name="END2_LINK"></a></ph>. + </message> <!-- Saving Page--> <message name="IDS_SAVE_PAGE_DESC_HTML_ONLY" desc="In the Save Page dialog, the description of saving only the HTML of a web page."> diff --git a/chrome/browser/resources/about_credits.html b/chrome/browser/resources/about_credits.html index ea3fdd7..f88d7be 100644 --- a/chrome/browser/resources/about_credits.html +++ b/chrome/browser/resources/about_credits.html @@ -1323,41 +1323,5 @@ along with FFmpeg; if not, write to:</p> </div> </div> -<!-- ParseFTPList --> -<div class="product"> -<span class="title">ParseFTPList</span> -<a class="show" href="#" onclick="return toggle(this);">show license</a> -<span class="homepage"><a href="http://mxr.mozilla.org/mozilla-central/source/netwerk/streamconv/converters/ParseFTPList.cpp">homepage</a></span> -<div class="licence"> -<h3>ParseFTPList is licensed as follows:</h3> -<p>The contents of this file are subject to the Mozilla Public License Version -1.1 (the "License"); you may not use this file except in compliance with -the License. You may obtain a copy of the License at -http://www.mozilla.org/MPL/ -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -for the specific language governing rights and limitations under the -License.</p> -<p>The Original Code is mozilla.org Code.</p> -<p>The Initial Developer of the Original Code is -Cyrus Patel <cyp@fb14.uni-mainz.de>. -Portions created by the Initial Developer are Copyright (C) 2002 -the Initial Developer. All Rights Reserved.</p> -<p>Contributor(s): -Doug Turner <dougt@netscape.com></p> -<p>Alternatively, the contents of this file may be used under the terms of -either the GNU General Public License Version 2 or later (the "GPL"), or -the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -in which case the provisions of the GPL or the LGPL are applicable instead -of those above. If you wish to allow use of your version of this file only -under the terms of either the GPL or the LGPL, and not to allow others to -use your version of this file under the terms of the MPL, indicate your -decision by deleting the provisions above and replace them with the notice -and other provisions required by the GPL or the LGPL. If you do not delete -the provisions above, a recipient may use your version of this file under -the terms of any one of the MPL, the GPL or the LGPL.</p> -</div> -</div> - </body> </html> diff --git a/chrome/common/net/net_resource_provider.cc b/chrome/common/net/net_resource_provider.cc index ef86ac3..6992470 100644 --- a/chrome/common/net/net_resource_provider.cc +++ b/chrome/common/net/net_resource_provider.cc @@ -11,6 +11,7 @@ #include "base/string_piece.h" #include "base/values.h" #include "chrome/common/jstemplate_builder.h" +#include "grit/chromium_strings.h" #include "grit/generated_resources.h" #include "grit/net_resources.h" @@ -34,6 +35,9 @@ struct LazyDirectoryListerCacher { l10n_util::GetString(IDS_DIRECTORY_LISTING_SIZE)); value.SetString(L"headerDateModified", l10n_util::GetString(IDS_DIRECTORY_LISTING_DATE_MODIFIED)); + value.SetString(L"listingParsingErrorBoxText", + l10n_util::GetStringF(IDS_DIRECTORY_LISTING_PARSING_ERROR_BOX_TEXT, + l10n_util::GetString(IDS_PRODUCT_NAME))); html_data = jstemplate_builder::GetI18nTemplateHtml( ResourceBundle::GetSharedInstance().GetRawDataResource( IDR_DIR_HEADER_HTML), |