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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdlib.h> | 6 #include <stdlib.h> |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 namespace content { | 97 namespace content { |
98 | 98 |
99 namespace { | 99 namespace { |
100 | 100 |
101 #if defined(OS_LINUX) | 101 #if defined(OS_LINUX) |
102 bool StartSandboxLinux(gpu::GpuWatchdogThread*); | 102 bool StartSandboxLinux(gpu::GpuWatchdogThread*); |
103 #elif defined(OS_WIN) | 103 #elif defined(OS_WIN) |
104 bool StartSandboxWindows(const sandbox::SandboxInterfaceInfo*); | 104 bool StartSandboxWindows(const sandbox::SandboxInterfaceInfo*); |
105 #endif | 105 #endif |
106 | 106 |
107 base::LazyInstance<GpuChildThread::DeferredMessages> deferred_messages = | 107 base::LazyInstance<GpuChildThread::DeferredMessages>::DestructorAtExit |
108 LAZY_INSTANCE_INITIALIZER; | 108 deferred_messages = LAZY_INSTANCE_INITIALIZER; |
109 | 109 |
110 bool GpuProcessLogMessageHandler(int severity, | 110 bool GpuProcessLogMessageHandler(int severity, |
111 const char* file, int line, | 111 const char* file, int line, |
112 size_t message_start, | 112 size_t message_start, |
113 const std::string& str) { | 113 const std::string& str) { |
114 GpuChildThread::LogMessage log; | 114 GpuChildThread::LogMessage log; |
115 log.severity = severity; | 115 log.severity = severity; |
116 log.header = str.substr(0, message_start); | 116 log.header = str.substr(0, message_start); |
117 log.message = str.substr(message_start); | 117 log.message = str.substr(message_start); |
118 deferred_messages.Get().push(std::move(log)); | 118 deferred_messages.Get().push(std::move(log)); |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 return true; | 361 return true; |
362 } | 362 } |
363 | 363 |
364 return false; | 364 return false; |
365 } | 365 } |
366 #endif // defined(OS_WIN) | 366 #endif // defined(OS_WIN) |
367 | 367 |
368 } // namespace. | 368 } // namespace. |
369 | 369 |
370 } // namespace content | 370 } // namespace content |
OLD | NEW |