OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CONTENT_PUBLIC_BROWSER_RESOURCE_CONTEXT_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_RESOURCE_CONTEXT_H_ |
6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_CONTEXT_H_ | 6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_CONTEXT_H_ |
7 | 7 |
8 #include "base/supports_user_data.h" | 8 #include "base/supports_user_data.h" |
9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
10 | 10 |
11 namespace appcache { | 11 namespace appcache { |
12 class AppCacheService; | 12 class AppCacheService; |
13 } | 13 } |
14 | 14 |
15 namespace net { | 15 namespace net { |
16 class HostResolver; | 16 class HostResolver; |
17 class URLRequestContext; | 17 class URLRequestContext; |
18 } | 18 } |
19 | 19 |
20 namespace content { | 20 namespace content { |
21 | 21 |
22 // ResourceContext contains the relevant context information required for | 22 // ResourceContext contains the relevant context information required for |
23 // resource loading. It lives on the IO thread, although it is constructed on | 23 // resource loading. It lives on the IO thread, although it is constructed on |
24 // the UI thread. It must be destructed on the IO thread. | 24 // the UI thread. It must be destructed on the IO thread. |
25 class CONTENT_EXPORT ResourceContext : public base::SupportsUserData { | 25 class CONTENT_EXPORT ResourceContext : public base::SupportsUserData { |
26 public: | 26 public: |
27 static appcache::AppCacheService* GetAppCacheService( | 27 static appcache::AppCacheService* GetAppCacheService( |
28 ResourceContext* resource_context); | 28 ResourceContext* resource_context); |
29 | 29 |
| 30 ResourceContext(); |
30 virtual ~ResourceContext(); | 31 virtual ~ResourceContext(); |
31 virtual net::HostResolver* GetHostResolver() = 0; | 32 virtual net::HostResolver* GetHostResolver() = 0; |
32 virtual net::URLRequestContext* GetRequestContext() = 0; | 33 virtual net::URLRequestContext* GetRequestContext() = 0; |
33 }; | 34 }; |
34 | 35 |
35 } // namespace content | 36 } // namespace content |
36 | 37 |
37 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_CONTEXT_H_ | 38 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_CONTEXT_H_ |
OLD | NEW |