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 #ifndef CONTENT_BROWSER_RESOURCE_CONTEXT_H_ | 5 #ifndef CONTENT_BROWSER_RESOURCE_CONTEXT_H_ |
6 #define CONTENT_BROWSER_RESOURCE_CONTEXT_H_ | 6 #define CONTENT_BROWSER_RESOURCE_CONTEXT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 void set_host_zoom_map(HostZoomMap* host_zoom_map); | 72 void set_host_zoom_map(HostZoomMap* host_zoom_map); |
73 | 73 |
74 // ======================================================================= | 74 // ======================================================================= |
75 // TODO(willchan): These don't belong in content/. Remove them eventually. | 75 // TODO(willchan): These don't belong in content/. Remove them eventually. |
76 | 76 |
77 // TODO(cbentzel): Kill this one. | 77 // TODO(cbentzel): Kill this one. |
78 const base::WeakPtr<prerender::PrerenderManager>& prerender_manager() const; | 78 const base::WeakPtr<prerender::PrerenderManager>& prerender_manager() const; |
79 void set_prerender_manager( | 79 void set_prerender_manager( |
80 const base::WeakPtr<prerender::PrerenderManager>& prerender_manager); | 80 const base::WeakPtr<prerender::PrerenderManager>& prerender_manager); |
81 | 81 |
| 82 bool safe_browsing_enabled() const; |
| 83 void set_safe_browsing_enabled(bool safe_browsing_enabled); |
| 84 |
82 protected: | 85 protected: |
83 ResourceContext(); | 86 ResourceContext(); |
84 | 87 |
85 private: | 88 private: |
86 virtual void EnsureInitialized() const = 0; | 89 virtual void EnsureInitialized() const = 0; |
87 | 90 |
88 net::HostResolver* host_resolver_; | 91 net::HostResolver* host_resolver_; |
89 net::URLRequestContext* request_context_; | 92 net::URLRequestContext* request_context_; |
90 ChromeAppCacheService* appcache_service_; | 93 ChromeAppCacheService* appcache_service_; |
91 webkit_database::DatabaseTracker* database_tracker_; | 94 webkit_database::DatabaseTracker* database_tracker_; |
92 fileapi::FileSystemContext* file_system_context_; | 95 fileapi::FileSystemContext* file_system_context_; |
93 ChromeBlobStorageContext* blob_storage_context_; | 96 ChromeBlobStorageContext* blob_storage_context_; |
94 quota::QuotaManager* quota_manager_; | 97 quota::QuotaManager* quota_manager_; |
95 HostZoomMap* host_zoom_map_; | 98 HostZoomMap* host_zoom_map_; |
96 | 99 |
97 // Externally-defined data accessible by key. | 100 // Externally-defined data accessible by key. |
98 typedef std::map<const void*, void*> UserDataMap; | 101 typedef std::map<const void*, void*> UserDataMap; |
99 UserDataMap user_data_; | 102 UserDataMap user_data_; |
100 | 103 |
101 | 104 |
102 // ======================================================================= | 105 // ======================================================================= |
103 // TODO(willchan): These don't belong in content/. Remove them eventually. | 106 // TODO(willchan): These don't belong in content/. Remove them eventually. |
104 | 107 |
105 base::WeakPtr<prerender::PrerenderManager> prerender_manager_; | 108 base::WeakPtr<prerender::PrerenderManager> prerender_manager_; |
106 | 109 |
| 110 bool safe_browsing_enabled_; |
| 111 |
107 DISALLOW_COPY_AND_ASSIGN(ResourceContext); | 112 DISALLOW_COPY_AND_ASSIGN(ResourceContext); |
108 }; | 113 }; |
109 | 114 |
110 } // namespace content | 115 } // namespace content |
111 | 116 |
112 #endif // CONTENT_BROWSER_RESOURCE_CONTEXT_H_ | 117 #endif // CONTENT_BROWSER_RESOURCE_CONTEXT_H_ |
OLD | NEW |