OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/message_loop.h" | 13 #include "base/message_loop.h" |
14 #include "base/ref_counted.h" | 14 #include "base/ref_counted.h" |
15 #include "chrome/browser/url_fetcher_protect.h" | 15 #include "chrome/browser/net/url_fetcher_protect.h" |
16 #include "net/url_request/url_request.h" | 16 #include "net/url_request/url_request.h" |
17 | 17 |
18 class URLRequestContext; | 18 class URLRequestContext; |
19 | 19 |
20 // To use this class, create an instance with the desired URL and a pointer to | 20 // To use this class, create an instance with the desired URL and a pointer to |
21 // the object to be notified when the URL has been loaded: | 21 // the object to be notified when the URL has been loaded: |
22 // URLFetcher* fetcher = new URLFetcher("http://www.google.com", this); | 22 // URLFetcher* fetcher = new URLFetcher("http://www.google.com", this); |
23 // | 23 // |
24 // Then, optionally set properties on this object, like the request context or | 24 // Then, optionally set properties on this object, like the request context or |
25 // extra headers: | 25 // extra headers: |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 DISALLOW_EVIL_CONSTRUCTORS(Core); | 210 DISALLOW_EVIL_CONSTRUCTORS(Core); |
211 }; | 211 }; |
212 | 212 |
213 scoped_refptr<Core> core_; | 213 scoped_refptr<Core> core_; |
214 | 214 |
215 DISALLOW_EVIL_CONSTRUCTORS(URLFetcher); | 215 DISALLOW_EVIL_CONSTRUCTORS(URLFetcher); |
216 }; | 216 }; |
217 | 217 |
218 #endif // CHROME_BROWSER_URL_FETCHER_H__ | 218 #endif // CHROME_BROWSER_URL_FETCHER_H__ |
219 | 219 |
OLD | NEW |