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

Side by Side Diff: content/common/net/url_fetcher.cc

Issue 8054013: Recover from bad proxy settings pointing to non-proxy servers that reply anyway. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased, reviewed Created 9 years, 2 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 | « content/common/net/url_fetcher.h ('k') | content/test/test_url_fetcher_factory.h » ('j') | 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) 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 #include "content/common/net/url_fetcher.h" 5 #include "content/common/net/url_fetcher.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after
1000 void URLFetcher::SaveResponseToTemporaryFile( 1000 void URLFetcher::SaveResponseToTemporaryFile(
1001 scoped_refptr<base::MessageLoopProxy> file_message_loop_proxy) { 1001 scoped_refptr<base::MessageLoopProxy> file_message_loop_proxy) {
1002 core_->file_message_loop_proxy_ = file_message_loop_proxy; 1002 core_->file_message_loop_proxy_ = file_message_loop_proxy;
1003 core_->response_destination_ = TEMP_FILE; 1003 core_->response_destination_ = TEMP_FILE;
1004 } 1004 }
1005 1005
1006 net::HttpResponseHeaders* URLFetcher::response_headers() const { 1006 net::HttpResponseHeaders* URLFetcher::response_headers() const {
1007 return core_->response_headers_; 1007 return core_->response_headers_;
1008 } 1008 }
1009 1009
1010 void URLFetcher::set_response_headers(
1011 scoped_refptr<net::HttpResponseHeaders> headers) {
1012 core_->response_headers_ = headers;
1013 }
1014
1010 // TODO(panayiotis): socket_address_ is written in the IO thread, 1015 // TODO(panayiotis): socket_address_ is written in the IO thread,
1011 // if this is accessed in the UI thread, this could result in a race. 1016 // if this is accessed in the UI thread, this could result in a race.
1012 // Same for response_headers_ above and was_fetched_via_proxy_ below. 1017 // Same for response_headers_ above and was_fetched_via_proxy_ below.
1013 net::HostPortPair URLFetcher::socket_address() const { 1018 net::HostPortPair URLFetcher::socket_address() const {
1014 return core_->socket_address_; 1019 return core_->socket_address_;
1015 } 1020 }
1016 1021
1017 bool URLFetcher::was_fetched_via_proxy() const { 1022 bool URLFetcher::was_fetched_via_proxy() const {
1018 return core_->was_fetched_via_proxy_; 1023 return core_->was_fetched_via_proxy_;
1019 } 1024 }
1020 1025
1026 void URLFetcher::set_was_fetched_via_proxy(bool flag) {
1027 core_->was_fetched_via_proxy_ = flag;
1028 }
1029
1021 void URLFetcher::Start() { 1030 void URLFetcher::Start() {
1022 core_->Start(); 1031 core_->Start();
1023 } 1032 }
1024 1033
1025 void URLFetcher::StartWithRequestContextGetter( 1034 void URLFetcher::StartWithRequestContextGetter(
1026 net::URLRequestContextGetter* request_context_getter) { 1035 net::URLRequestContextGetter* request_context_getter) {
1027 set_request_context(request_context_getter); 1036 set_request_context(request_context_getter);
1028 core_->Start(); 1037 core_->Start();
1029 } 1038 }
1030 1039
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
1114 } 1123 }
1115 1124
1116 // static 1125 // static
1117 int URLFetcher::GetNumFetcherCores() { 1126 int URLFetcher::GetNumFetcherCores() {
1118 return Core::g_registry.Get().size(); 1127 return Core::g_registry.Get().size();
1119 } 1128 }
1120 1129
1121 URLFetcher::Delegate* URLFetcher::delegate() const { 1130 URLFetcher::Delegate* URLFetcher::delegate() const {
1122 return core_->delegate(); 1131 return core_->delegate();
1123 } 1132 }
OLDNEW
« no previous file with comments | « content/common/net/url_fetcher.h ('k') | content/test/test_url_fetcher_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698