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

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

Issue 10407124: Don't force non-session only cookies to be session only cookies, instead delete on shutdown (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 8 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_IMPL_IO_DATA_H_ 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_
6 #define CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ 6 #define CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/hash_tables.h" 11 #include "base/hash_tables.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "chrome/browser/profiles/profile_io_data.h" 13 #include "chrome/browser/profiles/profile_io_data.h"
14 14
15 namespace chrome_browser_net { 15 namespace chrome_browser_net {
16 class Predictor; 16 class Predictor;
17 } // namespace chrome_browser_net 17 } // namespace chrome_browser_net
18 18
19 namespace net { 19 namespace net {
20 class HttpServerProperties; 20 class HttpServerProperties;
21 class HttpTransactionFactory; 21 class HttpTransactionFactory;
22 } // namespace net 22 } // namespace net
23 23
24 namespace quota {
25 class SpecialStoragePolicy;
26 } // namespace quota
27
24 class ProfileImplIOData : public ProfileIOData { 28 class ProfileImplIOData : public ProfileIOData {
25 public: 29 public:
26 class Handle { 30 class Handle {
27 public: 31 public:
28 explicit Handle(Profile* profile); 32 explicit Handle(Profile* profile);
29 ~Handle(); 33 ~Handle();
30 34
31 bool HasMainRequestContext() const { 35 bool HasMainRequestContext() const {
32 return main_request_context_getter_ != NULL; 36 return main_request_context_getter_ != NULL;
33 } 37 }
34 38
35 // Init() must be called before ~Handle(). It records all the necessary 39 // Init() must be called before ~Handle(). It records all the necessary
36 // parameters needed to construct a ChromeURLRequestContextGetter. 40 // parameters needed to construct a ChromeURLRequestContextGetter.
37 void Init(const FilePath& cookie_path, 41 void Init(const FilePath& cookie_path,
38 const FilePath& server_bound_cert_path, 42 const FilePath& server_bound_cert_path,
39 const FilePath& cache_path, 43 const FilePath& cache_path,
40 int cache_max_size, 44 int cache_max_size,
41 const FilePath& media_cache_path, 45 const FilePath& media_cache_path,
42 int media_cache_max_size, 46 int media_cache_max_size,
43 const FilePath& extensions_cookie_path, 47 const FilePath& extensions_cookie_path,
44 const FilePath& app_path, 48 const FilePath& app_path,
45 chrome_browser_net::Predictor* predictor, 49 chrome_browser_net::Predictor* predictor,
46 PrefService* local_state, 50 PrefService* local_state,
47 IOThread* io_thread, 51 IOThread* io_thread,
48 bool restore_old_session_cookies); 52 bool restore_old_session_cookies,
53 quota::SpecialStoragePolicy* special_storage_policy);
49 54
50 base::Callback<ChromeURLDataManagerBackend*(void)> 55 base::Callback<ChromeURLDataManagerBackend*(void)>
51 GetChromeURLDataManagerBackendGetter() const; 56 GetChromeURLDataManagerBackendGetter() const;
52 content::ResourceContext* GetResourceContext() const; 57 content::ResourceContext* GetResourceContext() const;
53 // GetResourceContextNoInit() does not call LazyInitialize() so it can be 58 // GetResourceContextNoInit() does not call LazyInitialize() so it can be
54 // safely be used during initialization. 59 // safely be used during initialization.
55 content::ResourceContext* GetResourceContextNoInit() const; 60 content::ResourceContext* GetResourceContextNoInit() const;
56 scoped_refptr<ChromeURLRequestContextGetter> 61 scoped_refptr<ChromeURLRequestContextGetter>
57 GetMainRequestContextGetter() const; 62 GetMainRequestContextGetter() const;
58 scoped_refptr<ChromeURLRequestContextGetter> 63 scoped_refptr<ChromeURLRequestContextGetter>
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 113
109 // All of these parameters are intended to be read on the IO thread. 114 // All of these parameters are intended to be read on the IO thread.
110 FilePath cookie_path; 115 FilePath cookie_path;
111 FilePath server_bound_cert_path; 116 FilePath server_bound_cert_path;
112 FilePath cache_path; 117 FilePath cache_path;
113 int cache_max_size; 118 int cache_max_size;
114 FilePath media_cache_path; 119 FilePath media_cache_path;
115 int media_cache_max_size; 120 int media_cache_max_size;
116 FilePath extensions_cookie_path; 121 FilePath extensions_cookie_path;
117 bool restore_old_session_cookies; 122 bool restore_old_session_cookies;
123 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy;
118 }; 124 };
119 125
120 typedef base::hash_map<std::string, net::HttpTransactionFactory* > 126 typedef base::hash_map<std::string, net::HttpTransactionFactory* >
121 HttpTransactionFactoryMap; 127 HttpTransactionFactoryMap;
122 128
123 ProfileImplIOData(); 129 ProfileImplIOData();
124 virtual ~ProfileImplIOData(); 130 virtual ~ProfileImplIOData();
125 131
126 virtual void LazyInitializeInternal( 132 virtual void LazyInitializeInternal(
127 ProfileParams* profile_params) const OVERRIDE; 133 ProfileParams* profile_params) const OVERRIDE;
(...skipping 22 matching lines...) Expand all
150 mutable scoped_ptr<ChromeURLRequestContext> media_request_context_; 156 mutable scoped_ptr<ChromeURLRequestContext> media_request_context_;
151 157
152 // Parameters needed for isolated apps. 158 // Parameters needed for isolated apps.
153 FilePath app_path_; 159 FilePath app_path_;
154 mutable bool clear_local_state_on_exit_; 160 mutable bool clear_local_state_on_exit_;
155 161
156 DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData); 162 DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData);
157 }; 163 };
158 164
159 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ 165 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698