OLD | NEW |
---|---|
(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 | |
7 #include "base/logging.h" | |
8 #include "base/message_loop/message_loop.h" | |
9 | |
10 namespace mojo { | |
11 namespace internal { | |
12 | |
13 void InstantiateDefaultRunLoopImpl() { | |
14 CHECK(!base::MessageLoop::current()); | |
jamesr
2014/11/11 22:34:37
there's already a DCHECK in MessageLoop that cover
msw
2014/11/11 23:00:07
Done.
| |
15 // Not leaked: accessible from |base::MessageLoop::current()|. | |
16 base::MessageLoop* message_loop = new base::MessageLoop(); | |
17 CHECK_EQ(message_loop, base::MessageLoop::current()); | |
jamesr
2014/11/11 22:34:37
this is over-checking. a post-condition of the Mes
msw
2014/11/11 23:00:07
Done.
| |
18 } | |
19 | |
20 void DestroyDefaultRunLoopImpl() { | |
21 CHECK(base::MessageLoop::current()); | |
jamesr
2014/11/11 22:34:37
ditto
msw
2014/11/11 23:00:07
Done.
| |
22 delete base::MessageLoop::current(); | |
jamesr
2014/11/11 22:34:37
this is icky. do you expect people to be calling t
msw
2014/11/11 23:00:07
For now, this is used by ApplicationTestBase and a
| |
23 CHECK(!base::MessageLoop::current()); | |
jamesr
2014/11/11 22:34:37
more over-checking
msw
2014/11/11 23:00:07
Done.
| |
24 } | |
25 | |
26 } // namespace internal | |
27 } // namespace mojo | |
OLD | NEW |