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

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

Issue 2145103003: Request the Identity API's Uber Token without a Channel ID (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « chrome/browser/extensions/api/identity/gaia_web_auth_flow.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 virtual policy::URLBlacklist::URLBlacklistState GetURLBlacklistState( 258 virtual policy::URLBlacklist::URLBlacklistState GetURLBlacklistState(
259 const GURL& url) const; 259 const GURL& url) const;
260 260
261 // Returns the predictor service for this Profile. Returns nullptr if there is 261 // Returns the predictor service for this Profile. Returns nullptr if there is
262 // no Predictor, as is the case with OffTheRecord profiles. 262 // no Predictor, as is the case with OffTheRecord profiles.
263 virtual chrome_browser_net::Predictor* GetPredictor(); 263 virtual chrome_browser_net::Predictor* GetPredictor();
264 264
265 // Get platform ClientCertStore. May return nullptr. 265 // Get platform ClientCertStore. May return nullptr.
266 std::unique_ptr<net::ClientCertStore> CreateClientCertStore(); 266 std::unique_ptr<net::ClientCertStore> CreateClientCertStore();
267 267
268 protected:
269 // A URLRequestContext for media that owns its HTTP factory, to ensure
270 // it is deleted.
271 class MediaRequestContext : public net::URLRequestContext {
272 public:
273 MediaRequestContext();
274
275 void SetHttpTransactionFactory(
276 std::unique_ptr<net::HttpTransactionFactory> http_factory);
277
278 private:
279 ~MediaRequestContext() override;
280
281 std::unique_ptr<net::HttpTransactionFactory> http_factory_;
282 };
283
284 // A URLRequestContext for apps that owns its cookie store and HTTP factory, 268 // A URLRequestContext for apps that owns its cookie store and HTTP factory,
285 // to ensure they are deleted. 269 // to ensure they are deleted.
286 class AppRequestContext : public net::URLRequestContext { 270 class AppRequestContext : public net::URLRequestContext {
287 public: 271 public:
288 AppRequestContext(); 272 AppRequestContext();
289 273
290 void SetCookieStore(std::unique_ptr<net::CookieStore> cookie_store); 274 void SetCookieStore(std::unique_ptr<net::CookieStore> cookie_store);
291 void SetChannelIDService( 275 void SetChannelIDService(
292 std::unique_ptr<net::ChannelIDService> channel_id_service); 276 std::unique_ptr<net::ChannelIDService> channel_id_service);
293 void SetHttpNetworkSession( 277 void SetHttpNetworkSession(
294 std::unique_ptr<net::HttpNetworkSession> http_network_session); 278 std::unique_ptr<net::HttpNetworkSession> http_network_session);
295 void SetHttpTransactionFactory( 279 void SetHttpTransactionFactory(
296 std::unique_ptr<net::HttpTransactionFactory> http_factory); 280 std::unique_ptr<net::HttpTransactionFactory> http_factory);
297 void SetJobFactory(std::unique_ptr<net::URLRequestJobFactory> job_factory); 281 void SetJobFactory(std::unique_ptr<net::URLRequestJobFactory> job_factory);
298 282
299 private: 283 private:
300 ~AppRequestContext() override; 284 ~AppRequestContext() override;
301 285
302 std::unique_ptr<net::CookieStore> cookie_store_; 286 std::unique_ptr<net::CookieStore> cookie_store_;
303 std::unique_ptr<net::ChannelIDService> channel_id_service_; 287 std::unique_ptr<net::ChannelIDService> channel_id_service_;
304 std::unique_ptr<net::HttpNetworkSession> http_network_session_; 288 std::unique_ptr<net::HttpNetworkSession> http_network_session_;
305 std::unique_ptr<net::HttpTransactionFactory> http_factory_; 289 std::unique_ptr<net::HttpTransactionFactory> http_factory_;
306 std::unique_ptr<net::URLRequestJobFactory> job_factory_; 290 std::unique_ptr<net::URLRequestJobFactory> job_factory_;
307 }; 291 };
308 292
293 protected:
anthonyvd 2016/07/13 18:36:08 This diff is pretty bad. This is making AppRequest
nharper 2016/07/13 20:04:47 The reason for using the AppRequestContext was to
anthonyvd 2016/07/13 20:33:46 I see. I initially tried to use it because it's no
294 // A URLRequestContext for media that owns its HTTP factory, to ensure
295 // it is deleted.
296 class MediaRequestContext : public net::URLRequestContext {
297 public:
298 MediaRequestContext();
299
300 void SetHttpTransactionFactory(
301 std::unique_ptr<net::HttpTransactionFactory> http_factory);
302
303 private:
304 ~MediaRequestContext() override;
305
306 std::unique_ptr<net::HttpTransactionFactory> http_factory_;
307 };
308
309 // Created on the UI thread, read on the IO thread during ProfileIOData lazy 309 // Created on the UI thread, read on the IO thread during ProfileIOData lazy
310 // initialization. 310 // initialization.
311 struct ProfileParams { 311 struct ProfileParams {
312 ProfileParams(); 312 ProfileParams();
313 ~ProfileParams(); 313 ~ProfileParams();
314 314
315 base::FilePath path; 315 base::FilePath path;
316 IOThread* io_thread; 316 IOThread* io_thread;
317 scoped_refptr<content_settings::CookieSettings> cookie_settings; 317 scoped_refptr<content_settings::CookieSettings> cookie_settings;
318 scoped_refptr<HostContentSettingsMap> host_content_settings_map; 318 scoped_refptr<HostContentSettingsMap> host_content_settings_map;
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 mutable std::unique_ptr<certificate_transparency::TreeStateTracker> 625 mutable std::unique_ptr<certificate_transparency::TreeStateTracker>
626 ct_tree_tracker_; 626 ct_tree_tracker_;
627 mutable base::Closure ct_tree_tracker_unregistration_; 627 mutable base::Closure ct_tree_tracker_unregistration_;
628 628
629 const Profile::ProfileType profile_type_; 629 const Profile::ProfileType profile_type_;
630 630
631 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); 631 DISALLOW_COPY_AND_ASSIGN(ProfileIOData);
632 }; 632 };
633 633
634 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ 634 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/identity/gaia_web_auth_flow.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698