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

Side by Side Diff: webkit/glue/weburlloader_impl.cc

Issue 6241001: wstring: make net::GetSuggestedFilename return utf-16 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed Created 9 years, 11 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 | « ui/base/dragdrop/os_exchange_data_provider_win.cc ('k') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // An implementation of WebURLLoader in terms of ResourceLoaderBridge. 5 // An implementation of WebURLLoader in terms of ResourceLoaderBridge.
6 6
7 #include "webkit/glue/weburlloader_impl.h" 7 #include "webkit/glue/weburlloader_impl.h"
8 8
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 237
238 response->setHTTPStatusCode(headers->response_code()); 238 response->setHTTPStatusCode(headers->response_code());
239 response->setHTTPStatusText(WebString::fromUTF8(headers->GetStatusText())); 239 response->setHTTPStatusText(WebString::fromUTF8(headers->GetStatusText()));
240 240
241 // TODO(darin): We should leverage HttpResponseHeaders for this, and this 241 // TODO(darin): We should leverage HttpResponseHeaders for this, and this
242 // should be using the same code as ResourceDispatcherHost. 242 // should be using the same code as ResourceDispatcherHost.
243 // TODO(jungshik): Figure out the actual value of the referrer charset and 243 // TODO(jungshik): Figure out the actual value of the referrer charset and
244 // pass it to GetSuggestedFilename. 244 // pass it to GetSuggestedFilename.
245 std::string value; 245 std::string value;
246 if (headers->EnumerateHeader(NULL, "content-disposition", &value)) { 246 if (headers->EnumerateHeader(NULL, "content-disposition", &value)) {
247 response->setSuggestedFileName(FilePathToWebString( 247 response->setSuggestedFileName(
248 net::GetSuggestedFilename(url, value, "", FilePath()))); 248 net::GetSuggestedFilename(url, value, "", string16()));
249 } 249 }
250 250
251 Time time_val; 251 Time time_val;
252 if (headers->GetLastModifiedValue(&time_val)) 252 if (headers->GetLastModifiedValue(&time_val))
253 response->setLastModifiedDate(time_val.ToDoubleT()); 253 response->setLastModifiedDate(time_val.ToDoubleT());
254 254
255 // Build up the header map. 255 // Build up the header map.
256 void* iter = NULL; 256 void* iter = NULL;
257 std::string name; 257 std::string name;
258 while (headers->EnumerateHeaderLines(&iter, &name, &value)) { 258 while (headers->EnumerateHeaderLines(&iter, &name, &value)) {
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 750
751 void WebURLLoaderImpl::cancel() { 751 void WebURLLoaderImpl::cancel() {
752 context_->Cancel(); 752 context_->Cancel();
753 } 753 }
754 754
755 void WebURLLoaderImpl::setDefersLoading(bool value) { 755 void WebURLLoaderImpl::setDefersLoading(bool value) {
756 context_->SetDefersLoading(value); 756 context_->SetDefersLoading(value);
757 } 757 }
758 758
759 } // namespace webkit_glue 759 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « ui/base/dragdrop/os_exchange_data_provider_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698