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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/sync_task_manager.h

Issue 515093002: FileAPI/sync file system cleanups for scoped_refptr operator T* cleanup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
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 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_TASK_MANAGER_H_ 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_TASK_MANAGER_H_
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_TASK_MANAGER_H_ 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_TASK_MANAGER_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 SyncStatusCode last_operation_status, 63 SyncStatusCode last_operation_status,
64 bool last_operation_used_network) = 0; 64 bool last_operation_used_network) = 0;
65 65
66 virtual void RecordTaskLog(scoped_ptr<TaskLogger::TaskLog> task_log) = 0; 66 virtual void RecordTaskLog(scoped_ptr<TaskLogger::TaskLog> task_log) = 0;
67 }; 67 };
68 68
69 // Runs at most |maximum_background_tasks| parallel as background tasks. 69 // Runs at most |maximum_background_tasks| parallel as background tasks.
70 // If |maximum_background_tasks| is zero, all task runs as foreground task. 70 // If |maximum_background_tasks| is zero, all task runs as foreground task.
71 SyncTaskManager(base::WeakPtr<Client> client, 71 SyncTaskManager(base::WeakPtr<Client> client,
72 size_t maximum_background_task, 72 size_t maximum_background_task,
73 base::SequencedTaskRunner* task_runner); 73 const scoped_refptr<base::SequencedTaskRunner>& task_runner);
74 virtual ~SyncTaskManager(); 74 virtual ~SyncTaskManager();
75 75
76 // This needs to be called to start task scheduling. 76 // This needs to be called to start task scheduling.
77 // If |status| is not SYNC_STATUS_OK calling this may change the 77 // If |status| is not SYNC_STATUS_OK calling this may change the
78 // service status. This should not be called more than once. 78 // service status. This should not be called more than once.
79 void Initialize(SyncStatusCode status); 79 void Initialize(SyncStatusCode status);
80 80
81 // Schedules a task at the given priority. 81 // Schedules a task at the given priority.
82 void ScheduleTask(const tracked_objects::Location& from_here, 82 void ScheduleTask(const tracked_objects::Location& from_here,
83 const Task& task, 83 const Task& task,
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 scoped_refptr<base::SequencedTaskRunner> task_runner_; 197 scoped_refptr<base::SequencedTaskRunner> task_runner_;
198 base::SequenceChecker sequence_checker_; 198 base::SequenceChecker sequence_checker_;
199 199
200 DISALLOW_COPY_AND_ASSIGN(SyncTaskManager); 200 DISALLOW_COPY_AND_ASSIGN(SyncTaskManager);
201 }; 201 };
202 202
203 } // namespace drive_backend 203 } // namespace drive_backend
204 } // namespace sync_file_system 204 } // namespace sync_file_system
205 205
206 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_TASK_MANAGER_H_ 206 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_TASK_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698