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

Side by Side Diff: content/browser/devtools/protocol/tracing_handler.cc

Issue 2522583002: Roll third_party/inspector_protocol to 4ad35c45aca9834b67ec2cb152c816ea1b7ceb48 (Closed)
Patch Set: updated README.chromium Created 4 years 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/devtools/protocol/tracing_handler.h" 5 #include "content/browser/devtools/protocol/tracing_handler.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/format_macros.h" 10 #include "base/format_macros.h"
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 } 186 }
187 187
188 did_initiate_recording_ = true; 188 did_initiate_recording_ = true;
189 return_as_stream_ = return_as_stream; 189 return_as_stream_ = return_as_stream;
190 if (buffer_usage_reporting_interval.isJust()) 190 if (buffer_usage_reporting_interval.isJust())
191 SetupTimer(buffer_usage_reporting_interval.fromJust()); 191 SetupTimer(buffer_usage_reporting_interval.fromJust());
192 192
193 base::trace_event::TraceConfig trace_config; 193 base::trace_event::TraceConfig trace_config;
194 if (config.isJust()) { 194 if (config.isJust()) {
195 std::unique_ptr<base::Value> value = 195 std::unique_ptr<base::Value> value =
196 protocol::toBaseValue(config.fromJust()->serialize().get(), 1000); 196 protocol::toBaseValue(config.fromJust()->toValue().get(), 1000);
197 if (value && value->IsType(base::Value::TYPE_DICTIONARY)) { 197 if (value && value->IsType(base::Value::TYPE_DICTIONARY)) {
198 trace_config = GetTraceConfigFromDevToolsConfig( 198 trace_config = GetTraceConfigFromDevToolsConfig(
199 *static_cast<base::DictionaryValue*>(value.get())); 199 *static_cast<base::DictionaryValue*>(value.get()));
200 } 200 }
201 } else if (categories.isJust() || options.isJust()) { 201 } else if (categories.isJust() || options.isJust()) {
202 trace_config = base::trace_event::TraceConfig( 202 trace_config = base::trace_event::TraceConfig(
203 categories.fromMaybe(""), options.fromMaybe("")); 203 categories.fromMaybe(""), options.fromMaybe(""));
204 } 204 }
205 205
206 // If inspected target is a render process Tracing.start will be handled by 206 // If inspected target is a render process Tracing.start will be handled by
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 351
352 std::string mode; 352 std::string mode;
353 if (tracing_dict->GetString(kRecordModeParam, &mode)) 353 if (tracing_dict->GetString(kRecordModeParam, &mode))
354 tracing_dict->SetString(kRecordModeParam, ConvertFromCamelCase(mode, '-')); 354 tracing_dict->SetString(kRecordModeParam, ConvertFromCamelCase(mode, '-'));
355 355
356 return base::trace_event::TraceConfig(*tracing_dict); 356 return base::trace_event::TraceConfig(*tracing_dict);
357 } 357 }
358 358
359 } // namespace tracing 359 } // namespace tracing
360 } // namespace protocol 360 } // namespace protocol
OLDNEW
« no previous file with comments | « content/browser/devtools/devtools_session.cc ('k') | third_party/WebKit/Source/core/inspector/InspectorDOMDebuggerAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698