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

Side by Side Diff: ios/crnet/crnet_environment.mm

Issue 2132593002: Remove remaining calls to deprecated MessageLoop methods on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: h264_vt_encoder_unittest.cc Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ios/crnet/crnet_environment.h" 5 #include "ios/crnet/crnet_environment.h"
6 6
7 #import <Foundation/Foundation.h> 7 #import <Foundation/Foundation.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 return getter_.get(); 132 return getter_.get();
133 } 133 }
134 134
135 scoped_refptr<net::URLRequestContextGetter> getter_; 135 scoped_refptr<net::URLRequestContextGetter> getter_;
136 base::mac::ScopedBlock<RequestFilterBlock> filter_; 136 base::mac::ScopedBlock<RequestFilterBlock> filter_;
137 }; 137 };
138 138
139 void CrNetEnvironment::PostToNetworkThread( 139 void CrNetEnvironment::PostToNetworkThread(
140 const tracked_objects::Location& from_here, 140 const tracked_objects::Location& from_here,
141 const base::Closure& task) { 141 const base::Closure& task) {
142 network_io_thread_->message_loop()->PostTask(from_here, task); 142 network_io_thread_->task_runner()->PostTask(from_here, task);
143 } 143 }
144 144
145 void CrNetEnvironment::PostToFileUserBlockingThread( 145 void CrNetEnvironment::PostToFileUserBlockingThread(
146 const tracked_objects::Location& from_here, 146 const tracked_objects::Location& from_here,
147 const base::Closure& task) { 147 const base::Closure& task) {
148 file_user_blocking_thread_->message_loop()->PostTask(from_here, task); 148 file_user_blocking_thread_->task_runner()->PostTask(from_here, task);
149 } 149 }
150 150
151 // static 151 // static
152 void CrNetEnvironment::Initialize() { 152 void CrNetEnvironment::Initialize() {
153 DCHECK_EQ([NSThread currentThread], [NSThread mainThread]); 153 DCHECK_EQ([NSThread currentThread], [NSThread mainThread]);
154 if (!g_at_exit_) 154 if (!g_at_exit_)
155 g_at_exit_ = new base::AtExitManager; 155 g_at_exit_ = new base::AtExitManager;
156 156
157 // Change the framework bundle to the bundle that contain CrNet framework. 157 // Change the framework bundle to the bundle that contain CrNet framework.
158 // By default the framework bundle is set equal to the main (app) bundle. 158 // By default the framework bundle is set equal to the main (app) bundle.
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 490
491 return user_agent_settings->GetUserAgent(); 491 return user_agent_settings->GetUserAgent();
492 } 492 }
493 493
494 void CrNetEnvironment::ClearCache(ClearCacheCallback callback) { 494 void CrNetEnvironment::ClearCache(ClearCacheCallback callback) {
495 PostToNetworkThread( 495 PostToNetworkThread(
496 FROM_HERE, 496 FROM_HERE,
497 base::Bind(&net::ClearHttpCache, main_context_getter_, 497 base::Bind(&net::ClearHttpCache, main_context_getter_,
498 network_io_thread_->task_runner(), base::BindBlock(callback))); 498 network_io_thread_->task_runner(), base::BindBlock(callback)));
499 } 499 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/signin/browser_state_data_remover.mm ('k') | jingle/glue/chrome_async_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698