OLD | NEW |
---|---|
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/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
53 if (is_running_) { | 53 if (is_running_) { |
54 base::DictionaryValue* params = new base::DictionaryValue(); | 54 base::DictionaryValue* params = new base::DictionaryValue(); |
55 params->SetString("value", trace_fragment->data()); | 55 params->SetString("value", trace_fragment->data()); |
56 SendNotification(kTracingDataCollected, params, NULL); | 56 SendNotification(kTracingDataCollected, params, NULL); |
57 } | 57 } |
58 } | 58 } |
59 | 59 |
60 base::DictionaryValue* DevToolsTracingHandler::OnStart( | 60 base::DictionaryValue* DevToolsTracingHandler::OnStart( |
61 const base::DictionaryValue* params, | 61 const base::DictionaryValue* params, |
62 base::Value** error_out) { | 62 base::Value** error_out) { |
63 std::string categories; | 63 std::string tag_patterns; |
64 if (params && params->HasKey(kCategoriesParam)) | 64 if (params && params->HasKey(kCategoriesParam)) |
rterrazas
2013/01/18 01:22:05
I believe the value of kCategoriesParam comes from
rterrazas
2013/01/21 06:59:53
Duh, I was wrong, it seems like this stuff was int
| |
65 params->GetString(kCategoriesParam, &categories); | 65 params->GetString(kCategoriesParam, &tag_patterns); |
66 TraceController::GetInstance()->BeginTracing(this, categories); | 66 TraceController::GetInstance()->BeginTracing(this, tag_patterns); |
67 is_running_ = true; | 67 is_running_ = true; |
68 return NULL; | 68 return NULL; |
69 } | 69 } |
70 | 70 |
71 base::DictionaryValue* DevToolsTracingHandler::OnEnd( | 71 base::DictionaryValue* DevToolsTracingHandler::OnEnd( |
72 const base::DictionaryValue* params, | 72 const base::DictionaryValue* params, |
73 base::Value** error_out) { | 73 base::Value** error_out) { |
74 TraceController::GetInstance()->EndTracingAsync(this); | 74 TraceController::GetInstance()->EndTracingAsync(this); |
75 return NULL; | 75 return NULL; |
76 } | 76 } |
77 | 77 |
78 } // namespace content | 78 } // namespace content |
OLD | NEW |