OLD | NEW |
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" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 class TransportSecurityState; | 54 class TransportSecurityState; |
55 class URLRequestJobFactoryImpl; | 55 class URLRequestJobFactoryImpl; |
56 } // namespace net | 56 } // namespace net |
57 | 57 |
58 namespace policy { | 58 namespace policy { |
59 class PolicyCertVerifier; | 59 class PolicyCertVerifier; |
60 class PolicyHeaderIOHelper; | 60 class PolicyHeaderIOHelper; |
61 class URLBlacklistManager; | 61 class URLBlacklistManager; |
62 } // namespace policy | 62 } // namespace policy |
63 | 63 |
64 namespace prerender { | |
65 class PrerenderTracker; | |
66 } | |
67 | |
68 // Conceptually speaking, the ProfileIOData represents data that lives on the IO | 64 // Conceptually speaking, the ProfileIOData represents data that lives on the IO |
69 // thread that is owned by a Profile, such as, but not limited to, network | 65 // thread that is owned by a Profile, such as, but not limited to, network |
70 // objects like CookieMonster, HttpTransactionFactory, etc. Profile owns | 66 // objects like CookieMonster, HttpTransactionFactory, etc. Profile owns |
71 // ProfileIOData, but will make sure to delete it on the IO thread (except | 67 // ProfileIOData, but will make sure to delete it on the IO thread (except |
72 // possibly in unit tests where there is no IO thread). | 68 // possibly in unit tests where there is no IO thread). |
73 class ProfileIOData { | 69 class ProfileIOData { |
74 public: | 70 public: |
75 virtual ~ProfileIOData(); | 71 virtual ~ProfileIOData(); |
76 | 72 |
77 static ProfileIOData* FromResourceContext(content::ResourceContext* rc); | 73 static ProfileIOData* FromResourceContext(content::ResourceContext* rc); |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 #endif | 291 #endif |
296 | 292 |
297 #if defined(OS_CHROMEOS) | 293 #if defined(OS_CHROMEOS) |
298 std::string username_hash; | 294 std::string username_hash; |
299 #endif | 295 #endif |
300 | 296 |
301 // The profile this struct was populated from. It's passed as a void* to | 297 // The profile this struct was populated from. It's passed as a void* to |
302 // ensure it's not accidently used on the IO thread. Before using it on the | 298 // ensure it's not accidently used on the IO thread. Before using it on the |
303 // UI thread, call ProfileManager::IsValidProfile to ensure it's alive. | 299 // UI thread, call ProfileManager::IsValidProfile to ensure it's alive. |
304 void* profile; | 300 void* profile; |
305 | |
306 prerender::PrerenderTracker* prerender_tracker; | |
307 }; | 301 }; |
308 | 302 |
309 explicit ProfileIOData(Profile::ProfileType profile_type); | 303 explicit ProfileIOData(Profile::ProfileType profile_type); |
310 | 304 |
311 static std::string GetSSLSessionCacheShard(); | 305 static std::string GetSSLSessionCacheShard(); |
312 | 306 |
313 void InitializeOnUIThread(Profile* profile); | 307 void InitializeOnUIThread(Profile* profile); |
314 void ApplyProfileParamsToContext(ChromeURLRequestContext* context) const; | 308 void ApplyProfileParamsToContext(ChromeURLRequestContext* context) const; |
315 | 309 |
316 scoped_ptr<net::URLRequestJobFactory> SetUpJobFactoryDefaults( | 310 scoped_ptr<net::URLRequestJobFactory> SetUpJobFactoryDefaults( |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 | 559 |
566 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. | 560 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. |
567 bool initialized_on_UI_thread_; | 561 bool initialized_on_UI_thread_; |
568 | 562 |
569 const Profile::ProfileType profile_type_; | 563 const Profile::ProfileType profile_type_; |
570 | 564 |
571 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); | 565 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); |
572 }; | 566 }; |
573 | 567 |
574 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 568 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
OLD | NEW |