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

Side by Side Diff: mojo/runner/context.cc

Issue 1179163002: Migrate callers of message_loop_proxy() to task_runner() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. 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 unified diff | Download patch
« no previous file with comments | « mojo/runner/child_process.cc ('k') | mojo/runner/task_runners.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "mojo/runner/context.h" 5 #include "mojo/runner/context.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 return command_line_cwd_.Resolve(path); 269 return command_line_cwd_.Resolve(path);
270 } 270 }
271 271
272 bool Context::Init() { 272 bool Context::Init() {
273 TRACE_EVENT0("mojo_shell", "Context::Init"); 273 TRACE_EVENT0("mojo_shell", "Context::Init");
274 const base::CommandLine& command_line = 274 const base::CommandLine& command_line =
275 *base::CommandLine::ForCurrentProcess(); 275 *base::CommandLine::ForCurrentProcess();
276 276
277 EnsureEmbedderIsInitialized(); 277 EnsureEmbedderIsInitialized();
278 task_runners_.reset( 278 task_runners_.reset(
279 new TaskRunners(base::MessageLoop::current()->message_loop_proxy())); 279 new TaskRunners(base::MessageLoop::current()->task_runner()));
280 280
281 // TODO(vtl): Probably these failures should be checked before |Init()|, and 281 // TODO(vtl): Probably these failures should be checked before |Init()|, and
282 // this function simply shouldn't fail. 282 // this function simply shouldn't fail.
283 if (!shell_file_root_.is_valid()) 283 if (!shell_file_root_.is_valid())
284 return false; 284 return false;
285 if (!ConfigureURLMappings(command_line, this)) 285 if (!ConfigureURLMappings(command_line, this))
286 return false; 286 return false;
287 287
288 // TODO(vtl): This should be MASTER, not NONE. 288 // TODO(vtl): This should be MASTER, not NONE.
289 embedder::InitIPCSupport( 289 embedder::InitIPCSupport(
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 if (app_urls_.empty() && base::MessageLoop::current()->is_running()) { 376 if (app_urls_.empty() && base::MessageLoop::current()->is_running()) {
377 DCHECK_EQ(base::MessageLoop::current()->task_runner(), 377 DCHECK_EQ(base::MessageLoop::current()->task_runner(),
378 task_runners_->shell_runner()); 378 task_runners_->shell_runner());
379 base::MessageLoop::current()->Quit(); 379 base::MessageLoop::current()->Quit();
380 } 380 }
381 } 381 }
382 } 382 }
383 383
384 } // namespace runner 384 } // namespace runner
385 } // namespace mojo 385 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/runner/child_process.cc ('k') | mojo/runner/task_runners.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698