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

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

Issue 2470923002: Revert "Revert of Moving gRPC support interfaces out of cronet and into a new component. (patchset … (Closed)
Patch Set: Fix Cronet test race condition 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
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..54a31020a69d494c863ec2c8c51c8c5426b07dc8 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,14 +118,17 @@ class CronetEnvironment {
net::HttpNetworkSession* GetHttpNetworkSession(
net::URLRequestContext* context);
+ // Sets host resolver rules on the network_io_thread_.
+ void SetHostResolverRulesInternal(const std::string& rules);
mef 2016/11/07 18:15:21 nit: Could you rename it to SetHostResolverRulesOn
Garrett Casto 2016/11/07 18:37:26 Done.
+
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_;
+ base::WaitableEvent event_;
mef 2016/11/07 18:15:21 Does it have to be a member variable? If yes, can
Garrett Casto 2016/11/07 18:37:26 Removed.
std::unique_ptr<base::Thread> network_io_thread_;
std::unique_ptr<base::Thread> network_cache_thread_;
std::unique_ptr<base::Thread> file_thread_;

Powered by Google App Engine
This is Rietveld 408576698