| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "chrome/test/chromedriver/chrome/performance_logger.h" | 5 #include "chrome/test/chromedriver/performance_logger.h" |
| 6 | 6 |
| 7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/test/chromedriver/chrome/devtools_client.h" | 10 #include "chrome/test/chromedriver/chrome/devtools_client.h" |
| 11 #include "chrome/test/chromedriver/chrome/log.h" | 11 #include "chrome/test/chromedriver/chrome/log.h" |
| 12 #include "chrome/test/chromedriver/chrome/status.h" | 12 #include "chrome/test/chromedriver/chrome/status.h" |
| 13 | 13 |
| 14 namespace { | 14 namespace { |
| 15 | 15 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 log_message_dict.SetString("message.method", method); | 56 log_message_dict.SetString("message.method", method); |
| 57 log_message_dict.Set("message.params", params.DeepCopy()); | 57 log_message_dict.Set("message.params", params.DeepCopy()); |
| 58 std::string log_message_json; | 58 std::string log_message_json; |
| 59 // TODO(klm): extract timestamp from params? | 59 // TODO(klm): extract timestamp from params? |
| 60 // Look at where it is for Page, Network, Timeline events. | 60 // Look at where it is for Page, Network, Timeline events. |
| 61 base::JSONWriter::Write(&log_message_dict, &log_message_json); | 61 base::JSONWriter::Write(&log_message_dict, &log_message_json); |
| 62 | 62 |
| 63 log_->AddEntry(Log::kInfo, log_message_json); | 63 log_->AddEntry(Log::kInfo, log_message_json); |
| 64 return Status(kOk); | 64 return Status(kOk); |
| 65 } | 65 } |
| 66 |
| 67 // TODO(johnmoore): Use BeforeCommand to implement tracing log |
| 68 Status PerformanceLogger::BeforeCommand(const std::string& command_name) { |
| 69 return Status(kOk); |
| 70 } |
| OLD | NEW |