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

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

Issue 2850023: Fix a crash when the content type of a multipart request (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: cancel -> Cancel Created 10 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
« no previous file with comments | « webkit/glue/multipart_response_delegate.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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 } 263 }
264 264
265 void WebURLLoaderImpl::Context::Cancel() { 265 void WebURLLoaderImpl::Context::Cancel() {
266 // The bridge will still send OnCompletedRequest, which will Release() us, so 266 // The bridge will still send OnCompletedRequest, which will Release() us, so
267 // we don't do that here. 267 // we don't do that here.
268 if (bridge_.get()) 268 if (bridge_.get())
269 bridge_->Cancel(); 269 bridge_->Cancel();
270 270
271 // Ensure that we do not notify the multipart delegate anymore as it has 271 // Ensure that we do not notify the multipart delegate anymore as it has
272 // its own pointer to the client. 272 // its own pointer to the client.
273 multipart_delegate_.reset(); 273 if (multipart_delegate_.get())
274 multipart_delegate_->Cancel();
274 275
275 // Do not make any further calls to the client. 276 // Do not make any further calls to the client.
276 client_ = NULL; 277 client_ = NULL;
277 loader_ = NULL; 278 loader_ = NULL;
278 } 279 }
279 280
280 void WebURLLoaderImpl::Context::SetDefersLoading(bool value) { 281 void WebURLLoaderImpl::Context::SetDefersLoading(bool value) {
281 if (bridge_.get()) 282 if (bridge_.get())
282 bridge_->SetDefersLoading(value); 283 bridge_->SetDefersLoading(value);
283 } 284 }
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 651
651 void WebURLLoaderImpl::cancel() { 652 void WebURLLoaderImpl::cancel() {
652 context_->Cancel(); 653 context_->Cancel();
653 } 654 }
654 655
655 void WebURLLoaderImpl::setDefersLoading(bool value) { 656 void WebURLLoaderImpl::setDefersLoading(bool value) {
656 context_->SetDefersLoading(value); 657 context_->SetDefersLoading(value);
657 } 658 }
658 659
659 } // namespace webkit_glue 660 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/glue/multipart_response_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698