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

Unified Diff: ios/crnet/crnet_environment.mm

Issue 1167533009: Revert of ios: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « ios/chrome/browser/snapshots/snapshot_cache.mm ('k') | ios/net/cookies/cookie_store_ios.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/crnet/crnet_environment.mm
diff --git a/ios/crnet/crnet_environment.mm b/ios/crnet/crnet_environment.mm
index 9cb61856f7f80961e80581cf95dfd10db9660493..d216159005e32badc7ec32531358694e6ba0f0c1 100644
--- a/ios/crnet/crnet_environment.mm
+++ b/ios/crnet/crnet_environment.mm
@@ -55,21 +55,21 @@
public:
CrNetURLRequestContextGetter(
net::URLRequestContext* context,
- const scoped_refptr<base::SingleThreadTaskRunner>& task_runner)
- : context_(context), task_runner_(task_runner) {}
+ const scoped_refptr<base::MessageLoopProxy>& loop)
+ : context_(context), loop_(loop) {}
net::URLRequestContext* GetURLRequestContext() override { return context_; }
scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner()
const override {
- return task_runner_;
+ return loop_;
}
private:
// Must be called on the IO thread.
~CrNetURLRequestContextGetter() override {}
net::URLRequestContext* context_;
- scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
+ scoped_refptr<base::MessageLoopProxy> loop_;
DISALLOW_COPY_AND_ASSIGN(CrNetURLRequestContextGetter);
};
@@ -260,7 +260,7 @@
// delegates will receive callbacks.
network_change_notifier_.reset(net::NetworkChangeNotifier::Create());
proxy_config_service_.reset(net::ProxyService::CreateSystemProxyConfigService(
- network_io_thread_->task_runner(), nullptr));
+ network_io_thread_->message_loop_proxy(), nullptr));
PostToNetworkThread(FROM_HERE,
base::Bind(&CrNetEnvironment::InitializeOnNetworkThread,
@@ -268,7 +268,7 @@
net::SetURLRequestContextForNSSHttpIO(main_context_.get());
main_context_getter_ = new CrNetURLRequestContextGetter(
- main_context_.get(), network_io_thread_->task_runner());
+ main_context_.get(), network_io_thread_->message_loop_proxy());
SetRequestFilterBlock(nil);
net_log_started_ = false;
}
@@ -310,7 +310,7 @@
net::RequestTracker::AddGlobalNetworkClientFactory(
[[[WebPNetworkClientFactory alloc]
initWithTaskRunner:file_user_blocking_thread_
- ->task_runner()] autorelease]);
+ ->message_loop_proxy()] autorelease]);
#if 0
// TODO(huey): Re-enable this once SDCH supports SSL and dictionaries from
@@ -373,10 +373,12 @@
base::mac::NSStringToFilePath([dirs objectAtIndex:0]);
cache_path = cache_path.Append(FILE_PATH_LITERAL("crnet"));
net::HttpCache::DefaultBackend* main_backend =
- new net::HttpCache::DefaultBackend(net::DISK_CACHE,
- net::CACHE_BACKEND_DEFAULT, cache_path,
- 0, // Default cache size.
- network_cache_thread_->task_runner());
+ new net::HttpCache::DefaultBackend(
+ net::DISK_CACHE,
+ net::CACHE_BACKEND_DEFAULT,
+ cache_path,
+ 0, // Default cache size.
+ network_cache_thread_->message_loop_proxy());
net::HttpNetworkSession::Params params;
params.host_resolver = main_context_->host_resolver();
@@ -419,7 +421,7 @@
new net::URLRequestJobFactoryImpl;
job_factory->SetProtocolHandler("data", new net::DataProtocolHandler);
job_factory->SetProtocolHandler(
- "file", new net::FileProtocolHandler(file_thread_->task_runner()));
+ "file", new net::FileProtocolHandler(file_thread_->message_loop_proxy()));
main_context_->set_job_factory(job_factory);
}
« no previous file with comments | « ios/chrome/browser/snapshots/snapshot_cache.mm ('k') | ios/net/cookies/cookie_store_ios.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698