| OLD | NEW |
| 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 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "base/observer_list.h" | 14 #include "base/observer_list.h" |
| 15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
| 16 | 16 |
| 17 namespace sync_file_system { | 17 namespace sync_file_system { |
| 18 | 18 |
| 19 class TaskLogger : public base::SupportsWeakPtr<TaskLogger> { | 19 class TaskLogger : public base::SupportsWeakPtr<TaskLogger> { |
| 20 public: | 20 public: |
| 21 struct TaskLog { | 21 struct TaskLog { |
| 22 int log_id; |
| 22 base::TimeTicks start_time; | 23 base::TimeTicks start_time; |
| 23 base::TimeTicks end_time; | 24 base::TimeTicks end_time; |
| 24 std::string task_description; | 25 std::string task_description; |
| 25 std::string result_description; | 26 std::string result_description; |
| 26 std::vector<std::string> details; | 27 std::vector<std::string> details; |
| 27 | 28 |
| 28 TaskLog(); | 29 TaskLog(); |
| 29 ~TaskLog(); | 30 ~TaskLog(); |
| 30 }; | 31 }; |
| 31 | 32 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 58 std::deque<TaskLog*> log_history_; | 59 std::deque<TaskLog*> log_history_; |
| 59 | 60 |
| 60 ObserverList<Observer> observers_; | 61 ObserverList<Observer> observers_; |
| 61 | 62 |
| 62 DISALLOW_COPY_AND_ASSIGN(TaskLogger); | 63 DISALLOW_COPY_AND_ASSIGN(TaskLogger); |
| 63 }; | 64 }; |
| 64 | 65 |
| 65 } // namespace sync_file_system | 66 } // namespace sync_file_system |
| 66 | 67 |
| 67 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_TASK_LOGGER_H_ | 68 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_TASK_LOGGER_H_ |
| OLD | NEW |