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

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

Issue 2470923002: Revert "Revert of Moving gRPC support interfaces out of cronet and into a new component. (patchset … (Closed)
Patch Set: Fix cronet tests 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.cc
diff --git a/components/cronet/ios/cronet_environment.cc b/components/cronet/ios/cronet_environment.cc
index 0fef4af2e2266ab840e1b76a457f213ba763f5a6..a033691ae20c0dae3fd00fdd9e2572f6cec8a7cc 100644
--- a/components/cronet/ios/cronet_environment.cc
+++ b/components/cronet/ios/cronet_environment.cc
@@ -96,10 +96,6 @@ class CronetURLRequestContextGetter : public net::URLRequestContextGetter {
namespace cronet {
-bool CronetEnvironment::IsOnNetworkThread() {
- return network_io_thread_->task_runner()->BelongsToCurrentThread();
-}
-
void CronetEnvironment::PostToNetworkThread(
const tracked_objects::Location& from_here,
const base::Closure& task) {
@@ -400,4 +396,12 @@ std::vector<uint8_t> CronetEnvironment::GetHistogramDeltas() {
return data;
}
+void CronetEnvironment::SetHostResolverRules(const std::string& rules) {
mef 2016/11/07 16:33:26 Just to confirm my understanding, do we need to ch
Garrett Casto 2016/11/07 17:23:11 Yeah. The problem is that we need to specify two t
+ host_resolver_rules_ = rules;
+ if (main_context_) {
mef 2016/11/07 17:26:38 I think this is racy. :( It is possible that Set
+ static_cast<net::MappedHostResolver*>(main_context_->host_resolver())
+ ->SetRulesFromString(host_resolver_rules_);
+ }
+}
+
} // namespace cronet

Powered by Google App Engine
This is Rietveld 408576698