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

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

Issue 1403001: Modifying the "dangerous download" algorithm. (Closed)
Patch Set: Adding .sys and .drv as Dangerous extensions Created 10 years 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
« no previous file with comments | « webkit/glue/resource_loader_bridge.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) 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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 request_info.referrer = referrer_url; 425 request_info.referrer = referrer_url;
426 request_info.frame_origin = frame_origin; 426 request_info.frame_origin = frame_origin;
427 request_info.main_frame_origin = main_frame_origin; 427 request_info.main_frame_origin = main_frame_origin;
428 request_info.headers = flattener.GetBuffer(); 428 request_info.headers = flattener.GetBuffer();
429 request_info.load_flags = load_flags; 429 request_info.load_flags = load_flags;
430 request_info.requestor_pid = requestor_pid; 430 request_info.requestor_pid = requestor_pid;
431 request_info.request_type = FromTargetType(request.targetType()); 431 request_info.request_type = FromTargetType(request.targetType());
432 request_info.appcache_host_id = request.appCacheHostID(); 432 request_info.appcache_host_id = request.appCacheHostID();
433 request_info.routing_id = request.requestorID(); 433 request_info.routing_id = request.requestorID();
434 request_info.download_to_file = request.downloadToFile(); 434 request_info.download_to_file = request.downloadToFile();
435 request_info.has_user_gesture = request.hasUserGesture();
435 bridge_.reset(ResourceLoaderBridge::Create(request_info)); 436 bridge_.reset(ResourceLoaderBridge::Create(request_info));
436 437
437 if (!request.httpBody().isNull()) { 438 if (!request.httpBody().isNull()) {
438 // GET and HEAD requests shouldn't have http bodies. 439 // GET and HEAD requests shouldn't have http bodies.
439 DCHECK(method != "GET" && method != "HEAD"); 440 DCHECK(method != "GET" && method != "HEAD");
440 const WebHTTPBody& httpBody = request.httpBody(); 441 const WebHTTPBody& httpBody = request.httpBody();
441 size_t i = 0; 442 size_t i = 0;
442 WebHTTPBody::Element element; 443 WebHTTPBody::Element element;
443 while (httpBody.elementAt(i++, element)) { 444 while (httpBody.elementAt(i++, element)) {
444 switch (element.type) { 445 switch (element.type) {
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 724
724 void WebURLLoaderImpl::cancel() { 725 void WebURLLoaderImpl::cancel() {
725 context_->Cancel(); 726 context_->Cancel();
726 } 727 }
727 728
728 void WebURLLoaderImpl::setDefersLoading(bool value) { 729 void WebURLLoaderImpl::setDefersLoading(bool value) {
729 context_->SetDefersLoading(value); 730 context_->SetDefersLoading(value);
730 } 731 }
731 732
732 } // namespace webkit_glue 733 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/glue/resource_loader_bridge.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698