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

Side by Side Diff: chrome/browser/chromeos/drive/event_logger.cc

Issue 11365249: drive: Event logger for chrome:drive-internals. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/chromeos/drive/event_logger.h"
6
7 namespace drive {
8
9 EventLogger::Event::Event(const std::string& what)
10 : when(base::Time::Now()),
11 what(what) {
12 }
13
14 EventLogger::EventLogger(size_t history_size) : history_size_(history_size) {
15 }
16
17 EventLogger::~EventLogger() {
18 }
19
20 void EventLogger::Log(const std::string& what) {
21 history_.push_back(Event(what));
22 if (history_.size() > history_size_)
23 history_.pop_front();
24 }
25
26 } // namespace drive
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698