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

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

Issue 1403001: Modifying the "dangerous download" algorithm. (Closed)
Patch Set: Removing unnecessary namespace qualifier Created 10 years, 1 month 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 request_info.referrer = referrer_url; 421 request_info.referrer = referrer_url;
422 request_info.frame_origin = frame_origin; 422 request_info.frame_origin = frame_origin;
423 request_info.main_frame_origin = main_frame_origin; 423 request_info.main_frame_origin = main_frame_origin;
424 request_info.headers = flattener.GetBuffer(); 424 request_info.headers = flattener.GetBuffer();
425 request_info.load_flags = load_flags; 425 request_info.load_flags = load_flags;
426 request_info.requestor_pid = requestor_pid; 426 request_info.requestor_pid = requestor_pid;
427 request_info.request_type = FromTargetType(request.targetType()); 427 request_info.request_type = FromTargetType(request.targetType());
428 request_info.appcache_host_id = request.appCacheHostID(); 428 request_info.appcache_host_id = request.appCacheHostID();
429 request_info.routing_id = request.requestorID(); 429 request_info.routing_id = request.requestorID();
430 request_info.download_to_file = request.downloadToFile(); 430 request_info.download_to_file = request.downloadToFile();
431 request_info.has_user_gesture = request.hasUserGesture();
431 bridge_.reset(ResourceLoaderBridge::Create(request_info)); 432 bridge_.reset(ResourceLoaderBridge::Create(request_info));
432 433
433 if (!request.httpBody().isNull()) { 434 if (!request.httpBody().isNull()) {
434 // GET and HEAD requests shouldn't have http bodies. 435 // GET and HEAD requests shouldn't have http bodies.
435 DCHECK(method != "GET" && method != "HEAD"); 436 DCHECK(method != "GET" && method != "HEAD");
436 const WebHTTPBody& httpBody = request.httpBody(); 437 const WebHTTPBody& httpBody = request.httpBody();
437 size_t i = 0; 438 size_t i = 0;
438 WebHTTPBody::Element element; 439 WebHTTPBody::Element element;
439 while (httpBody.elementAt(i++, element)) { 440 while (httpBody.elementAt(i++, element)) {
440 switch (element.type) { 441 switch (element.type) {
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 720
720 void WebURLLoaderImpl::cancel() { 721 void WebURLLoaderImpl::cancel() {
721 context_->Cancel(); 722 context_->Cancel();
722 } 723 }
723 724
724 void WebURLLoaderImpl::setDefersLoading(bool value) { 725 void WebURLLoaderImpl::setDefersLoading(bool value) {
725 context_->SetDefersLoading(value); 726 context_->SetDefersLoading(value);
726 } 727 }
727 728
728 } // namespace webkit_glue 729 } // namespace webkit_glue
OLDNEW
« chrome/browser/download/download_exe.cc ('K') | « webkit/glue/resource_loader_bridge.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698