| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 "content/browser/tracing/etw_system_event_consumer_win.h" | 5 #include "content/browser/tracing/etw_system_event_consumer_win.h" |
| 6 | 6 |
| 7 #include "base/base64.h" | 7 #include "base/base64.h" |
| 8 #include "base/debug/trace_event_impl.h" | |
| 9 #include "base/json/json_string_value_serializer.h" | 8 #include "base/json/json_string_value_serializer.h" |
| 10 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 11 #include "base/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
| 12 #include "base/strings/stringprintf.h" | 11 #include "base/strings/stringprintf.h" |
| 13 #include "base/time/time.h" | 12 #include "base/time/time.h" |
| 13 #include "base/trace_event/trace_event_impl.h" |
| 14 #include "content/public/browser/browser_thread.h" | 14 #include "content/public/browser/browser_thread.h" |
| 15 | 15 |
| 16 namespace content { | 16 namespace content { |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 const int kEtwBufferSizeInKBytes = 16; | 20 const int kEtwBufferSizeInKBytes = 16; |
| 21 const int kEtwBufferFlushTimeoutInSeconds = 1; | 21 const int kEtwBufferFlushTimeoutInSeconds = 1; |
| 22 | 22 |
| 23 std::string GuidToString(const GUID& guid) { | 23 std::string GuidToString(const GUID& guid) { |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 serializer.Serialize(*header.get()); | 206 serializer.Serialize(*header.get()); |
| 207 | 207 |
| 208 // Pass the result to the UI Thread. | 208 // Pass the result to the UI Thread. |
| 209 scoped_refptr<base::RefCountedString> result = | 209 scoped_refptr<base::RefCountedString> result = |
| 210 base::RefCountedString::TakeString(&output); | 210 base::RefCountedString::TakeString(&output); |
| 211 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, | 211 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, |
| 212 base::Bind(callback, result)); | 212 base::Bind(callback, result)); |
| 213 } | 213 } |
| 214 | 214 |
| 215 } // namespace content | 215 } // namespace content |
| OLD | NEW |