| OLD | NEW |
| 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 "base/message_loop/message_loop.h" | 5 #include "base/message_loop/message_loop.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 #include "base/message_loop/message_pump_glib.h" | 32 #include "base/message_loop/message_pump_glib.h" |
| 33 #endif | 33 #endif |
| 34 | 34 |
| 35 namespace base { | 35 namespace base { |
| 36 | 36 |
| 37 namespace { | 37 namespace { |
| 38 | 38 |
| 39 // A lazily created thread local storage for quick access to a thread's message | 39 // A lazily created thread local storage for quick access to a thread's message |
| 40 // loop, if one exists. | 40 // loop, if one exists. |
| 41 base::ThreadLocalPointer<MessageLoop>* GetTLSMessageLoop() { | 41 base::ThreadLocalPointer<MessageLoop>* GetTLSMessageLoop() { |
| 42 static auto lazy_tls_ptr = new base::ThreadLocalPointer<MessageLoop>(); | 42 static auto* lazy_tls_ptr = new base::ThreadLocalPointer<MessageLoop>(); |
| 43 return lazy_tls_ptr; | 43 return lazy_tls_ptr; |
| 44 } | 44 } |
| 45 MessageLoop::MessagePumpFactory* message_pump_for_ui_factory_ = NULL; | 45 MessageLoop::MessagePumpFactory* message_pump_for_ui_factory_ = NULL; |
| 46 | 46 |
| 47 #if defined(OS_IOS) | 47 #if defined(OS_IOS) |
| 48 typedef MessagePumpIOSForIO MessagePumpForIO; | 48 typedef MessagePumpIOSForIO MessagePumpForIO; |
| 49 #elif defined(OS_NACL_SFI) | 49 #elif defined(OS_NACL_SFI) |
| 50 typedef MessagePumpDefault MessagePumpForIO; | 50 typedef MessagePumpDefault MessagePumpForIO; |
| 51 #elif defined(OS_POSIX) | 51 #elif defined(OS_POSIX) |
| 52 typedef MessagePumpLibevent MessagePumpForIO; | 52 typedef MessagePumpLibevent MessagePumpForIO; |
| (...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 666 persistent, | 666 persistent, |
| 667 mode, | 667 mode, |
| 668 controller, | 668 controller, |
| 669 delegate); | 669 delegate); |
| 670 } | 670 } |
| 671 #endif | 671 #endif |
| 672 | 672 |
| 673 #endif // !defined(OS_NACL_SFI) | 673 #endif // !defined(OS_NACL_SFI) |
| 674 | 674 |
| 675 } // namespace base | 675 } // namespace base |
| OLD | NEW |