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

Unified Diff: chrome/browser/profiles/profile_io_data.h

Issue 2934153002: Add virtual ProfileIOData methods related to URLRequestContext creation. (Closed)
Patch Set: . Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/profiles/profile_impl_io_data.cc ('k') | chrome/browser/profiles/profile_io_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_io_data.h
diff --git a/chrome/browser/profiles/profile_io_data.h b/chrome/browser/profiles/profile_io_data.h
index 05c75992690fc7fd5e687b0660e5ea631c4597e1..0bcfec73f87108c4b37d65c86fe581c13e44a7ea 100644
--- a/chrome/browser/profiles/profile_io_data.h
+++ b/chrome/browser/profiles/profile_io_data.h
@@ -77,6 +77,7 @@ class CertVerifier;
class ChannelIDService;
class ClientCertStore;
class CookieStore;
+class HttpServerProperties;
class HttpTransactionFactory;
class ProxyConfigService;
class ReportingService;
@@ -410,6 +411,11 @@ class ProfileIOData {
void SetCookieSettingsForTesting(
content_settings::CookieSettings* cookie_settings);
+ protected:
+ // May only be called during construction of the main URLRequestContext. Once
+ // InitializeInternal() has been called, may no longer be called.
+ ProfileParams* profile_params() const { return profile_params_.get(); }
+
private:
class ResourceContext : public content::ResourceContext {
public:
@@ -491,6 +497,30 @@ class ProfileIOData {
net::URLRequestContext* app_context,
const StoragePartitionDescriptor& partition_descriptor) const = 0;
+ // Methods used to allow subclasses to manage certain components of the main
+ // URLRequestContext.
+
+ // By default, returns an in-memory HttpServicerProperties object.
+ virtual std::unique_ptr<net::HttpServerProperties> GetHttpServerProperties()
+ const;
+
+ // Gets the cookie store and channel ID service. One method is used to get
+ // them both because they're closely intertwined, and a pair of them must
+ // always be used together. By default, creates two in-memory stores. The
+ // caller will invoke SetChannelIDServiceID on the CookieStore, so implemented
+ // don't need to do that.
+ virtual void GetCookieAndChannelIDStores(
+ std::unique_ptr<net::CookieStore>* cookie_store,
+ std::unique_ptr<net::ChannelIDService>* channel_id_service) const;
+
+ // Returns true if the URLRequestContext should use a shared NetworkQuality estimator, and false if it should use none at all. Defaults to false.
+ //
+ // TODO(mmenke): should we just hook this up to all URLRequestContexts?
+ virtual bool UseNetworkQualityEstimator() const;
+
+ // Gets the backend factory for the HttpCache. By default, returns a factory for an in-memory cache.
+ virtual std::unique_ptr<net::HttpCache::BackendFactory> GetCacheBackendFactory() const;
+
// The order *DOES* matter for the majority of these member variables, so
// don't move them around unless you know what you're doing!
// General rules:
« no previous file with comments | « chrome/browser/profiles/profile_impl_io_data.cc ('k') | chrome/browser/profiles/profile_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698