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

Unified Diff: net/base/net_util.cc

Issue 2775002: revert r49217, which caused unit test failures on win: (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 6 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
« no previous file with comments | « chrome/browser/gtk/download_item_gtk.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/net_util.cc
diff --git a/net/base/net_util.cc b/net/base/net_util.cc
index 490feab8f78f2c5d1b4b57167cea4fa22185ce29..60f626d44cec4bbd9c223475485c35f912923523 100644
--- a/net/base/net_util.cc
+++ b/net/base/net_util.cc
@@ -1081,7 +1081,7 @@ FilePath GetSuggestedFilename(const GURL& url,
}
const std::string filename_from_cd = GetFileNameFromCD(content_disposition,
- referrer_charset);
+ referrer_charset);
#if defined(OS_WIN)
FilePath::StringType filename = UTF8ToWide(filename_from_cd);
#elif defined(OS_POSIX)
@@ -1102,17 +1102,10 @@ FilePath GetSuggestedFilename(const GURL& url,
const std::string unescaped_url_filename = UnescapeURLComponent(
url.ExtractFileName(),
UnescapeRule::SPACES | UnescapeRule::URL_SPECIAL_CHARS);
-
- // The URL should be escaped UTF-8, but may not be.
- std::string decoded_filename;
- bool ignore;
- DecodeWord(unescaped_url_filename, referrer_charset, &ignore,
- &decoded_filename);
-
#if defined(OS_WIN)
- filename = UTF8ToWide(decoded_filename);
+ filename = UTF8ToWide(unescaped_url_filename);
#elif defined(OS_POSIX)
- filename = decoded_filename;
+ filename = unescaped_url_filename;
#endif
}
}
« no previous file with comments | « chrome/browser/gtk/download_item_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698