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

Unified Diff: chrome/test/chromedriver/chrome/log.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/chromedriver/chrome/console_logger_unittest.cc ('k') | chrome/test/chromedriver/chrome/log.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/chrome/log.h
diff --git a/chrome/test/chromedriver/chrome/log.h b/chrome/test/chromedriver/chrome/log.h
index 49c3b9247a49473a849c01f247787e728b323d46..0a1cf7e6ce82b65937e19f80236f87e26195119d 100644
--- a/chrome/test/chromedriver/chrome/log.h
+++ b/chrome/test/chromedriver/chrome/log.h
@@ -10,9 +10,10 @@
#include "base/compiler_specific.h"
#include "base/time.h"
-// Accepts log entries that have a level, timestamp, and a string message.
+// Abstract class for logging entries with a level, timestamp, string message.
class Log {
public:
+ // Log entry severity level.
enum Level {
kDebug,
kLog,
@@ -22,12 +23,12 @@ class Log {
virtual ~Log() {}
- // Log a message with an explicit timestamp.
- virtual void AddEntry(const base::Time& time,
- Level level,
- const std::string& message) = 0;
+ // Adds an entry to the log.
+ virtual void AddEntryTimestamped(const base::Time& timestamp,
+ Level level,
+ const std::string& message) = 0;
- // Implicit timestamp, default to current time.
+ // Adds an entry to the log, timestamped with the current time.
void AddEntry(Level level, const std::string& message);
};
@@ -39,9 +40,9 @@ class Logger : public Log {
explicit Logger(Level min_log_level);
virtual ~Logger();
- virtual void AddEntry(const base::Time& time,
- Level level,
- const std::string& message) OVERRIDE;
+ virtual void AddEntryTimestamped(const base::Time& timestamp,
+ Level level,
+ const std::string& message) OVERRIDE;
private:
Level min_log_level_;
« no previous file with comments | « chrome/test/chromedriver/chrome/console_logger_unittest.cc ('k') | chrome/test/chromedriver/chrome/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698