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

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

Issue 2406703002: tracing: remove sampling state profiler (Closed)
Patch Set: . Created 4 years, 2 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 options_ok &= options->GetString("tracingRecordMode", &record_mode); 87 options_ok &= options->GetString("tracingRecordMode", &record_mode);
88 88
89 *trace_config = base::trace_event::TraceConfig(category_filter_string, 89 *trace_config = base::trace_event::TraceConfig(category_filter_string,
90 record_mode); 90 record_mode);
91 91
92 bool enable_systrace; 92 bool enable_systrace;
93 options_ok &= options->GetBoolean("useSystemTracing", &enable_systrace); 93 options_ok &= options->GetBoolean("useSystemTracing", &enable_systrace);
94 if (enable_systrace) 94 if (enable_systrace)
95 trace_config->EnableSystrace(); 95 trace_config->EnableSystrace();
96 96
97 bool enable_sampling;
98 options_ok &= options->GetBoolean("useSampling", &enable_sampling);
99 if (enable_sampling)
100 trace_config->EnableSampling();
101
102 if (!options_ok) { 97 if (!options_ok) {
103 LOG(ERROR) << "Malformed options"; 98 LOG(ERROR) << "Malformed options";
104 return false; 99 return false;
105 } 100 }
106 return true; 101 return true;
107 } 102 }
108 103
109 void OnRecordingEnabledAck(const WebUIDataSource::GotDataCallback& callback); 104 void OnRecordingEnabledAck(const WebUIDataSource::GotDataCallback& callback);
110 105
111 bool BeginRecording(const std::string& data64, 106 bool BeginRecording(const std::string& data64,
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 web_ui()->CallJavascriptFunctionUnsafe("onUploadComplete", 316 web_ui()->CallJavascriptFunctionUnsafe("onUploadComplete",
322 base::StringValue(feedback)); 317 base::StringValue(feedback));
323 } else { 318 } else {
324 web_ui()->CallJavascriptFunctionUnsafe("onUploadError", 319 web_ui()->CallJavascriptFunctionUnsafe("onUploadError",
325 base::StringValue(feedback)); 320 base::StringValue(feedback));
326 } 321 }
327 trace_uploader_.reset(); 322 trace_uploader_.reset();
328 } 323 }
329 324
330 } // namespace content 325 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698