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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/sync_task_token.cc

Issue 302003013: [SyncFS] Run V2 backend tasks as SyncTask (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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.h ('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 #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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
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_);
98 task_log_.reset(new TaskLogger::TaskLog); 97 task_log_.reset(new TaskLogger::TaskLog);
99 task_log_->start_time = base::TimeTicks::Now(); 98 task_log_->start_time = base::TimeTicks::Now();
100 task_log_->task_description = task_description; 99 task_log_->task_description = task_description;
101 } 100 }
102 101
103 void SyncTaskToken::FinalizeTaskLog(const std::string& result_description) { 102 void SyncTaskToken::FinalizeTaskLog(const std::string& result_description) {
104 DCHECK(task_log_); 103 DCHECK(task_log_);
105 task_log_->result_description = result_description; 104 task_log_->result_description = result_description;
106 task_log_->end_time = base::TimeTicks::Now(); 105 task_log_->end_time = base::TimeTicks::Now();
107 } 106 }
(...skipping 16 matching lines...) Expand all
124 scoped_ptr<BlockingFactor> blocking_factor, 123 scoped_ptr<BlockingFactor> blocking_factor,
125 const SyncStatusCallback& callback) 124 const SyncStatusCallback& callback)
126 : manager_(manager), 125 : manager_(manager),
127 token_id_(token_id), 126 token_id_(token_id),
128 callback_(callback), 127 callback_(callback),
129 blocking_factor_(blocking_factor.Pass()) { 128 blocking_factor_(blocking_factor.Pass()) {
130 } 129 }
131 130
132 } // namespace drive_backend 131 } // namespace drive_backend
133 } // namespace sync_file_system 132 } // namespace sync_file_system
OLDNEW
« no previous file with comments | « chrome/browser/sync_file_system/drive_backend/sync_task_token.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698