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

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

Issue 10969017: Create a new URLRequestJobFactory for isolated request contexts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 bool GetMetricsEnabledStateOnIOThread() const; 139 bool GetMetricsEnabledStateOnIOThread() const;
140 140
141 protected: 141 protected:
142 // A URLRequestContext for media that owns its HTTP factory, to ensure 142 // A URLRequestContext for media that owns its HTTP factory, to ensure
143 // it is deleted. 143 // it is deleted.
144 class MediaRequestContext : public ChromeURLRequestContext { 144 class MediaRequestContext : public ChromeURLRequestContext {
145 public: 145 public:
146 explicit MediaRequestContext( 146 explicit MediaRequestContext(
147 chrome_browser_net::LoadTimeStats* load_time_stats); 147 chrome_browser_net::LoadTimeStats* load_time_stats);
148 148
149 void SetHttpTransactionFactory(net::HttpTransactionFactory* http_factory); 149 void SetHttpTransactionFactory(
150 scoped_ptr<net::HttpTransactionFactory> http_factory);
Charlie Reis 2012/09/20 17:47:03 Why pass a scoped_ptr? I haven't seen that. Was
awong 2012/09/20 22:11:00 It's new functionality as of January. This way the
150 151
151 private: 152 private:
152 virtual ~MediaRequestContext(); 153 virtual ~MediaRequestContext();
153 154
154 scoped_ptr<net::HttpTransactionFactory> http_factory_; 155 scoped_ptr<net::HttpTransactionFactory> http_factory_;
155 }; 156 };
156 157
157 // A URLRequestContext for apps that owns its cookie store and HTTP factory, 158 // A URLRequestContext for apps that owns its cookie store and HTTP factory,
158 // to ensure they are deleted. 159 // to ensure they are deleted.
159 class AppRequestContext : public ChromeURLRequestContext { 160 class AppRequestContext : public ChromeURLRequestContext {
160 public: 161 public:
161 explicit AppRequestContext( 162 explicit AppRequestContext(
162 chrome_browser_net::LoadTimeStats* load_time_stats); 163 chrome_browser_net::LoadTimeStats* load_time_stats);
163 164
164 void SetCookieStore(net::CookieStore* cookie_store); 165 void SetCookieStore(net::CookieStore* cookie_store);
165 void SetHttpTransactionFactory(net::HttpTransactionFactory* http_factory); 166 void SetHttpTransactionFactory(
167 scoped_ptr<net::HttpTransactionFactory> http_factory);
168 void SetJobFactory(scoped_ptr<net::URLRequestJobFactory> job_factory);
166 169
167 private: 170 private:
168 virtual ~AppRequestContext(); 171 virtual ~AppRequestContext();
169 172
170 scoped_refptr<net::CookieStore> cookie_store_; 173 scoped_refptr<net::CookieStore> cookie_store_;
171 scoped_ptr<net::HttpTransactionFactory> http_factory_; 174 scoped_ptr<net::HttpTransactionFactory> http_factory_;
175 scoped_ptr<net::URLRequestJobFactory> job_factory_;
172 }; 176 };
173 177
174 // Created on the UI thread, read on the IO thread during ProfileIOData lazy 178 // Created on the UI thread, read on the IO thread during ProfileIOData lazy
175 // initialization. 179 // initialization.
176 struct ProfileParams { 180 struct ProfileParams {
177 ProfileParams(); 181 ProfileParams();
178 ~ProfileParams(); 182 ~ProfileParams();
179 183
180 FilePath path; 184 FilePath path;
181 std::string accept_language; 185 std::string accept_language;
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 417
414 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. 418 // TODO(jhawkins): Remove once crbug.com/102004 is fixed.
415 bool initialized_on_UI_thread_; 419 bool initialized_on_UI_thread_;
416 420
417 bool is_incognito_; 421 bool is_incognito_;
418 422
419 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); 423 DISALLOW_COPY_AND_ASSIGN(ProfileIOData);
420 }; 424 };
421 425
422 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ 426 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698