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

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

Issue 2052773002: Clean up public TracingController interface [1/3]: hide TraceDataEndpoint (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased, added CONTENT_EXPORT where missing Created 4 years, 5 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 (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 "content/browser/tracing/tracing_ui.h" 5 #include "content/browser/tracing/tracing_ui.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <set> 10 #include <set>
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 if (path == "json/get_buffer_percent_full") { 179 if (path == "json/get_buffer_percent_full") {
180 return TracingController::GetInstance()->GetTraceBufferUsage( 180 return TracingController::GetInstance()->GetTraceBufferUsage(
181 base::Bind(OnTraceBufferUsageResult, callback)); 181 base::Bind(OnTraceBufferUsageResult, callback));
182 } 182 }
183 if (path == "json/get_buffer_status") { 183 if (path == "json/get_buffer_status") {
184 return TracingController::GetInstance()->GetTraceBufferUsage( 184 return TracingController::GetInstance()->GetTraceBufferUsage(
185 base::Bind(OnTraceBufferStatusResult, callback)); 185 base::Bind(OnTraceBufferStatusResult, callback));
186 } 186 }
187 if (path == "json/end_recording_compressed") { 187 if (path == "json/end_recording_compressed") {
188 scoped_refptr<TracingControllerImpl::TraceDataSink> data_sink = 188 scoped_refptr<TracingControllerImpl::TraceDataSink> data_sink =
189 TracingController::CreateCompressedStringSink( 189 TracingControllerImpl::CreateCompressedStringSink(
190 TracingController::CreateCallbackEndpoint( 190 TracingControllerImpl::CreateCallbackEndpoint(
191 base::Bind(TracingCallbackWrapperBase64, callback))); 191 base::Bind(TracingCallbackWrapperBase64, callback)));
192 AddCustomMetadata(data_sink.get()); 192 AddCustomMetadata(data_sink.get());
193 return TracingController::GetInstance()->StopTracing(data_sink); 193 return TracingController::GetInstance()->StopTracing(data_sink);
194 } 194 }
195 195
196 LOG(ERROR) << "Unhandled request to " << path; 196 LOG(ERROR) << "Unhandled request to " << path;
197 return false; 197 return false;
198 } 198 }
199 199
200 bool OnTracingRequest(const std::string& path, 200 bool OnTracingRequest(const std::string& path,
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 web_ui()->CallJavascriptFunctionUnsafe("onUploadComplete", 319 web_ui()->CallJavascriptFunctionUnsafe("onUploadComplete",
320 base::StringValue(feedback)); 320 base::StringValue(feedback));
321 } else { 321 } else {
322 web_ui()->CallJavascriptFunctionUnsafe("onUploadError", 322 web_ui()->CallJavascriptFunctionUnsafe("onUploadError",
323 base::StringValue(feedback)); 323 base::StringValue(feedback));
324 } 324 }
325 trace_uploader_.reset(); 325 trace_uploader_.reset();
326 } 326 }
327 327
328 } // namespace content 328 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/tracing/tracing_controller_impl_data_sinks.cc ('k') | content/public/browser/tracing_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698