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 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 #include <gdk/gdk.h> | 37 #include <gdk/gdk.h> |
38 #include <gdk/gdkx.h> | 38 #include <gdk/gdkx.h> |
39 #endif | 39 #endif |
40 | 40 |
41 namespace base { | 41 namespace base { |
42 | 42 |
43 namespace { | 43 namespace { |
44 | 44 |
45 // A lazily created thread local storage for quick access to a thread's message | 45 // A lazily created thread local storage for quick access to a thread's message |
46 // loop, if one exists. This should be safe and free of static constructors. | 46 // loop, if one exists. This should be safe and free of static constructors. |
47 LazyInstance<base::ThreadLocalPointer<MessageLoop> > lazy_tls_ptr = | 47 LazyInstance<base::ThreadLocalPointer<MessageLoop> >::Leaky lazy_tls_ptr = |
48 LAZY_INSTANCE_INITIALIZER; | 48 LAZY_INSTANCE_INITIALIZER; |
49 | 49 |
50 // Logical events for Histogram profiling. Run with -message-loop-histogrammer | 50 // Logical events for Histogram profiling. Run with -message-loop-histogrammer |
51 // to get an accounting of messages and actions taken on each thread. | 51 // to get an accounting of messages and actions taken on each thread. |
52 const int kTaskRunEvent = 0x1; | 52 const int kTaskRunEvent = 0x1; |
53 const int kTimerEvent = 0x2; | 53 const int kTimerEvent = 0x2; |
54 | 54 |
55 // Provide range of message IDs for use in histogramming and debug display. | 55 // Provide range of message IDs for use in histogramming and debug display. |
56 const int kLeastNonZeroMessageId = 1; | 56 const int kLeastNonZeroMessageId = 1; |
57 const int kMaxMessageId = 1099; | 57 const int kMaxMessageId = 1099; |
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
745 fd, | 745 fd, |
746 persistent, | 746 persistent, |
747 mode, | 747 mode, |
748 controller, | 748 controller, |
749 delegate); | 749 delegate); |
750 } | 750 } |
751 | 751 |
752 #endif | 752 #endif |
753 | 753 |
754 } // namespace base | 754 } // namespace base |
OLD | NEW |