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

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

Issue 6995118: Set isCancelling flag on WebURLError when request has net::ERR_ABORTED as an error_code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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
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 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 if (status.status() != net::URLRequestStatus::SUCCESS) { 647 if (status.status() != net::URLRequestStatus::SUCCESS) {
648 int error_code; 648 int error_code;
649 if (status.status() == net::URLRequestStatus::HANDLED_EXTERNALLY) { 649 if (status.status() == net::URLRequestStatus::HANDLED_EXTERNALLY) {
650 // By marking this request as aborted we insure that we don't navigate 650 // By marking this request as aborted we insure that we don't navigate
651 // to an error page. 651 // to an error page.
652 error_code = net::ERR_ABORTED; 652 error_code = net::ERR_ABORTED;
653 } else { 653 } else {
654 error_code = status.os_error(); 654 error_code = status.os_error();
655 } 655 }
656 WebURLError error; 656 WebURLError error;
657 if (status.status() == net::URLRequestStatus::CANCELED)
658 error.isCanceling = true;
darin (slow to review) 2011/06/15 16:35:03 The net error code ERR_ABORTED is ordinarily used
darin (slow to review) 2011/06/15 16:48:44 OK... after some more coffee, I now understand wha
657 error.domain = WebString::fromUTF8(net::kErrorDomain); 659 error.domain = WebString::fromUTF8(net::kErrorDomain);
658 error.reason = error_code; 660 error.reason = error_code;
659 error.unreachableURL = request_.url(); 661 error.unreachableURL = request_.url();
660 client_->didFail(loader_, error); 662 client_->didFail(loader_, error);
661 } else { 663 } else {
662 client_->didFinishLoading(loader_, completion_time.ToDoubleT()); 664 client_->didFinishLoading(loader_, completion_time.ToDoubleT());
663 } 665 }
664 } 666 }
665 667
666 // Temporary logging, see site_isolation_metrics.h/cc 668 // Temporary logging, see site_isolation_metrics.h/cc
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 759
758 void WebURLLoaderImpl::cancel() { 760 void WebURLLoaderImpl::cancel() {
759 context_->Cancel(); 761 context_->Cancel();
760 } 762 }
761 763
762 void WebURLLoaderImpl::setDefersLoading(bool value) { 764 void WebURLLoaderImpl::setDefersLoading(bool value) {
763 context_->SetDefersLoading(value); 765 context_->SetDefersLoading(value);
764 } 766 }
765 767
766 } // namespace webkit_glue 768 } // namespace webkit_glue
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698