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

Unified Diff: content/child/web_url_loader_impl.cc

Issue 2674953003: Only generate suggested filenames when actually dragging an image. (Closed)
Patch Set: rebase Created 3 years, 10 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 | « content/browser/web_contents/web_drag_source_mac.mm ('k') | content/common/drag_traits.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/web_url_loader_impl.cc
diff --git a/content/child/web_url_loader_impl.cc b/content/child/web_url_loader_impl.cc
index e80f946cb3e722d087a8bad2a5c9f8a8e9bb4dab..1d70521d077f2adf8354a17dd94c4bcfca1cac34 100644
--- a/content/child/web_url_loader_impl.cc
+++ b/content/child/web_url_loader_impl.cc
@@ -1164,19 +1164,6 @@ void WebURLLoaderImpl::PopulateURLResponse(const GURL& url,
response->setHTTPStatusCode(headers->response_code());
response->setHTTPStatusText(WebString::fromLatin1(headers->GetStatusText()));
- // TODO(darin): We should leverage HttpResponseHeaders for this, and this
- // should be using the same code as ResourceDispatcherHost.
- // TODO(jungshik): Figure out the actual value of the referrer charset and
- // pass it to GetSuggestedFilename.
- std::string value;
- headers->EnumerateHeader(NULL, "content-disposition", &value);
- response->setSuggestedFileName(blink::WebString::fromUTF16(
- net::GetSuggestedFilename(url, value,
- std::string(), // referrer_charset
- std::string(), // suggested_name
- std::string(), // mime_type
- std::string()))); // default_name
-
Time time_val;
if (headers->GetLastModifiedValue(&time_val))
response->setLastModifiedDate(time_val.ToDoubleT());
@@ -1184,6 +1171,7 @@ void WebURLLoaderImpl::PopulateURLResponse(const GURL& url,
// Build up the header map.
size_t iter = 0;
std::string name;
+ std::string value;
while (headers->EnumerateHeaderLines(&iter, &name, &value)) {
response->addHTTPHeaderField(WebString::fromLatin1(name),
WebString::fromLatin1(value));
« no previous file with comments | « content/browser/web_contents/web_drag_source_mac.mm ('k') | content/common/drag_traits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698