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

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

Issue 304993004: [SyncFS] Add TaskLog tab on chrome://syncfs-internals (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « chrome/browser/sync_file_system/drive_backend/sync_task_manager.cc ('k') | chrome/browser/sync_file_system/task_logger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698