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

Side by Side Diff: content/browser/loader/resource_loader.cc

Issue 12645004: Add Resource Handler for creating Streams to forward to extensions (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Code review fixes Created 7 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "content/browser/loader/resource_loader.h" 5 #include "content/browser/loader/resource_loader.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "content/browser/child_process_security_policy_impl.h" 10 #include "content/browser/child_process_security_policy_impl.h"
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 } 463 }
464 464
465 void ResourceLoader::CancelRequestInternal(int error, bool from_renderer) { 465 void ResourceLoader::CancelRequestInternal(int error, bool from_renderer) {
466 VLOG(1) << "CancelRequestInternal: " << request_->url().spec(); 466 VLOG(1) << "CancelRequestInternal: " << request_->url().spec();
467 467
468 ResourceRequestInfoImpl* info = GetRequestInfo(); 468 ResourceRequestInfoImpl* info = GetRequestInfo();
469 469
470 // WebKit will send us a cancel for downloads since it no longer handles 470 // WebKit will send us a cancel for downloads since it no longer handles
471 // them. In this case, ignore the cancel since we handle downloads in the 471 // them. In this case, ignore the cancel since we handle downloads in the
472 // browser. 472 // browser.
473 if (from_renderer && info->is_download()) 473 if (from_renderer && (info->is_download() || info->is_stream()))
474 return; 474 return;
475 475
476 // TODO(darin): Perhaps we should really be looking to see if the status is 476 // TODO(darin): Perhaps we should really be looking to see if the status is
477 // IO_PENDING? 477 // IO_PENDING?
478 bool was_pending = request_->is_pending(); 478 bool was_pending = request_->is_pending();
479 479
480 if (login_delegate_) { 480 if (login_delegate_) {
481 login_delegate_->OnRequestCancelled(); 481 login_delegate_->OnRequestCancelled();
482 login_delegate_ = NULL; 482 login_delegate_ = NULL;
483 } 483 }
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 // we resume. 646 // we resume.
647 deferred_stage_ = DEFERRED_FINISH; 647 deferred_stage_ = DEFERRED_FINISH;
648 } 648 }
649 } 649 }
650 650
651 void ResourceLoader::CallDidFinishLoading() { 651 void ResourceLoader::CallDidFinishLoading() {
652 delegate_->DidFinishLoading(this); 652 delegate_->DidFinishLoading(this);
653 } 653 }
654 654
655 } // namespace content 655 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698