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

Unified Diff: chrome/browser/chromeos/drive/event_logger.h

Issue 14247011: drive: Change EventLogger to take printf format (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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/browser/chromeos/drive/drive_prefetcher.cc ('k') | chrome/browser/chromeos/drive/event_logger.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/drive/event_logger.h
diff --git a/chrome/browser/chromeos/drive/event_logger.h b/chrome/browser/chromeos/drive/event_logger.h
index e0341088aa29032e621c7428e4c9aabc9ea2f8cb..f39d4e4c7496778ebb50807c66b19a0d2e180274 100644
--- a/chrome/browser/chromeos/drive/event_logger.h
+++ b/chrome/browser/chromeos/drive/event_logger.h
@@ -5,10 +5,12 @@
#ifndef CHROME_BROWSER_CHROMEOS_DRIVE_EVENT_LOGGER_H_
#define CHROME_BROWSER_CHROMEOS_DRIVE_EVENT_LOGGER_H_
+#include <stdarg.h> // va_list
#include <string>
#include <deque>
#include "base/basictypes.h"
+#include "base/compiler_specific.h"
#include "base/time.h"
namespace drive {
@@ -29,8 +31,10 @@ class EventLogger {
explicit EventLogger(size_t history_size);
~EventLogger();
- // Logs a message.
- void Log(const std::string& what);
+ // Logs a message using printf format.
+ // Note that PRINTF_FORMAT should be (2, 3) instead of (1, 2) as this is a
+ // C++ member function.
+ void Log(const char* format, ...) PRINTF_FORMAT(2, 3);
// Gets the list of latest events (the oldest event comes first).
const std::deque<Event>& history() const { return history_; }
« no previous file with comments | « chrome/browser/chromeos/drive/drive_prefetcher.cc ('k') | chrome/browser/chromeos/drive/event_logger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698