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

Unified Diff: chrome/browser/sync_file_system/sync_task_manager.cc

Issue 190243003: [SyncFS] Move FROM_HEREs in SyncTaskManager to its client (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 9 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/sync_task_manager.cc
diff --git a/chrome/browser/sync_file_system/sync_task_manager.cc b/chrome/browser/sync_file_system/sync_task_manager.cc
index a5c532deccf78d240b2f737a321e2d899eeb7c58..8aa330ece76c0d9e746a8dafce09b6dbc919159e 100644
--- a/chrome/browser/sync_file_system/sync_task_manager.cc
+++ b/chrome/browser/sync_file_system/sync_task_manager.cc
@@ -84,25 +84,28 @@ void SyncTaskManager::Initialize(SyncStatusCode status) {
}
void SyncTaskManager::ScheduleTask(
+ const tracked_objects::Location& from_here,
const Task& task,
const SyncStatusCallback& callback) {
- ScheduleTaskAtPriority(task, PRIORITY_MED, callback);
+ ScheduleTaskAtPriority(from_here, task, PRIORITY_MED, callback);
}
void SyncTaskManager::ScheduleSyncTask(
+ const tracked_objects::Location& from_here,
scoped_ptr<SyncTask> task,
const SyncStatusCallback& callback) {
- ScheduleSyncTaskAtPriority(task.Pass(), PRIORITY_MED, callback);
+ ScheduleSyncTaskAtPriority(from_here, task.Pass(), PRIORITY_MED, callback);
}
void SyncTaskManager::ScheduleTaskAtPriority(
+ const tracked_objects::Location& from_here,
const Task& task,
Priority priority,
const SyncStatusCallback& callback) {
- scoped_ptr<TaskToken> token(GetToken(FROM_HERE));
+ scoped_ptr<TaskToken> token(GetToken(from_here));
if (!token) {
PushPendingTask(
- base::Bind(&SyncTaskManager::ScheduleTask, AsWeakPtr(),
+ base::Bind(&SyncTaskManager::ScheduleTask, AsWeakPtr(), from_here,
task, callback),
priority);
return;
@@ -111,14 +114,15 @@ void SyncTaskManager::ScheduleTaskAtPriority(
}
void SyncTaskManager::ScheduleSyncTaskAtPriority(
+ const tracked_objects::Location& from_here,
scoped_ptr<SyncTask> task,
Priority priority,
const SyncStatusCallback& callback) {
- scoped_ptr<TaskToken> token(GetToken(FROM_HERE));
+ scoped_ptr<TaskToken> token(GetToken(from_here));
if (!token) {
PushPendingTask(
- base::Bind(&SyncTaskManager::ScheduleSyncTask,
- AsWeakPtr(), base::Passed(&task), callback),
+ base::Bind(&SyncTaskManager::ScheduleSyncTask, AsWeakPtr(), from_here,
+ base::Passed(&task), callback),
priority);
return;
}
@@ -127,9 +131,11 @@ void SyncTaskManager::ScheduleSyncTaskAtPriority(
running_task_->Run(CreateCompletionCallback(token.Pass(), callback));
}
-bool SyncTaskManager::ScheduleTaskIfIdle(const Task& task,
- const SyncStatusCallback& callback) {
- scoped_ptr<TaskToken> token(GetToken(FROM_HERE));
+bool SyncTaskManager::ScheduleTaskIfIdle(
+ const tracked_objects::Location& from_here,
+ const Task& task,
+ const SyncStatusCallback& callback) {
+ scoped_ptr<TaskToken> token(GetToken(from_here));
if (!token)
return false;
task.Run(CreateCompletionCallback(token.Pass(), callback));
@@ -137,9 +143,10 @@ bool SyncTaskManager::ScheduleTaskIfIdle(const Task& task,
}
bool SyncTaskManager::ScheduleSyncTaskIfIdle(
+ const tracked_objects::Location& from_here,
scoped_ptr<SyncTask> task,
const SyncStatusCallback& callback) {
- scoped_ptr<TaskToken> token(GetToken(FROM_HERE));
+ scoped_ptr<TaskToken> token(GetToken(from_here));
if (!token)
return false;
DCHECK(!running_task_);
« no previous file with comments | « chrome/browser/sync_file_system/sync_task_manager.h ('k') | chrome/browser/sync_file_system/sync_task_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698