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 #include "chrome/browser/sync_file_system/drive_backend/sync_task_token.h" | 5 #include "chrome/browser/sync_file_system/drive_backend/sync_task_token.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "chrome/browser/sync_file_system/drive_backend/sync_task_manager.h" | 8 #include "chrome/browser/sync_file_system/drive_backend/sync_task_manager.h" |
9 #include "chrome/browser/sync_file_system/drive_backend/task_dependency_manager.
h" | 9 #include "chrome/browser/sync_file_system/drive_backend/task_dependency_manager.
h" |
10 | 10 |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 const BlockingFactor* SyncTaskToken::blocking_factor() const { | 88 const BlockingFactor* SyncTaskToken::blocking_factor() const { |
89 return blocking_factor_.get(); | 89 return blocking_factor_.get(); |
90 } | 90 } |
91 | 91 |
92 void SyncTaskToken::clear_blocking_factor() { | 92 void SyncTaskToken::clear_blocking_factor() { |
93 blocking_factor_.reset(); | 93 blocking_factor_.reset(); |
94 } | 94 } |
95 | 95 |
96 void SyncTaskToken::InitializeTaskLog(const std::string& task_description) { | 96 void SyncTaskToken::InitializeTaskLog(const std::string& task_description) { |
97 DCHECK(task_log_); | 97 DCHECK(task_log_); |
| 98 task_log_.reset(new TaskLogger::TaskLog); |
98 task_log_->start_time = base::TimeTicks::Now(); | 99 task_log_->start_time = base::TimeTicks::Now(); |
99 task_log_->task_description = task_description; | 100 task_log_->task_description = task_description; |
100 } | 101 } |
101 | 102 |
102 void SyncTaskToken::FinalizeTaskLog(const std::string& result_description) { | 103 void SyncTaskToken::FinalizeTaskLog(const std::string& result_description) { |
103 DCHECK(task_log_); | 104 DCHECK(task_log_); |
104 task_log_->result_description = result_description; | 105 task_log_->result_description = result_description; |
105 task_log_->end_time = base::TimeTicks::Now(); | 106 task_log_->end_time = base::TimeTicks::Now(); |
106 } | 107 } |
107 | 108 |
(...skipping 15 matching lines...) Expand all Loading... |
123 scoped_ptr<BlockingFactor> blocking_factor, | 124 scoped_ptr<BlockingFactor> blocking_factor, |
124 const SyncStatusCallback& callback) | 125 const SyncStatusCallback& callback) |
125 : manager_(manager), | 126 : manager_(manager), |
126 token_id_(token_id), | 127 token_id_(token_id), |
127 callback_(callback), | 128 callback_(callback), |
128 blocking_factor_(blocking_factor.Pass()) { | 129 blocking_factor_(blocking_factor.Pass()) { |
129 } | 130 } |
130 | 131 |
131 } // namespace drive_backend | 132 } // namespace drive_backend |
132 } // namespace sync_file_system | 133 } // namespace sync_file_system |
OLD | NEW |