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

Side by Side Diff: chrome/browser/sync_file_system/task_logger.h

Issue 298003003: [SyncFS] Wire TaskLogger to SyncTaskToken and SyncTaskManager (1/3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/sync_file_system/drive_backend/sync_task_token.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_TASK_LOGGER_H_ 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_TASK_LOGGER_H_
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_TASK_LOGGER_H_ 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_TASK_LOGGER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <string> 9 #include <string>
10 10
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "base/observer_list.h" 13 #include "base/observer_list.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 15
16 namespace sync_file_system { 16 namespace sync_file_system {
17 17
18 class TaskLogger : public base::SupportsWeakPtr<TaskLogger> { 18 class TaskLogger : public base::SupportsWeakPtr<TaskLogger> {
19 public: 19 public:
20 struct TaskLog { 20 struct TaskLog {
21 base::TimeDelta duration; 21 base::TimeTicks start_time;
22 std::string type; 22 base::TimeTicks end_time;
23 std::string summary; 23 std::string task_description;
24 std::string result_description;
24 std::vector<std::string> details; 25 std::vector<std::string> details;
25 26
26 TaskLog(); 27 TaskLog();
27 ~TaskLog(); 28 ~TaskLog();
28 }; 29 };
29 30
30 class Observer { 31 class Observer {
31 public: 32 public:
32 virtual void OnLogRecorded(const TaskLog& task_log) = 0; 33 virtual void OnLogRecorded(const TaskLog& task_log) = 0;
33 34
(...skipping 20 matching lines...) Expand all
54 std::deque<TaskLog*> log_history_; 55 std::deque<TaskLog*> log_history_;
55 56
56 ObserverList<Observer> observers_; 57 ObserverList<Observer> observers_;
57 58
58 DISALLOW_COPY_AND_ASSIGN(TaskLogger); 59 DISALLOW_COPY_AND_ASSIGN(TaskLogger);
59 }; 60 };
60 61
61 } // namespace sync_file_system 62 } // namespace sync_file_system
62 63
63 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_TASK_LOGGER_H_ 64 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_TASK_LOGGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync_file_system/drive_backend/sync_task_token.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698