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

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

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
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 // This file contains URLFetcher, a wrapper around net::URLRequest that handles 5 // This file contains URLFetcher, a wrapper around net::URLRequest that handles
6 // low-level details like thread safety, ref counting, and incremental buffer 6 // low-level details like thread safety, ref counting, and incremental buffer
7 // reading. This is useful for callers who simply want to get the data from a 7 // reading. This is useful for callers who simply want to get the data from a
8 // URL and don't care about all the nitty-gritty details. 8 // URL and don't care about all the nitty-gritty details.
9 // 9 //
10 // NOTE(willchan): Only one "IO" thread is supported for URLFetcher. This is a 10 // NOTE(willchan): Only one "IO" thread is supported for URLFetcher. This is a
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 STRING, // Default: In a std::string 276 STRING, // Default: In a std::string
277 TEMP_FILE // Write to a temp file 277 TEMP_FILE // Write to a temp file
278 }; 278 };
279 279
280 // Returns the delegate. 280 // Returns the delegate.
281 Delegate* delegate() const; 281 Delegate* delegate() const;
282 282
283 // Used by tests. 283 // Used by tests.
284 const std::string& upload_data() const; 284 const std::string& upload_data() const;
285 285
286 // Used by tests.
287 void set_was_fetched_via_proxy(bool flag);
288
289 // Used by tests.
290 void set_response_headers(scoped_refptr<net::HttpResponseHeaders> headers);
291
286 virtual void SetResponseDestinationForTesting(ResponseDestinationType); 292 virtual void SetResponseDestinationForTesting(ResponseDestinationType);
287 virtual ResponseDestinationType GetResponseDestinationForTesting() const; 293 virtual ResponseDestinationType GetResponseDestinationForTesting() const;
288 294
289 private: 295 private:
290 friend class ScopedURLFetcherFactory; 296 friend class ScopedURLFetcherFactory;
291 friend class TestURLFetcher; 297 friend class TestURLFetcher;
292 friend class URLFetcherTest; 298 friend class URLFetcherTest;
293 299
294 // Only used by URLFetcherTest, returns the number of URLFetcher::Core objects 300 // Only used by URLFetcherTest, returns the number of URLFetcher::Core objects
295 // actively running. 301 // actively running.
(...skipping 17 matching lines...) Expand all
313 319
314 // Back-off time delay. 0 by default. 320 // Back-off time delay. 0 by default.
315 base::TimeDelta backoff_delay_; 321 base::TimeDelta backoff_delay_;
316 322
317 static bool g_interception_enabled; 323 static bool g_interception_enabled;
318 324
319 DISALLOW_COPY_AND_ASSIGN(URLFetcher); 325 DISALLOW_COPY_AND_ASSIGN(URLFetcher);
320 }; 326 };
321 327
322 #endif // CONTENT_COMMON_NET_URL_FETCHER_H_ 328 #endif // CONTENT_COMMON_NET_URL_FETCHER_H_
OLDNEW
« no previous file with comments | « chrome/browser/policy/device_management_service_unittest.cc ('k') | content/common/net/url_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698