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

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

Issue 15859009: Revert 202821 "Protect WebURLLoaderImpl::Context while receiving..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 6 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 | « trunk/src/content/test/data/error-body-no-crash.html ('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) 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 // 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/bind.h" 9 #include "base/bind.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 if (info.mime_type == "text/vnd.chromium.ftp-dir") { 630 if (info.mime_type == "text/vnd.chromium.ftp-dir") {
631 if (show_raw_listing) { 631 if (show_raw_listing) {
632 // Set the MIME type to plain text to prevent any active content. 632 // Set the MIME type to plain text to prevent any active content.
633 response.setMIMEType("text/plain"); 633 response.setMIMEType("text/plain");
634 } else { 634 } else {
635 // We're going to produce a parsed listing in HTML. 635 // We're going to produce a parsed listing in HTML.
636 response.setMIMEType("text/html"); 636 response.setMIMEType("text/html");
637 } 637 }
638 } 638 }
639 639
640 scoped_refptr<Context> protect(this);
641 client_->didReceiveResponse(loader_, response); 640 client_->didReceiveResponse(loader_, response);
642 641
643 // We may have been cancelled after didReceiveResponse, which would leave us 642 // We may have been cancelled after didReceiveResponse, which would leave us
644 // without a client and therefore without much need to do further handling. 643 // without a client and therefore without much need to do further handling.
645 if (!client_) 644 if (!client_)
646 return; 645 return;
647 646
648 DCHECK(!ftp_listing_delegate_.get()); 647 DCHECK(!ftp_listing_delegate_.get());
649 DCHECK(!multipart_delegate_.get()); 648 DCHECK(!multipart_delegate_.get());
650 if (info.headers && info.mime_type == "multipart/x-mixed-replace") { 649 if (info.headers && info.mime_type == "multipart/x-mixed-replace") {
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 845
847 void WebURLLoaderImpl::setDefersLoading(bool value) { 846 void WebURLLoaderImpl::setDefersLoading(bool value) {
848 context_->SetDefersLoading(value); 847 context_->SetDefersLoading(value);
849 } 848 }
850 849
851 void WebURLLoaderImpl::didChangePriority(WebURLRequest::Priority new_priority) { 850 void WebURLLoaderImpl::didChangePriority(WebURLRequest::Priority new_priority) {
852 context_->DidChangePriority(new_priority); 851 context_->DidChangePriority(new_priority);
853 } 852 }
854 853
855 } // namespace webkit_glue 854 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « trunk/src/content/test/data/error-body-no-crash.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698