| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 const std::string& app_id) const; | 89 const std::string& app_id) const; |
| 90 const content::ResourceContext& GetResourceContext() const; | 90 const content::ResourceContext& GetResourceContext() const; |
| 91 | 91 |
| 92 // These are useful when the Chrome layer is called from the content layer | 92 // These are useful when the Chrome layer is called from the content layer |
| 93 // with a content::ResourceContext, and they want access to Chrome data for | 93 // with a content::ResourceContext, and they want access to Chrome data for |
| 94 // that profile. | 94 // that profile. |
| 95 ExtensionInfoMap* GetExtensionInfoMap() const; | 95 ExtensionInfoMap* GetExtensionInfoMap() const; |
| 96 HostContentSettingsMap* GetHostContentSettingsMap() const; | 96 HostContentSettingsMap* GetHostContentSettingsMap() const; |
| 97 DesktopNotificationService* GetNotificationService() const; | 97 DesktopNotificationService* GetNotificationService() const; |
| 98 | 98 |
| 99 BooleanPrefMember* clear_local_state_on_exit() const { |
| 100 return &clear_local_state_on_exit_; |
| 101 } |
| 102 |
| 99 protected: | 103 protected: |
| 100 friend class base::RefCountedThreadSafe<ProfileIOData>; | 104 friend class base::RefCountedThreadSafe<ProfileIOData>; |
| 101 | 105 |
| 102 class RequestContext : public ChromeURLRequestContext { | 106 class RequestContext : public ChromeURLRequestContext { |
| 103 public: | 107 public: |
| 104 RequestContext(); | 108 RequestContext(); |
| 105 virtual ~RequestContext(); | 109 virtual ~RequestContext(); |
| 106 | 110 |
| 107 // Setter is used to transfer ownership of the ProfileIOData to the context. | 111 // Setter is used to transfer ownership of the ProfileIOData to the context. |
| 108 void set_profile_io_data(const ProfileIOData* profile_io_data) { | 112 void set_profile_io_data(const ProfileIOData* profile_io_data) { |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 | 235 |
| 232 // Tracks whether or not we've been lazily initialized. | 236 // Tracks whether or not we've been lazily initialized. |
| 233 mutable bool initialized_; | 237 mutable bool initialized_; |
| 234 | 238 |
| 235 // Data from the UI thread from the Profile, used to initialize ProfileIOData. | 239 // Data from the UI thread from the Profile, used to initialize ProfileIOData. |
| 236 // Deleted after lazy initialization. | 240 // Deleted after lazy initialization. |
| 237 mutable scoped_ptr<ProfileParams> profile_params_; | 241 mutable scoped_ptr<ProfileParams> profile_params_; |
| 238 | 242 |
| 239 // Member variables which are pointed to by the various context objects. | 243 // Member variables which are pointed to by the various context objects. |
| 240 mutable BooleanPrefMember enable_referrers_; | 244 mutable BooleanPrefMember enable_referrers_; |
| 245 mutable BooleanPrefMember clear_local_state_on_exit_; |
| 241 | 246 |
| 242 // Pointed to by URLRequestContext. | 247 // Pointed to by URLRequestContext. |
| 243 mutable scoped_ptr<ChromeURLDataManagerBackend> | 248 mutable scoped_ptr<ChromeURLDataManagerBackend> |
| 244 chrome_url_data_manager_backend_; | 249 chrome_url_data_manager_backend_; |
| 245 mutable scoped_ptr<net::NetworkDelegate> network_delegate_; | 250 mutable scoped_ptr<net::NetworkDelegate> network_delegate_; |
| 246 mutable scoped_ptr<net::DnsCertProvenanceChecker> dns_cert_checker_; | 251 mutable scoped_ptr<net::DnsCertProvenanceChecker> dns_cert_checker_; |
| 247 mutable scoped_ptr<net::ProxyService> proxy_service_; | 252 mutable scoped_ptr<net::ProxyService> proxy_service_; |
| 248 mutable scoped_ptr<net::URLRequestJobFactory> job_factory_; | 253 mutable scoped_ptr<net::URLRequestJobFactory> job_factory_; |
| 249 | 254 |
| 250 // Pointed to by ResourceContext. | 255 // Pointed to by ResourceContext. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 265 | 270 |
| 266 // These are only valid in between LazyInitialize() and their accessor being | 271 // These are only valid in between LazyInitialize() and their accessor being |
| 267 // called. | 272 // called. |
| 268 mutable scoped_refptr<RequestContext> main_request_context_; | 273 mutable scoped_refptr<RequestContext> main_request_context_; |
| 269 mutable scoped_refptr<RequestContext> extensions_request_context_; | 274 mutable scoped_refptr<RequestContext> extensions_request_context_; |
| 270 | 275 |
| 271 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); | 276 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); |
| 272 }; | 277 }; |
| 273 | 278 |
| 274 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 279 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
| OLD | NEW |