| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 // This file contains URLFetcher, a wrapper around URLRequest that handles | 5 // This file contains URLFetcher, a wrapper around 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 #ifndef CHROME_BROWSER_URL_FETCHER_H_ | 10 #ifndef CHROME_BROWSER_URL_FETCHER_H_ |
| 11 #define CHROME_BROWSER_URL_FETCHER_H_ | 11 #define CHROME_BROWSER_URL_FETCHER_H_ |
| 12 | 12 |
| 13 #include "base/leak_tracker.h" |
| 13 #include "base/message_loop.h" | 14 #include "base/message_loop.h" |
| 14 #include "base/ref_counted.h" | 15 #include "base/ref_counted.h" |
| 15 #include "chrome/browser/net/url_fetcher_protect.h" | 16 #include "chrome/browser/net/url_fetcher_protect.h" |
| 16 | 17 |
| 17 class GURL; | 18 class GURL; |
| 18 typedef std::vector<std::string> ResponseCookies; | 19 typedef std::vector<std::string> ResponseCookies; |
| 19 class URLFetcher; | 20 class URLFetcher; |
| 20 class URLRequestContext; | 21 class URLRequestContext; |
| 21 class URLRequestStatus; | 22 class URLRequestStatus; |
| 22 | 23 |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 // are used to ensure that all handling of URLRequests happens on the IO | 157 // are used to ensure that all handling of URLRequests happens on the IO |
| 157 // thread (since that class is not currently threadsafe and relies on | 158 // thread (since that class is not currently threadsafe and relies on |
| 158 // underlying Microsoft APIs that we don't know to be threadsafe), while | 159 // underlying Microsoft APIs that we don't know to be threadsafe), while |
| 159 // keeping the delegate callback on the delegate's thread. | 160 // keeping the delegate callback on the delegate's thread. |
| 160 class Core; | 161 class Core; |
| 161 | 162 |
| 162 scoped_refptr<Core> core_; | 163 scoped_refptr<Core> core_; |
| 163 | 164 |
| 164 static Factory* factory_; | 165 static Factory* factory_; |
| 165 | 166 |
| 167 base::LeakTracker<URLFetcher> leak_tracker_; |
| 168 |
| 166 DISALLOW_EVIL_CONSTRUCTORS(URLFetcher); | 169 DISALLOW_EVIL_CONSTRUCTORS(URLFetcher); |
| 167 }; | 170 }; |
| 168 | 171 |
| 169 #endif // CHROME_BROWSER_URL_FETCHER_H_ | 172 #endif // CHROME_BROWSER_URL_FETCHER_H_ |
| OLD | NEW |