Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(228)

Side by Side Diff: chrome/browser/profiles/profile_io_data.h

Issue 7134017: Make safe browsing work in a multi-profile environment. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: addressed sky's nit Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 DesktopNotificationService* GetNotificationService() const; 99 DesktopNotificationService* GetNotificationService() const;
100 100
101 BooleanPrefMember* clear_local_state_on_exit() const { 101 BooleanPrefMember* clear_local_state_on_exit() const {
102 return &clear_local_state_on_exit_; 102 return &clear_local_state_on_exit_;
103 } 103 }
104 104
105 ChromeURLRequestContext* extensions_request_context() const { 105 ChromeURLRequestContext* extensions_request_context() const {
106 return weak_extensions_request_context_.get(); 106 return weak_extensions_request_context_.get();
107 } 107 }
108 108
109 BooleanPrefMember* safe_browsing_enabled() const {
110 return &safe_browsing_enabled_;
111 }
112
109 protected: 113 protected:
110 friend class base::RefCountedThreadSafe<ProfileIOData>; 114 friend class base::RefCountedThreadSafe<ProfileIOData>;
111 115
112 class RequestContext : public ChromeURLRequestContext { 116 class RequestContext : public ChromeURLRequestContext {
113 public: 117 public:
114 RequestContext(); 118 RequestContext();
115 virtual ~RequestContext(); 119 virtual ~RequestContext();
116 120
117 // Setter is used to transfer ownership of the ProfileIOData to the context. 121 // Setter is used to transfer ownership of the ProfileIOData to the context.
118 void set_profile_io_data(ProfileIOData* profile_io_data) { 122 void set_profile_io_data(ProfileIOData* profile_io_data) {
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 // Tracks whether or not we've been lazily initialized. 262 // Tracks whether or not we've been lazily initialized.
259 mutable bool initialized_; 263 mutable bool initialized_;
260 264
261 // Data from the UI thread from the Profile, used to initialize ProfileIOData. 265 // Data from the UI thread from the Profile, used to initialize ProfileIOData.
262 // Deleted after lazy initialization. 266 // Deleted after lazy initialization.
263 mutable scoped_ptr<ProfileParams> profile_params_; 267 mutable scoped_ptr<ProfileParams> profile_params_;
264 268
265 // Member variables which are pointed to by the various context objects. 269 // Member variables which are pointed to by the various context objects.
266 mutable BooleanPrefMember enable_referrers_; 270 mutable BooleanPrefMember enable_referrers_;
267 mutable BooleanPrefMember clear_local_state_on_exit_; 271 mutable BooleanPrefMember clear_local_state_on_exit_;
272 mutable BooleanPrefMember safe_browsing_enabled_;
268 273
269 // Pointed to by URLRequestContext. 274 // Pointed to by URLRequestContext.
270 mutable scoped_ptr<ChromeURLDataManagerBackend> 275 mutable scoped_ptr<ChromeURLDataManagerBackend>
271 chrome_url_data_manager_backend_; 276 chrome_url_data_manager_backend_;
272 mutable scoped_ptr<net::NetworkDelegate> network_delegate_; 277 mutable scoped_ptr<net::NetworkDelegate> network_delegate_;
273 mutable scoped_ptr<net::DnsCertProvenanceChecker> dns_cert_checker_; 278 mutable scoped_ptr<net::DnsCertProvenanceChecker> dns_cert_checker_;
274 mutable scoped_ptr<net::ProxyService> proxy_service_; 279 mutable scoped_ptr<net::ProxyService> proxy_service_;
275 mutable scoped_ptr<net::URLRequestJobFactory> job_factory_; 280 mutable scoped_ptr<net::URLRequestJobFactory> job_factory_;
276 281
277 // Pointed to by ResourceContext. 282 // Pointed to by ResourceContext.
(...skipping 22 matching lines...) Expand all
300 // Weak pointers to the request contexts. Only valid after LazyInitialize. 305 // Weak pointers to the request contexts. Only valid after LazyInitialize.
301 // These are weak so that they don't hold a reference to the RequestContext, 306 // These are weak so that they don't hold a reference to the RequestContext,
302 // because that holds a reference back to ProfileIOData. 307 // because that holds a reference back to ProfileIOData.
303 mutable base::WeakPtr<ChromeURLRequestContext> 308 mutable base::WeakPtr<ChromeURLRequestContext>
304 weak_extensions_request_context_; 309 weak_extensions_request_context_;
305 310
306 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); 311 DISALLOW_COPY_AND_ASSIGN(ProfileIOData);
307 }; 312 };
308 313
309 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ 314 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_impl_io_data.cc ('k') | chrome/browser/profiles/profile_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698