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" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 DesktopNotificationService* GetNotificationService() const; | 97 DesktopNotificationService* GetNotificationService() const; |
98 | 98 |
99 BooleanPrefMember* clear_local_state_on_exit() const { | 99 BooleanPrefMember* clear_local_state_on_exit() const { |
100 return &clear_local_state_on_exit_; | 100 return &clear_local_state_on_exit_; |
101 } | 101 } |
102 | 102 |
103 ChromeURLRequestContext* extensions_request_context() const { | 103 ChromeURLRequestContext* extensions_request_context() const { |
104 return weak_extensions_request_context_.get(); | 104 return weak_extensions_request_context_.get(); |
105 } | 105 } |
106 | 106 |
| 107 BooleanPrefMember* safe_browsing_enabled() const { |
| 108 return &safe_browsing_enabled_; |
| 109 } |
| 110 |
107 protected: | 111 protected: |
108 friend class base::RefCountedThreadSafe<ProfileIOData>; | 112 friend class base::RefCountedThreadSafe<ProfileIOData>; |
109 | 113 |
110 class RequestContext : public ChromeURLRequestContext { | 114 class RequestContext : public ChromeURLRequestContext { |
111 public: | 115 public: |
112 RequestContext(); | 116 RequestContext(); |
113 virtual ~RequestContext(); | 117 virtual ~RequestContext(); |
114 | 118 |
115 // Setter is used to transfer ownership of the ProfileIOData to the context. | 119 // Setter is used to transfer ownership of the ProfileIOData to the context. |
116 void set_profile_io_data(const ProfileIOData* profile_io_data) { | 120 void set_profile_io_data(const ProfileIOData* profile_io_data) { |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 // Tracks whether or not we've been lazily initialized. | 240 // Tracks whether or not we've been lazily initialized. |
237 mutable bool initialized_; | 241 mutable bool initialized_; |
238 | 242 |
239 // Data from the UI thread from the Profile, used to initialize ProfileIOData. | 243 // Data from the UI thread from the Profile, used to initialize ProfileIOData. |
240 // Deleted after lazy initialization. | 244 // Deleted after lazy initialization. |
241 mutable scoped_ptr<ProfileParams> profile_params_; | 245 mutable scoped_ptr<ProfileParams> profile_params_; |
242 | 246 |
243 // Member variables which are pointed to by the various context objects. | 247 // Member variables which are pointed to by the various context objects. |
244 mutable BooleanPrefMember enable_referrers_; | 248 mutable BooleanPrefMember enable_referrers_; |
245 mutable BooleanPrefMember clear_local_state_on_exit_; | 249 mutable BooleanPrefMember clear_local_state_on_exit_; |
| 250 mutable BooleanPrefMember safe_browsing_enabled_; |
246 | 251 |
247 // Pointed to by URLRequestContext. | 252 // Pointed to by URLRequestContext. |
248 mutable scoped_ptr<ChromeURLDataManagerBackend> | 253 mutable scoped_ptr<ChromeURLDataManagerBackend> |
249 chrome_url_data_manager_backend_; | 254 chrome_url_data_manager_backend_; |
250 mutable scoped_ptr<net::NetworkDelegate> network_delegate_; | 255 mutable scoped_ptr<net::NetworkDelegate> network_delegate_; |
251 mutable scoped_ptr<net::DnsCertProvenanceChecker> dns_cert_checker_; | 256 mutable scoped_ptr<net::DnsCertProvenanceChecker> dns_cert_checker_; |
252 mutable scoped_ptr<net::ProxyService> proxy_service_; | 257 mutable scoped_ptr<net::ProxyService> proxy_service_; |
253 mutable scoped_ptr<net::URLRequestJobFactory> job_factory_; | 258 mutable scoped_ptr<net::URLRequestJobFactory> job_factory_; |
254 | 259 |
255 // Pointed to by ResourceContext. | 260 // Pointed to by ResourceContext. |
(...skipping 20 matching lines...) Expand all Loading... |
276 // Weak pointers to the request contexts. Only valid after LazyInitialize. | 281 // Weak pointers to the request contexts. Only valid after LazyInitialize. |
277 // These are weak so that they don't hold a reference to the RequestContext, | 282 // These are weak so that they don't hold a reference to the RequestContext, |
278 // because that holds a reference back to ProfileIOData. | 283 // because that holds a reference back to ProfileIOData. |
279 mutable base::WeakPtr<ChromeURLRequestContext> | 284 mutable base::WeakPtr<ChromeURLRequestContext> |
280 weak_extensions_request_context_; | 285 weak_extensions_request_context_; |
281 | 286 |
282 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); | 287 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); |
283 }; | 288 }; |
284 | 289 |
285 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 290 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
OLD | NEW |