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

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

Issue 7624031: Treat files downloaded from the address bar as "always safe" (including extensions per discussion... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 4 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
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/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 request_info.routing_id = request.requestorID(); 406 request_info.routing_id = request.requestorID();
407 request_info.download_to_file = request.downloadToFile(); 407 request_info.download_to_file = request.downloadToFile();
408 request_info.has_user_gesture = request.hasUserGesture(); 408 request_info.has_user_gesture = request.hasUserGesture();
409 request_info.frame_id = -1; 409 request_info.frame_id = -1;
410 request_info.is_main_frame = false; 410 request_info.is_main_frame = false;
411 if (request.extraData()) { 411 if (request.extraData()) {
412 RequestExtraData* extra_data = 412 RequestExtraData* extra_data =
413 static_cast<RequestExtraData*>(request.extraData()); 413 static_cast<RequestExtraData*>(request.extraData());
414 request_info.frame_id = extra_data->frame_identifier(); 414 request_info.frame_id = extra_data->frame_identifier();
415 request_info.is_main_frame = extra_data->is_main_frame(); 415 request_info.is_main_frame = extra_data->is_main_frame();
416 request_info.transition_type = extra_data->transition_type();
416 } 417 }
417 bridge_.reset(ResourceLoaderBridge::Create(request_info)); 418 bridge_.reset(ResourceLoaderBridge::Create(request_info));
418 419
419 if (!request.httpBody().isNull()) { 420 if (!request.httpBody().isNull()) {
420 // GET and HEAD requests shouldn't have http bodies. 421 // GET and HEAD requests shouldn't have http bodies.
421 DCHECK(method != "GET" && method != "HEAD"); 422 DCHECK(method != "GET" && method != "HEAD");
422 const WebHTTPBody& httpBody = request.httpBody(); 423 const WebHTTPBody& httpBody = request.httpBody();
423 size_t i = 0; 424 size_t i = 0;
424 WebHTTPBody::Element element; 425 WebHTTPBody::Element element;
425 while (httpBody.elementAt(i++, element)) { 426 while (httpBody.elementAt(i++, element)) {
(...skipping 297 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
« webkit/glue/resource_loader_bridge.h ('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