| OLD | NEW |
| 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 |
| 11 // temporary situation. We will work on allowing support for multiple "io" | 11 // temporary situation. We will work on allowing support for multiple "io" |
| 12 // threads per process. | 12 // threads per process. |
| 13 | 13 |
| 14 #ifndef CHROME_COMMON_NET_URL_FETCHER_H_ | 14 #ifndef CONTENT_COMMON_NET_URL_FETCHER_H_ |
| 15 #define CHROME_COMMON_NET_URL_FETCHER_H_ | 15 #define CONTENT_COMMON_NET_URL_FETCHER_H_ |
| 16 #pragma once | 16 #pragma once |
| 17 | 17 |
| 18 #include <string> | 18 #include <string> |
| 19 #include <vector> | 19 #include <vector> |
| 20 | 20 |
| 21 #include "base/memory/ref_counted.h" | 21 #include "base/memory/ref_counted.h" |
| 22 #include "base/message_loop.h" | 22 #include "base/message_loop.h" |
| 23 #include "base/platform_file.h" | 23 #include "base/platform_file.h" |
| 24 #include "base/time.h" | 24 #include "base/time.h" |
| 25 | 25 |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 // Back-off time delay. 0 by default. | 305 // Back-off time delay. 0 by default. |
| 306 base::TimeDelta backoff_delay_; | 306 base::TimeDelta backoff_delay_; |
| 307 // Maximum retries allowed. | 307 // Maximum retries allowed. |
| 308 int max_retries_; | 308 int max_retries_; |
| 309 | 309 |
| 310 static bool g_interception_enabled; | 310 static bool g_interception_enabled; |
| 311 | 311 |
| 312 DISALLOW_COPY_AND_ASSIGN(URLFetcher); | 312 DISALLOW_COPY_AND_ASSIGN(URLFetcher); |
| 313 }; | 313 }; |
| 314 | 314 |
| 315 #endif // CHROME_COMMON_NET_URL_FETCHER_H_ | 315 #endif // CONTENT_COMMON_NET_URL_FETCHER_H_ |
| OLD | NEW |