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

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

Issue 233353003: Only commit cookie changes in prerenders after a prerender is shown (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Add browser tests, fix a bug in what was changed yesterday. Created 6 years, 7 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"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
64 // Conceptually speaking, the ProfileIOData represents data that lives on the IO 68 // Conceptually speaking, the ProfileIOData represents data that lives on the IO
65 // thread that is owned by a Profile, such as, but not limited to, network 69 // thread that is owned by a Profile, such as, but not limited to, network
66 // objects like CookieMonster, HttpTransactionFactory, etc. Profile owns 70 // objects like CookieMonster, HttpTransactionFactory, etc. Profile owns
67 // ProfileIOData, but will make sure to delete it on the IO thread (except 71 // ProfileIOData, but will make sure to delete it on the IO thread (except
68 // possibly in unit tests where there is no IO thread). 72 // possibly in unit tests where there is no IO thread).
69 class ProfileIOData { 73 class ProfileIOData {
70 public: 74 public:
71 virtual ~ProfileIOData(); 75 virtual ~ProfileIOData();
72 76
73 static ProfileIOData* FromResourceContext(content::ResourceContext* rc); 77 static ProfileIOData* FromResourceContext(content::ResourceContext* rc);
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 #endif 291 #endif
288 292
289 #if defined(OS_CHROMEOS) 293 #if defined(OS_CHROMEOS)
290 std::string username_hash; 294 std::string username_hash;
291 #endif 295 #endif
292 296
293 // 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
294 // 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
295 // UI thread, call ProfileManager::IsValidProfile to ensure it's alive. 299 // UI thread, call ProfileManager::IsValidProfile to ensure it's alive.
296 void* profile; 300 void* profile;
301
302 prerender::PrerenderTracker* prerender_tracker;
297 }; 303 };
298 304
299 explicit ProfileIOData(Profile::ProfileType profile_type); 305 explicit ProfileIOData(Profile::ProfileType profile_type);
300 306
301 static std::string GetSSLSessionCacheShard(); 307 static std::string GetSSLSessionCacheShard();
302 308
303 void InitializeOnUIThread(Profile* profile); 309 void InitializeOnUIThread(Profile* profile);
304 void ApplyProfileParamsToContext(ChromeURLRequestContext* context) const; 310 void ApplyProfileParamsToContext(ChromeURLRequestContext* context) const;
305 311
306 scoped_ptr<net::URLRequestJobFactory> SetUpJobFactoryDefaults( 312 scoped_ptr<net::URLRequestJobFactory> SetUpJobFactoryDefaults(
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 560
555 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. 561 // TODO(jhawkins): Remove once crbug.com/102004 is fixed.
556 bool initialized_on_UI_thread_; 562 bool initialized_on_UI_thread_;
557 563
558 const Profile::ProfileType profile_type_; 564 const Profile::ProfileType profile_type_;
559 565
560 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); 566 DISALLOW_COPY_AND_ASSIGN(ProfileIOData);
561 }; 567 };
562 568
563 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ 569 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698