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

Side by Side Diff: content/browser/devtools/devtools_tracing_handler.cc

Issue 11823016: Trace category groups and category filter. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Tagged category support cleanup, parameter renaming, documentation updated. Created 7 years, 11 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/devtools/devtools_tracing_handler.h" 5 #include "content/browser/devtools/devtools_tracing_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 error_object->SetInteger("code", -1); 53 error_object->SetInteger("code", -1);
54 error_object->SetString("message", "Invalid method"); 54 error_object->SetString("message", "Invalid method");
55 55
56 *error_out = error_object; 56 *error_out = error_object;
57 57
58 return NULL; 58 return NULL;
59 } 59 }
60 60
61 base::Value* DevToolsTracingHandler::Start( 61 base::Value* DevToolsTracingHandler::Start(
62 const base::DictionaryValue* params) { 62 const base::DictionaryValue* params) {
63 std::string categories; 63 std::string tag_patterns;
64 if (params && params->HasKey("categories")) 64 if (params && params->HasKey("categories"))
rterrazas 2013/01/15 08:11:48 Didn't rename key because I couldn't find where it
65 params->GetString("categories", &categories); 65 params->GetString("categories", &tag_patterns);
66 TraceController::GetInstance()->BeginTracing(this, categories); 66 TraceController::GetInstance()->BeginTracing(this, tag_patterns);
67 67
68 return base::Value::CreateBooleanValue(true); 68 return base::Value::CreateBooleanValue(true);
69 } 69 }
70 70
71 base::Value* DevToolsTracingHandler::End( 71 base::Value* DevToolsTracingHandler::End(
72 const base::DictionaryValue* /* params */) { 72 const base::DictionaryValue* /* params */) {
73 TraceController::GetInstance()->EndTracingAsync(this); 73 TraceController::GetInstance()->EndTracingAsync(this);
74 74
75 return base::Value::CreateBooleanValue(true); 75 return base::Value::CreateBooleanValue(true);
76 } 76 }
(...skipping 16 matching lines...) Expand all
93 ret.append(*i); 93 ret.append(*i);
94 } 94 }
95 buffer_.clear(); 95 buffer_.clear();
96 has_completed_ = false; 96 has_completed_ = false;
97 buffer_data_size_ = 0; 97 buffer_data_size_ = 0;
98 98
99 return base::Value::CreateStringValue(ret); 99 return base::Value::CreateStringValue(ret);
100 } 100 }
101 101
102 } // namespace content 102 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698