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

Unified Diff: chrome/browser/sync_file_system/drive_backend/sync_task_token.cc

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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync_file_system/drive_backend/sync_task_token.cc
diff --git a/chrome/browser/sync_file_system/drive_backend/sync_task_token.cc b/chrome/browser/sync_file_system/drive_backend/sync_task_token.cc
index 458b9cd436301a2088e6768870d0640932395e05..80b086b961959b199839c2b90444f143a67cc7bc 100644
--- a/chrome/browser/sync_file_system/drive_backend/sync_task_token.cc
+++ b/chrome/browser/sync_file_system/drive_backend/sync_task_token.cc
@@ -93,6 +93,31 @@ void SyncTaskToken::clear_blocking_factor() {
blocking_factor_.reset();
}
+void SyncTaskToken::InitializeTaskLog(const std::string& task_description) {
+ DCHECK(task_log_);
+ task_log_->start_time = base::TimeTicks::Now();
+ task_log_->task_description = task_description;
+}
+
+void SyncTaskToken::FinalizeTaskLog(const std::string& result_description) {
+ DCHECK(task_log_);
+ task_log_->result_description = result_description;
+ task_log_->end_time = base::TimeTicks::Now();
+}
+
+void SyncTaskToken::RecordLog(const std::string& message) {
+ DCHECK(task_log_);
+ task_log_->details.push_back(message);
+}
+
+void SyncTaskToken::SetTaskLog(scoped_ptr<TaskLogger::TaskLog> task_log) {
+ task_log_ = task_log.Pass();
+}
+
+scoped_ptr<TaskLogger::TaskLog> SyncTaskToken::PassTaskLog() {
+ return task_log_.Pass();
+}
+
SyncTaskToken::SyncTaskToken(const base::WeakPtr<SyncTaskManager>& manager,
int64 token_id,
scoped_ptr<BlockingFactor> blocking_factor,
« no previous file with comments | « chrome/browser/sync_file_system/drive_backend/sync_task_token.h ('k') | chrome/browser/sync_file_system/task_logger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698