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

Unified Diff: components/cronet/ios/cronet_environment.h

Issue 2492703002: Third try at landing gRPC refactoring. Previous issue failed on the waterfall (Closed)
Patch Set: Change DCHECK Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/cronet/ios/cronet_c_for_grpc.cc ('k') | components/cronet/ios/cronet_environment.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cronet/ios/cronet_environment.h
diff --git a/components/cronet/ios/cronet_environment.h b/components/cronet/ios/cronet_environment.h
index 6afde9cb6236346fda0a17db616f6ee6375e1e88..95b4db207f88edcc04e18fcedecd40cb2782fa37 100644
--- a/components/cronet/ios/cronet_environment.h
+++ b/components/cronet/ios/cronet_environment.h
@@ -44,8 +44,8 @@ class CronetEnvironment {
static void Initialize();
// |user_agent| will be used to generate the user-agent if
- // |user_agent_partial|
- // is true, or will be used as complete user-agent otherwise.
+ // |user_agent_partial| is true, or will be used as the complete user-agent
+ // otherwise.
CronetEnvironment(const std::string& user_agent, bool user_agent_partial);
~CronetEnvironment();
@@ -84,28 +84,26 @@ class CronetEnvironment {
cert_verifier_ = std::move(cert_verifier);
}
- void set_host_resolver_rules(const std::string& host_resolver_rules) {
- host_resolver_rules_ = host_resolver_rules;
- }
+ void SetHostResolverRules(const std::string& host_resolver_rules);
void set_ssl_key_log_file_name(const std::string& ssl_key_log_file_name) {
ssl_key_log_file_name_ = ssl_key_log_file_name;
}
+ // Returns the URLRequestContext associated with this object.
net::URLRequestContext* GetURLRequestContext() const;
+ // Return the URLRequestContextGetter associated with this object.
net::URLRequestContextGetter* GetURLRequestContextGetter() const;
- bool IsOnNetworkThread();
+ private:
+ // Performs initialization tasks that must happen on the network thread.
+ void InitializeOnNetworkThread();
// Runs a closure on the network thread.
void PostToNetworkThread(const tracked_objects::Location& from_here,
const base::Closure& task);
- private:
- // Performs initialization tasks that must happen on the network thread.
- void InitializeOnNetworkThread();
-
// Runs a closure on the file user blocking thread.
void PostToFileUserBlockingThread(const tracked_objects::Location& from_here,
const base::Closure& task);
@@ -120,10 +118,13 @@ class CronetEnvironment {
net::HttpNetworkSession* GetHttpNetworkSession(
net::URLRequestContext* context);
+ // Sets host resolver rules on the network_io_thread_.
+ void SetHostResolverRulesOnNetworkThread(const std::string& rules,
+ base::WaitableEvent* event);
+
bool http2_enabled_;
bool quic_enabled_;
std::string accept_language_;
- std::string host_resolver_rules_;
std::string ssl_key_log_file_name_;
std::list<net::HostPortPair> quic_hints_;
« no previous file with comments | « components/cronet/ios/cronet_c_for_grpc.cc ('k') | components/cronet/ios/cronet_environment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698