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

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

Issue 11147026: Initial refactor to get profiles to propagate storage partition details. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Missed a merging of removed variable. Created 8 years, 1 month 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 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/hash_tables.h" 10 #include "base/hash_tables.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // safely be used during initialization. 59 // safely be used during initialization.
60 content::ResourceContext* GetResourceContextNoInit() const; 60 content::ResourceContext* GetResourceContextNoInit() const;
61 scoped_refptr<ChromeURLRequestContextGetter> 61 scoped_refptr<ChromeURLRequestContextGetter>
62 GetMainRequestContextGetter() const; 62 GetMainRequestContextGetter() const;
63 scoped_refptr<ChromeURLRequestContextGetter> 63 scoped_refptr<ChromeURLRequestContextGetter>
64 GetMediaRequestContextGetter() const; 64 GetMediaRequestContextGetter() const;
65 scoped_refptr<ChromeURLRequestContextGetter> 65 scoped_refptr<ChromeURLRequestContextGetter>
66 GetExtensionsRequestContextGetter() const; 66 GetExtensionsRequestContextGetter() const;
67 scoped_refptr<ChromeURLRequestContextGetter> 67 scoped_refptr<ChromeURLRequestContextGetter>
68 GetIsolatedAppRequestContextGetter( 68 GetIsolatedAppRequestContextGetter(
69 const std::string& app_id) const; 69 const FilePath& partition_path,
70 bool in_memory) const;
70 scoped_refptr<ChromeURLRequestContextGetter> 71 scoped_refptr<ChromeURLRequestContextGetter>
71 GetIsolatedMediaRequestContextGetter( 72 GetIsolatedMediaRequestContextGetter(
72 const std::string& app_id) const; 73 const FilePath& partition_path,
74 bool in_memory) const;
73 75
74 void ClearNetworkingHistorySince(base::Time time); 76 void ClearNetworkingHistorySince(base::Time time);
75 77
76 private: 78 private:
77 typedef base::hash_map<std::string, 79 typedef std::map<StoragePartitionDescriptor,
78 scoped_refptr<ChromeURLRequestContextGetter> > 80 scoped_refptr<ChromeURLRequestContextGetter>,
79 ChromeURLRequestContextGetterMap; 81 StoragePartitionDescriptorLess>
82 ChromeURLRequestContextGetterMap;
80 83
81 // Lazily initialize ProfileParams. We do this on the calls to 84 // Lazily initialize ProfileParams. We do this on the calls to
82 // Get*RequestContextGetter(), so we only initialize ProfileParams right 85 // Get*RequestContextGetter(), so we only initialize ProfileParams right
83 // before posting a task to the IO thread to start using them. This prevents 86 // before posting a task to the IO thread to start using them. This prevents
84 // objects that are supposed to be deleted on the IO thread, but are created 87 // objects that are supposed to be deleted on the IO thread, but are created
85 // on the UI thread from being unnecessarily initialized. 88 // on the UI thread from being unnecessarily initialized.
86 void LazyInitialize() const; 89 void LazyInitialize() const;
87 90
88 // Ordering is important here. Do not reorder unless you know what you're 91 // Ordering is important here. Do not reorder unless you know what you're
89 // doing. We need to release |io_data_| *before* the getters, because we 92 // doing. We need to release |io_data_| *before* the getters, because we
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 typedef base::hash_map<std::string, net::HttpTransactionFactory* > 135 typedef base::hash_map<std::string, net::HttpTransactionFactory* >
133 HttpTransactionFactoryMap; 136 HttpTransactionFactoryMap;
134 137
135 ProfileImplIOData(); 138 ProfileImplIOData();
136 virtual ~ProfileImplIOData(); 139 virtual ~ProfileImplIOData();
137 140
138 virtual void LazyInitializeInternal( 141 virtual void LazyInitializeInternal(
139 ProfileParams* profile_params) const OVERRIDE; 142 ProfileParams* profile_params) const OVERRIDE;
140 virtual ChromeURLRequestContext* InitializeAppRequestContext( 143 virtual ChromeURLRequestContext* InitializeAppRequestContext(
141 ChromeURLRequestContext* main_context, 144 ChromeURLRequestContext* main_context,
142 const std::string& app_id, 145 const StoragePartitionDescriptor& partition_descriptor,
143 scoped_ptr<net::URLRequestJobFactory::Interceptor> 146 scoped_ptr<net::URLRequestJobFactory::Interceptor>
144 protocol_handler_interceptor) const OVERRIDE; 147 protocol_handler_interceptor) const OVERRIDE;
145 virtual ChromeURLRequestContext* InitializeMediaRequestContext( 148 virtual ChromeURLRequestContext* InitializeMediaRequestContext(
146 ChromeURLRequestContext* original_context, 149 ChromeURLRequestContext* original_context,
147 const std::string& app_id) const OVERRIDE; 150 const StoragePartitionDescriptor& partition_descriptor) const OVERRIDE;
148 virtual ChromeURLRequestContext* 151 virtual ChromeURLRequestContext*
149 AcquireMediaRequestContext() const OVERRIDE; 152 AcquireMediaRequestContext() const OVERRIDE;
150 virtual ChromeURLRequestContext* 153 virtual ChromeURLRequestContext*
151 AcquireIsolatedAppRequestContext( 154 AcquireIsolatedAppRequestContext(
152 ChromeURLRequestContext* main_context, 155 ChromeURLRequestContext* main_context,
153 const std::string& app_id, 156 const StoragePartitionDescriptor& partition_descriptor,
154 scoped_ptr<net::URLRequestJobFactory::Interceptor> 157 scoped_ptr<net::URLRequestJobFactory::Interceptor>
155 protocol_handler_interceptor) const OVERRIDE; 158 protocol_handler_interceptor) const OVERRIDE;
156 virtual ChromeURLRequestContext* 159 virtual ChromeURLRequestContext*
157 AcquireIsolatedMediaRequestContext( 160 AcquireIsolatedMediaRequestContext(
158 ChromeURLRequestContext* app_context, 161 ChromeURLRequestContext* app_context,
159 const std::string& app_id) const OVERRIDE; 162 const StoragePartitionDescriptor& partition_descriptor)
163 const OVERRIDE;
160 virtual chrome_browser_net::LoadTimeStats* GetLoadTimeStats( 164 virtual chrome_browser_net::LoadTimeStats* GetLoadTimeStats(
161 IOThread::Globals* io_thread_globals) const OVERRIDE; 165 IOThread::Globals* io_thread_globals) const OVERRIDE;
162 166
163 void SetUpJobFactory(net::URLRequestJobFactoryImpl* job_factory, 167 void SetUpJobFactory(net::URLRequestJobFactoryImpl* job_factory,
164 scoped_ptr<net::URLRequestJobFactory::Interceptor> 168 scoped_ptr<net::URLRequestJobFactory::Interceptor>
165 protocol_handler_interceptor, 169 protocol_handler_interceptor,
166 net::NetworkDelegate* network_delegate, 170 net::NetworkDelegate* network_delegate,
167 net::FtpTransactionFactory* ftp_transaction_factory, 171 net::FtpTransactionFactory* ftp_transaction_factory,
168 net::FtpAuthCache* ftp_auth_cache) const; 172 net::FtpAuthCache* ftp_auth_cache) const;
169 173
(...skipping 15 matching lines...) Expand all
185 189
186 // Parameters needed for isolated apps. 190 // Parameters needed for isolated apps.
187 FilePath profile_path_; 191 FilePath profile_path_;
188 int app_cache_max_size_; 192 int app_cache_max_size_;
189 int app_media_cache_max_size_; 193 int app_media_cache_max_size_;
190 194
191 DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData); 195 DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData);
192 }; 196 };
193 197
194 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ 198 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | chrome/browser/profiles/profile_impl_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698