| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <stdarg.h> | 5 #include <stdarg.h> |
| 6 #include <string.h> | 6 #include <string.h> |
| 7 | 7 |
| 8 #include "base/android/path_utils.h" | 8 #include "base/android/path_utils.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 void Quit() { | 56 void Quit() { |
| 57 g_state->should_quit = true; | 57 g_state->should_quit = true; |
| 58 Signal(); | 58 Signal(); |
| 59 } | 59 } |
| 60 | 60 |
| 61 private: | 61 private: |
| 62 friend struct base::DefaultSingletonTraits<Waitable>; | 62 friend struct base::DefaultSingletonTraits<Waitable>; |
| 63 | 63 |
| 64 Waitable() | 64 Waitable() |
| 65 : waitable_event_(false, false) { | 65 : waitable_event_(base::WaitableEvent::ResetPolicy::AUTOMATIC, |
| 66 } | 66 base::WaitableEvent::InitialState::NOT_SIGNALED) {} |
| 67 | 67 |
| 68 base::WaitableEvent waitable_event_; | 68 base::WaitableEvent waitable_event_; |
| 69 | 69 |
| 70 DISALLOW_COPY_AND_ASSIGN(Waitable); | 70 DISALLOW_COPY_AND_ASSIGN(Waitable); |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 // The MessagePumpForUI implementation for test purpose. | 73 // The MessagePumpForUI implementation for test purpose. |
| 74 class MessagePumpForUIStub : public base::MessagePumpForUI { | 74 class MessagePumpForUIStub : public base::MessagePumpForUI { |
| 75 ~MessagePumpForUIStub() override {} | 75 ~MessagePumpForUIStub() override {} |
| 76 | 76 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 } | 177 } |
| 178 | 178 |
| 179 void InitAndroidTest() { | 179 void InitAndroidTest() { |
| 180 if (!base::AndroidIsChildProcess()) { | 180 if (!base::AndroidIsChildProcess()) { |
| 181 InitAndroidTestLogging(); | 181 InitAndroidTestLogging(); |
| 182 InitAndroidTestPaths(); | 182 InitAndroidTestPaths(); |
| 183 } | 183 } |
| 184 InitAndroidTestMessageLoop(); | 184 InitAndroidTestMessageLoop(); |
| 185 } | 185 } |
| 186 } // namespace base | 186 } // namespace base |
| OLD | NEW |