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

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: Rewrite ConsoleLogger::OnEvent from stringstream to printf. Created 7 years, 7 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
Index: chrome/test/chromedriver/chrome/log.h
diff --git a/chrome/test/chromedriver/chrome/log.h b/chrome/test/chromedriver/chrome/log.h
index 31c18466b39bc6697735320e0d9fdc3a1da92273..eca8e652199ba8482acfbcc64ea16fce9f992ce9 100644
--- a/chrome/test/chromedriver/chrome/log.h
+++ b/chrome/test/chromedriver/chrome/log.h
@@ -11,9 +11,10 @@ namespace base {
class Time;
}
-// 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,
@@ -23,13 +24,13 @@ class Log {
virtual ~Log() {}
- // Log a message with an explicit timestamp.
+ // Logs a message with an explicit timestamp.
virtual void AddEntry(const base::Time& time,
Level level,
const std::string& message) = 0;
- // Implicit timestamp, default to current time.
- void AddEntry(Level level, const std::string& message);
+ // Logs a message with an implicit timestamp, default to current time.
+ virtual void AddEntry(Level level, const std::string& message);
jdennett 2013/05/23 03:44:24 It's also strange to have overload sets of virtual
klm 2013/05/23 15:21:39 The idea was that callers can add a log entry with
};
#endif // CHROME_TEST_CHROMEDRIVER_CHROME_LOG_H_

Powered by Google App Engine
This is Rietveld 408576698