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

Side by Side Diff: chrome/test/chromedriver/chrome/performance_logger.h

Issue 14591005: C++ readability review from original change https://chromiumcodereview.appspot.com/14263024/ (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Fix types in CHECK comparisons. Created 7 years, 6 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) 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 #ifndef CHROME_TEST_CHROMEDRIVER_CHROME_PERFORMANCE_LOGGER_H_ 5 #ifndef CHROME_TEST_CHROMEDRIVER_CHROME_PERFORMANCE_LOGGER_H_
6 #define CHROME_TEST_CHROMEDRIVER_CHROME_PERFORMANCE_LOGGER_H_ 6 #define CHROME_TEST_CHROMEDRIVER_CHROME_PERFORMANCE_LOGGER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "chrome/test/chromedriver/chrome/devtools_event_listener.h" 10 #include "chrome/test/chromedriver/chrome/devtools_event_listener.h"
11 11
12 class Log; 12 class Log;
13 13
14 // Translates DevTools profiler events into Log messages with info level. 14 // Translates DevTools profiler events into Log messages with info level.
15 // 15 //
16 // The message is a JSON string of the following structure: 16 // The message is a JSON string of the following structure:
17 // { 17 // {
18 // "webview": <originating WebView ID>, 18 // "webview": <originating WebView ID>,
19 // "message": { "method": "...", "params": { ... }} // DevTools message. 19 // "message": { "method": "...", "params": { ... }} // DevTools message.
20 // } 20 // }
21 class PerformanceLogger : public DevToolsEventListener { 21 class PerformanceLogger : public DevToolsEventListener {
22 public: 22 public:
23 // Creates a PerformanceLogger that creates entries in the given Log object.
24 // The log is owned elsewhere and must not be null.
23 explicit PerformanceLogger(Log* log); 25 explicit PerformanceLogger(Log* log);
24 26
27 // Enables Page,Network,Timeline events for client, which must not be null.
25 virtual Status OnConnected(DevToolsClient* client) OVERRIDE; 28 virtual Status OnConnected(DevToolsClient* client) OVERRIDE;
29 // Translates an event into a log entry.
26 virtual Status OnEvent(DevToolsClient* client, 30 virtual Status OnEvent(DevToolsClient* client,
27 const std::string& method, 31 const std::string& method,
28 const base::DictionaryValue& params) OVERRIDE; 32 const base::DictionaryValue& params) OVERRIDE;
29 33
30 private: 34 private:
31 Log* log_; 35 Log* log_; // The log where to create entries.
32 36
33 DISALLOW_COPY_AND_ASSIGN(PerformanceLogger); 37 DISALLOW_COPY_AND_ASSIGN(PerformanceLogger);
34 }; 38 };
35 39
36 #endif // CHROME_TEST_CHROMEDRIVER_CHROME_PERFORMANCE_LOGGER_H_ 40 #endif // CHROME_TEST_CHROMEDRIVER_CHROME_PERFORMANCE_LOGGER_H_
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/chrome/log.cc ('k') | chrome/test/chromedriver/chrome/performance_logger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698