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 CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
6 #define CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 6 #define CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/file_path.h" | 11 #include "base/file_path.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
15 #include "base/synchronization/lock.h" | 15 #include "base/synchronization/lock.h" |
16 #include "chrome/browser/net/chrome_url_request_context.h" | 16 #include "chrome/browser/net/chrome_url_request_context.h" |
17 #include "chrome/browser/prefs/pref_member.h" | 17 #include "chrome/browser/prefs/pref_member.h" |
18 #include "content/browser/resource_context.h" | 18 #include "content/browser/resource_context.h" |
19 #include "net/base/cookie_monster.h" | 19 #include "net/base/cookie_monster.h" |
| 20 #include "chrome/browser/download/download_manager.h" |
20 | 21 |
21 class CommandLine; | 22 class CommandLine; |
22 class ChromeAppCacheService; | 23 class ChromeAppCacheService; |
23 class ChromeBlobStorageContext; | 24 class ChromeBlobStorageContext; |
24 class DesktopNotificationService; | 25 class DesktopNotificationService; |
25 class ExtensionInfoMap; | 26 class ExtensionInfoMap; |
26 class HostContentSettingsMap; | 27 class HostContentSettingsMap; |
27 class HostZoomMap; | 28 class HostZoomMap; |
28 class IOThread; | 29 class IOThread; |
29 class Profile; | 30 class Profile; |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 } | 106 } |
106 | 107 |
107 ChromeURLRequestContext* extensions_request_context() const { | 108 ChromeURLRequestContext* extensions_request_context() const { |
108 return weak_extensions_request_context_.get(); | 109 return weak_extensions_request_context_.get(); |
109 } | 110 } |
110 | 111 |
111 BooleanPrefMember* safe_browsing_enabled() const { | 112 BooleanPrefMember* safe_browsing_enabled() const { |
112 return &safe_browsing_enabled_; | 113 return &safe_browsing_enabled_; |
113 } | 114 } |
114 | 115 |
| 116 const DownloadManager::GetNextIdThunkType& next_download_id_thunk() const { |
| 117 return next_download_id_thunk_; |
| 118 } |
| 119 |
115 protected: | 120 protected: |
116 friend class base::RefCountedThreadSafe<ProfileIOData>; | 121 friend class base::RefCountedThreadSafe<ProfileIOData>; |
117 | 122 |
118 class RequestContext : public ChromeURLRequestContext { | 123 class RequestContext : public ChromeURLRequestContext { |
119 public: | 124 public: |
120 RequestContext(); | 125 RequestContext(); |
121 virtual ~RequestContext(); | 126 virtual ~RequestContext(); |
122 | 127 |
123 // Setter is used to transfer ownership of the ProfileIOData to the context. | 128 // Setter is used to transfer ownership of the ProfileIOData to the context. |
124 void set_profile_io_data(ProfileIOData* profile_io_data) { | 129 void set_profile_io_data(ProfileIOData* profile_io_data) { |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 | 273 |
269 // Data from the UI thread from the Profile, used to initialize ProfileIOData. | 274 // Data from the UI thread from the Profile, used to initialize ProfileIOData. |
270 // Deleted after lazy initialization. | 275 // Deleted after lazy initialization. |
271 mutable scoped_ptr<ProfileParams> profile_params_; | 276 mutable scoped_ptr<ProfileParams> profile_params_; |
272 | 277 |
273 // Member variables which are pointed to by the various context objects. | 278 // Member variables which are pointed to by the various context objects. |
274 mutable BooleanPrefMember enable_referrers_; | 279 mutable BooleanPrefMember enable_referrers_; |
275 mutable BooleanPrefMember clear_local_state_on_exit_; | 280 mutable BooleanPrefMember clear_local_state_on_exit_; |
276 mutable BooleanPrefMember safe_browsing_enabled_; | 281 mutable BooleanPrefMember safe_browsing_enabled_; |
277 | 282 |
| 283 mutable DownloadManager::GetNextIdThunkType next_download_id_thunk_; |
| 284 |
278 // Pointed to by URLRequestContext. | 285 // Pointed to by URLRequestContext. |
279 mutable scoped_ptr<ChromeURLDataManagerBackend> | 286 mutable scoped_ptr<ChromeURLDataManagerBackend> |
280 chrome_url_data_manager_backend_; | 287 chrome_url_data_manager_backend_; |
281 mutable scoped_ptr<net::NetworkDelegate> network_delegate_; | 288 mutable scoped_ptr<net::NetworkDelegate> network_delegate_; |
282 mutable scoped_ptr<net::DnsCertProvenanceChecker> dns_cert_checker_; | 289 mutable scoped_ptr<net::DnsCertProvenanceChecker> dns_cert_checker_; |
283 mutable scoped_ptr<net::ProxyService> proxy_service_; | 290 mutable scoped_ptr<net::ProxyService> proxy_service_; |
284 mutable scoped_ptr<net::URLRequestJobFactory> job_factory_; | 291 mutable scoped_ptr<net::URLRequestJobFactory> job_factory_; |
285 | 292 |
286 // Pointed to by ResourceContext. | 293 // Pointed to by ResourceContext. |
287 mutable scoped_refptr<webkit_database::DatabaseTracker> database_tracker_; | 294 mutable scoped_refptr<webkit_database::DatabaseTracker> database_tracker_; |
(...skipping 21 matching lines...) Expand all Loading... |
309 // Weak pointers to the request contexts. Only valid after LazyInitialize. | 316 // Weak pointers to the request contexts. Only valid after LazyInitialize. |
310 // These are weak so that they don't hold a reference to the RequestContext, | 317 // These are weak so that they don't hold a reference to the RequestContext, |
311 // because that holds a reference back to ProfileIOData. | 318 // because that holds a reference back to ProfileIOData. |
312 mutable base::WeakPtr<ChromeURLRequestContext> | 319 mutable base::WeakPtr<ChromeURLRequestContext> |
313 weak_extensions_request_context_; | 320 weak_extensions_request_context_; |
314 | 321 |
315 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); | 322 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); |
316 }; | 323 }; |
317 | 324 |
318 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 325 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
OLD | NEW |