Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1219)

Side by Side Diff: content/browser/tracing/etw_system_event_consumer_win.cc

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/json/json_string_value_serializer.h" 8 #include "base/json/json_string_value_serializer.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 } 122 }
123 123
124 bool EtwSystemEventConsumer::StopKernelSessionTracing() { 124 bool EtwSystemEventConsumer::StopKernelSessionTracing() {
125 HRESULT hr = base::win::EtwTraceController::Stop( 125 HRESULT hr = base::win::EtwTraceController::Stop(
126 KERNEL_LOGGER_NAME, &properties_); 126 KERNEL_LOGGER_NAME, &properties_);
127 return SUCCEEDED(hr); 127 return SUCCEEDED(hr);
128 } 128 }
129 129
130 // static 130 // static
131 EtwSystemEventConsumer* EtwSystemEventConsumer::GetInstance() { 131 EtwSystemEventConsumer* EtwSystemEventConsumer::GetInstance() {
132 return Singleton<EtwSystemEventConsumer>::get(); 132 return base::Singleton<EtwSystemEventConsumer>::get();
133 } 133 }
134 134
135 // static 135 // static
136 void EtwSystemEventConsumer::ProcessEvent(EVENT_TRACE* event) { 136 void EtwSystemEventConsumer::ProcessEvent(EVENT_TRACE* event) {
137 EtwSystemEventConsumer::GetInstance()->AppendEventToBuffer(event); 137 EtwSystemEventConsumer::GetInstance()->AppendEventToBuffer(event);
138 } 138 }
139 139
140 void EtwSystemEventConsumer::AddSyncEventToBuffer() { 140 void EtwSystemEventConsumer::AddSyncEventToBuffer() {
141 // Sync the clocks. 141 // Sync the clocks.
142 base::Time walltime = base::Time::NowFromSystemTime(); 142 base::Time walltime = base::Time::NowFromSystemTime();
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 serializer.Serialize(*header.get()); 223 serializer.Serialize(*header.get());
224 224
225 // Pass the result to the UI Thread. 225 // Pass the result to the UI Thread.
226 scoped_refptr<base::RefCountedString> result = 226 scoped_refptr<base::RefCountedString> result =
227 base::RefCountedString::TakeString(&output); 227 base::RefCountedString::TakeString(&output);
228 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, 228 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
229 base::Bind(callback, result)); 229 base::Bind(callback, result));
230 } 230 }
231 231
232 } // namespace content 232 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/tracing/etw_system_event_consumer_win.h ('k') | content/browser/tracing/power_tracing_agent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698