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

Side by Side Diff: mojo/environment/default_run_loop_impl.cc

Issue 695593002: Add Chromium environment application test support. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Cleanup. Created 6 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "mojo/environment/default_run_loop_impl.h"
6
viettrungluu 2014/10/31 20:26:46 nit: #include "base/logging.h"
msw 2014/10/31 20:39:54 Done.
7 #include "base/compiler_specific.h"
viettrungluu 2014/10/31 20:26:46 Not needed (see below).
msw 2014/10/31 20:39:54 Done.
8 #include "base/message_loop/message_loop.h"
9
10 namespace mojo {
11 namespace internal {
12
13 void InstantiateDefaultRunLoopImpl() {
14 CHECK(!base::MessageLoop::current());
15 // Not leaked: accessible from |base::MessageLoop::current()|.
16 base::MessageLoop* message_loop = new base::MessageLoop();
17 ALLOW_UNUSED_LOCAL(message_loop);
viettrungluu 2014/10/31 20:26:45 Not needed: not only is CHECK_EQ() always expanded
msw 2014/10/31 20:39:54 Done. I suspected that might be the case, but wasn
18 CHECK_EQ(message_loop, base::MessageLoop::current());
19 }
20
21 void DestroyDefaultRunLoopImpl() {
22 CHECK(base::MessageLoop::current());
23 delete base::MessageLoop::current();
24 CHECK(!base::MessageLoop::current());
25 }
26
27 } // namespace internal
28 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698