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

Unified Diff: base/test/mock_log.h

Issue 2497833002: support multiple log message handlers in base/logging.h (Closed)
Patch Set: Created 4 years, 1 month 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 | « base/logging_win.cc ('k') | base/test/mock_log.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/mock_log.h
diff --git a/base/test/mock_log.h b/base/test/mock_log.h
index cda2fcd6259cbf080ba1bdc0c4195c00a12d69be..4467301d72645a6cbe980d74d7d7ba645d9c16f3 100644
--- a/base/test/mock_log.h
+++ b/base/test/mock_log.h
@@ -63,11 +63,10 @@ class MockLog {
// destinations (if any). The method should return true to signal that it
// handled the message and the message should not be sent to other log
// destinations.
- MOCK_METHOD5(Log,
+ MOCK_METHOD4(Log,
bool(int severity,
- const char* file,
+ const std::string& file,
int line,
- size_t message_start,
const std::string& str));
private:
@@ -80,17 +79,13 @@ class MockLog {
// Static function which is set as the logging message handler.
// Called once for each message.
static bool LogMessageHandler(int severity,
- const char* file,
+ const std::string& file,
int line,
- size_t message_start,
const std::string& str);
// True if this object is currently capturing logs.
bool is_capturing_logs_;
- // The previous handler to restore when the MockLog is destroyed.
- logging::LogMessageHandlerFunction previous_handler_;
-
DISALLOW_COPY_AND_ASSIGN(MockLog);
};
« no previous file with comments | « base/logging_win.cc ('k') | base/test/mock_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698