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

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

Issue 18121007: *WIP* Store NSS slots per profile. Move keygen to chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/callback_forward.h" 11 #include "base/callback_forward.h"
12 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "base/prefs/pref_member.h" 16 #include "base/prefs/pref_member.h"
17 #include "base/synchronization/lock.h" 17 #include "base/synchronization/lock.h"
18 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" 18 #include "chrome/browser/custom_handlers/protocol_handler_registry.h"
19 #include "chrome/browser/io_thread.h" 19 #include "chrome/browser/io_thread.h"
20 #include "chrome/browser/net/chrome_url_request_context.h" 20 #include "chrome/browser/net/chrome_url_request_context.h"
21 #include "chrome/browser/profiles/storage_partition_descriptor.h" 21 #include "chrome/browser/profiles/storage_partition_descriptor.h"
22 #include "content/public/browser/content_browser_client.h" 22 #include "content/public/browser/content_browser_client.h"
23 #include "content/public/browser/resource_context.h" 23 #include "content/public/browser/resource_context.h"
24 #include "net/cookies/cookie_monster.h" 24 #include "net/cookies/cookie_monster.h"
25 #include "net/http/http_network_session.h" 25 #include "net/http/http_network_session.h"
26 #include "net/url_request/url_request_job_factory.h" 26 #include "net/url_request/url_request_job_factory.h"
27 27
28 #if defined(USE_NSS)
29 #include "crypto/scoped_nss_types.h"
30 #endif
31
28 class ChromeHttpUserAgentSettings; 32 class ChromeHttpUserAgentSettings;
29 class ChromeNetworkDelegate; 33 class ChromeNetworkDelegate;
30 class CookieSettings; 34 class CookieSettings;
31 class DesktopNotificationService; 35 class DesktopNotificationService;
32 class ExtensionInfoMap; 36 class ExtensionInfoMap;
33 class HostContentSettingsMap; 37 class HostContentSettingsMap;
34 class ManagedModeURLFilter; 38 class ManagedModeURLFilter;
35 class Profile; 39 class Profile;
36 class ProtocolHandlerRegistry; 40 class ProtocolHandlerRegistry;
37 class SigninNamesOnIOThread; 41 class SigninNamesOnIOThread;
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 resource_prefetch_predictor_observer() const { 187 resource_prefetch_predictor_observer() const {
184 return resource_prefetch_predictor_observer_.get(); 188 return resource_prefetch_predictor_observer_.get();
185 } 189 }
186 190
187 #if defined(ENABLE_MANAGED_USERS) 191 #if defined(ENABLE_MANAGED_USERS)
188 const ManagedModeURLFilter* managed_mode_url_filter() const { 192 const ManagedModeURLFilter* managed_mode_url_filter() const {
189 return managed_mode_url_filter_.get(); 193 return managed_mode_url_filter_.get();
190 } 194 }
191 #endif 195 #endif
192 196
197 #if defined(USE_NSS)
198 crypto::ScopedPK11Slot GetPublicNSSKeySlot() const;
199 crypto::ScopedPK11Slot GetPrivateNSSKeySlot() const;
200 #endif
201
193 // Initialize the member needed to track the metrics enabled state. This is 202 // Initialize the member needed to track the metrics enabled state. This is
194 // only to be called on the UI thread. 203 // only to be called on the UI thread.
195 void InitializeMetricsEnabledStateOnUIThread(); 204 void InitializeMetricsEnabledStateOnUIThread();
196 205
197 // Returns whether or not metrics reporting is enabled in the browser instance 206 // Returns whether or not metrics reporting is enabled in the browser instance
198 // on which this profile resides. This is safe for use from the IO thread, and 207 // on which this profile resides. This is safe for use from the IO thread, and
199 // should only be called from there. 208 // should only be called from there.
200 bool GetMetricsEnabledStateOnIOThread() const; 209 bool GetMetricsEnabledStateOnIOThread() const;
201 210
202 protected: 211 protected:
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 #if defined(ENABLE_MANAGED_USERS) 279 #if defined(ENABLE_MANAGED_USERS)
271 scoped_refptr<const ManagedModeURLFilter> managed_mode_url_filter; 280 scoped_refptr<const ManagedModeURLFilter> managed_mode_url_filter;
272 #endif 281 #endif
273 282
274 #if defined(OS_CHROMEOS) 283 #if defined(OS_CHROMEOS)
275 // This is used to build the CertVerifier on the IO thread, and is a shared 284 // This is used to build the CertVerifier on the IO thread, and is a shared
276 // provider used by all profiles for now. 285 // provider used by all profiles for now.
277 net::CertTrustAnchorProvider* trust_anchor_provider; 286 net::CertTrustAnchorProvider* trust_anchor_provider;
278 #endif 287 #endif
279 288
289 #if defined(USE_NSS)
290 crypto::ScopedPK11Slot public_slot;
291 crypto::ScopedPK11Slot private_slot;
292 #endif
293
280 // The profile this struct was populated from. It's passed as a void* to 294 // The profile this struct was populated from. It's passed as a void* to
281 // ensure it's not accidently used on the IO thread. Before using it on the 295 // ensure it's not accidently used on the IO thread. Before using it on the
282 // UI thread, call ProfileManager::IsValidProfile to ensure it's alive. 296 // UI thread, call ProfileManager::IsValidProfile to ensure it's alive.
283 void* profile; 297 void* profile;
284 }; 298 };
285 299
286 explicit ProfileIOData(bool is_incognito); 300 explicit ProfileIOData(bool is_incognito);
287 301
288 static std::string GetSSLSessionCacheShard(); 302 static std::string GetSSLSessionCacheShard();
289 303
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 mutable scoped_ptr<ChromeNetworkDelegate> network_delegate_; 499 mutable scoped_ptr<ChromeNetworkDelegate> network_delegate_;
486 mutable scoped_ptr<net::FraudulentCertificateReporter> 500 mutable scoped_ptr<net::FraudulentCertificateReporter>
487 fraudulent_certificate_reporter_; 501 fraudulent_certificate_reporter_;
488 mutable scoped_ptr<net::ProxyService> proxy_service_; 502 mutable scoped_ptr<net::ProxyService> proxy_service_;
489 mutable scoped_ptr<net::TransportSecurityState> transport_security_state_; 503 mutable scoped_ptr<net::TransportSecurityState> transport_security_state_;
490 mutable scoped_ptr<net::HttpServerProperties> 504 mutable scoped_ptr<net::HttpServerProperties>
491 http_server_properties_; 505 http_server_properties_;
492 #if defined(OS_CHROMEOS) 506 #if defined(OS_CHROMEOS)
493 mutable scoped_ptr<net::CertVerifier> cert_verifier_; 507 mutable scoped_ptr<net::CertVerifier> cert_verifier_;
494 #endif 508 #endif
509 #if defined(USE_NSS)
510 mutable crypto::ScopedPK11Slot public_slot_;
511 mutable crypto::ScopedPK11Slot private_slot_;
512 #endif
495 513
496 #if defined(ENABLE_NOTIFICATIONS) 514 #if defined(ENABLE_NOTIFICATIONS)
497 mutable DesktopNotificationService* notification_service_; 515 mutable DesktopNotificationService* notification_service_;
498 #endif 516 #endif
499 517
500 mutable scoped_ptr<TransportSecurityPersister> 518 mutable scoped_ptr<TransportSecurityPersister>
501 transport_security_persister_; 519 transport_security_persister_;
502 520
503 // These are only valid in between LazyInitialize() and their accessor being 521 // These are only valid in between LazyInitialize() and their accessor being
504 // called. 522 // called.
(...skipping 21 matching lines...) Expand all
526 544
527 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. 545 // TODO(jhawkins): Remove once crbug.com/102004 is fixed.
528 bool initialized_on_UI_thread_; 546 bool initialized_on_UI_thread_;
529 547
530 bool is_incognito_; 548 bool is_incognito_;
531 549
532 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); 550 DISALLOW_COPY_AND_ASSIGN(ProfileIOData);
533 }; 551 };
534 552
535 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ 553 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698