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

Unified Diff: content/child/ftp_directory_listing_response_delegate.cc

Issue 2168003003: Replace ICU encoding detection with CED (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments/add datafiles back Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: content/child/ftp_directory_listing_response_delegate.cc
diff --git a/content/child/ftp_directory_listing_response_delegate.cc b/content/child/ftp_directory_listing_response_delegate.cc
index 73f3914beae8d73fee2101fdf81d4bab86f05bad..dfcfa569b4318d8076731b413c4e9e850d161b2b 100644
--- a/content/child/ftp_directory_listing_response_delegate.cc
+++ b/content/child/ftp_directory_listing_response_delegate.cc
@@ -9,7 +9,7 @@
#include <vector>
-#include "base/i18n/icu_encoding_detection.h"
+#include "base/i18n/encoding_detection.h"
#include "base/i18n/icu_string_conversions.h"
#include "base/logging.h"
#include "base/strings/string_util.h"
@@ -40,7 +40,7 @@ base::string16 ConvertPathToUTF16(const std::string& path) {
// Try detecting the encoding. The sample is rather small though, so it may
// fail.
std::string encoding;
- if (base::DetectEncoding(path, &encoding) && !encoding.empty()) {
+ if (base::DetectEncoding(path, &encoding) && encoding != "US-ASCII") {
base::string16 path_utf16;
if (base::CodepageToUTF16(path, encoding.c_str(),
base::OnStringConversionError::SUBSTITUTE,

Powered by Google App Engine
This is Rietveld 408576698