summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/sync_file_system/drive_backend/conflict_resolver.h4
-rw-r--r--chrome/browser/sync_file_system/drive_backend/drive_backend_sync_unittest.cc4
-rw-r--r--chrome/browser/sync_file_system/drive_backend/drive_service_on_worker.h74
-rw-r--r--chrome/browser/sync_file_system/drive_backend/drive_uploader_on_worker.h8
-rw-r--r--chrome/browser/sync_file_system/drive_backend/fake_drive_uploader.h12
-rw-r--r--chrome/browser/sync_file_system/drive_backend/fake_sync_worker.h63
-rw-r--r--chrome/browser/sync_file_system/drive_backend/list_changes_task.h4
-rw-r--r--chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer.h4
-rw-r--r--chrome/browser/sync_file_system/drive_backend/metadata_database_index.h65
-rw-r--r--chrome/browser/sync_file_system/drive_backend/metadata_database_index_on_disk.h68
-rw-r--r--chrome/browser/sync_file_system/drive_backend/register_app_task.h4
-rw-r--r--chrome/browser/sync_file_system/drive_backend/remote_change_processor_on_worker.h26
-rw-r--r--chrome/browser/sync_file_system/drive_backend/remote_to_local_syncer.h4
-rw-r--r--chrome/browser/sync_file_system/drive_backend/sync_engine.cc18
-rw-r--r--chrome/browser/sync_file_system/drive_backend/sync_engine.h80
-rw-r--r--chrome/browser/sync_file_system/drive_backend/sync_engine_initializer.h4
-rw-r--r--chrome/browser/sync_file_system/drive_backend/sync_task.h4
-rw-r--r--chrome/browser/sync_file_system/drive_backend/sync_task_manager.cc4
-rw-r--r--chrome/browser/sync_file_system/drive_backend/sync_task_manager_unittest.cc27
-rw-r--r--chrome/browser/sync_file_system/drive_backend/sync_worker.h69
-rw-r--r--chrome/browser/sync_file_system/drive_backend/sync_worker_unittest.cc15
-rw-r--r--chrome/browser/sync_file_system/drive_backend/uninstall_app_task.h4
-rw-r--r--chrome/browser/sync_file_system/fake_remote_change_processor.h26
-rw-r--r--chrome/browser/sync_file_system/local/canned_syncable_file_system.h6
-rw-r--r--chrome/browser/sync_file_system/local/local_file_change_tracker.h23
-rw-r--r--chrome/browser/sync_file_system/local/local_file_sync_context.h6
-rw-r--r--chrome/browser/sync_file_system/local/local_file_sync_service.h29
-rw-r--r--chrome/browser/sync_file_system/local/local_file_sync_service_unittest.cc2
-rw-r--r--chrome/browser/sync_file_system/local/sync_file_system_backend.h47
-rw-r--r--chrome/browser/sync_file_system/local/syncable_file_operation_runner.h6
-rw-r--r--chrome/browser/sync_file_system/local/syncable_file_system_operation.cc10
-rw-r--r--chrome/browser/sync_file_system/local/syncable_file_system_operation.h126
-rw-r--r--chrome/browser/sync_file_system/sync_file_system_service.cc15
-rw-r--r--chrome/browser/sync_file_system/sync_file_system_service.h43
-rw-r--r--chrome/browser/sync_file_system/sync_file_system_service_factory.h4
-rw-r--r--chrome/browser/sync_file_system/sync_process_runner.cc16
-rw-r--r--chrome/browser/sync_file_system/sync_process_runner_unittest.cc31
37 files changed, 454 insertions, 501 deletions
diff --git a/chrome/browser/sync_file_system/drive_backend/conflict_resolver.h b/chrome/browser/sync_file_system/drive_backend/conflict_resolver.h
index 2bbb189..2c9d4e2 100644
--- a/chrome/browser/sync_file_system/drive_backend/conflict_resolver.h
+++ b/chrome/browser/sync_file_system/drive_backend/conflict_resolver.h
@@ -41,8 +41,8 @@ class ConflictResolver : public SyncTask {
typedef std::vector<std::string> FileIDList;
explicit ConflictResolver(SyncEngineContext* sync_context);
- virtual ~ConflictResolver();
- virtual void RunPreflight(scoped_ptr<SyncTaskToken> token) override;
+ ~ConflictResolver() override;
+ void RunPreflight(scoped_ptr<SyncTaskToken> token) override;
void RunExclusive(scoped_ptr<SyncTaskToken> token);
private:
diff --git a/chrome/browser/sync_file_system/drive_backend/drive_backend_sync_unittest.cc b/chrome/browser/sync_file_system/drive_backend/drive_backend_sync_unittest.cc
index 1a257d3..2b6be22 100644
--- a/chrome/browser/sync_file_system/drive_backend/drive_backend_sync_unittest.cc
+++ b/chrome/browser/sync_file_system/drive_backend/drive_backend_sync_unittest.cc
@@ -155,11 +155,11 @@ class DriveBackendSyncTest : public testing::Test,
RevokeSyncableFileSystem();
}
- virtual void OnRemoteChangeQueueUpdated(int64 pending_changes_hint) override {
+ void OnRemoteChangeQueueUpdated(int64 pending_changes_hint) override {
pending_remote_changes_ = pending_changes_hint;
}
- virtual void OnLocalChangeAvailable(int64 pending_changes_hint) override {
+ void OnLocalChangeAvailable(int64 pending_changes_hint) override {
pending_local_changes_ = pending_changes_hint;
}
diff --git a/chrome/browser/sync_file_system/drive_backend/drive_service_on_worker.h b/chrome/browser/sync_file_system/drive_backend/drive_service_on_worker.h
index e542fd7..1f5c536 100644
--- a/chrome/browser/sync_file_system/drive_backend/drive_service_on_worker.h
+++ b/chrome/browser/sync_file_system/drive_backend/drive_service_on_worker.h
@@ -30,118 +30,118 @@ class DriveServiceOnWorker : public drive::DriveServiceInterface {
const base::WeakPtr<DriveServiceWrapper>& wrapper,
base::SingleThreadTaskRunner* ui_task_runner,
base::SequencedTaskRunner* worker_task_runner);
- virtual ~DriveServiceOnWorker();
+ ~DriveServiceOnWorker() override;
- virtual google_apis::CancelCallback AddNewDirectory(
+ google_apis::CancelCallback AddNewDirectory(
const std::string& parent_resource_id,
const std::string& directory_title,
const AddNewDirectoryOptions& options,
const google_apis::FileResourceCallback& callback) override;
- virtual google_apis::CancelCallback DeleteResource(
+ google_apis::CancelCallback DeleteResource(
const std::string& resource_id,
const std::string& etag,
const google_apis::EntryActionCallback& callback) override;
- virtual google_apis::CancelCallback DownloadFile(
+ google_apis::CancelCallback DownloadFile(
const base::FilePath& local_cache_path,
const std::string& resource_id,
const google_apis::DownloadActionCallback& download_action_callback,
const google_apis::GetContentCallback& get_content_callback,
const google_apis::ProgressCallback& progress_callback) override;
- virtual google_apis::CancelCallback GetAboutResource(
+ google_apis::CancelCallback GetAboutResource(
const google_apis::AboutResourceCallback& callback) override;
- virtual google_apis::CancelCallback GetChangeList(
+ google_apis::CancelCallback GetChangeList(
int64 start_changestamp,
const google_apis::ChangeListCallback& callback) override;
- virtual google_apis::CancelCallback GetRemainingChangeList(
+ google_apis::CancelCallback GetRemainingChangeList(
const GURL& next_link,
const google_apis::ChangeListCallback& callback) override;
- virtual std::string GetRootResourceId() const override;
+ std::string GetRootResourceId() const override;
- virtual google_apis::CancelCallback GetRemainingFileList(
+ google_apis::CancelCallback GetRemainingFileList(
const GURL& next_link,
const google_apis::FileListCallback& callback) override;
- virtual google_apis::CancelCallback GetFileResource(
+ google_apis::CancelCallback GetFileResource(
const std::string& resource_id,
const google_apis::FileResourceCallback& callback) override;
- virtual google_apis::CancelCallback GetFileListInDirectory(
+ google_apis::CancelCallback GetFileListInDirectory(
const std::string& directory_resource_id,
const google_apis::FileListCallback& callback) override;
- virtual google_apis::CancelCallback RemoveResourceFromDirectory(
+ google_apis::CancelCallback RemoveResourceFromDirectory(
const std::string& parent_resource_id,
const std::string& resource_id,
const google_apis::EntryActionCallback& callback) override;
- virtual google_apis::CancelCallback SearchByTitle(
+ google_apis::CancelCallback SearchByTitle(
const std::string& title,
const std::string& directory_resource_id,
const google_apis::FileListCallback& callback) override;
- virtual bool HasRefreshToken() const override;
+ bool HasRefreshToken() const override;
// Following virtual methods are expected not to be accessed at all.
- virtual void Initialize(const std::string& account_id) override;
- virtual void AddObserver(drive::DriveServiceObserver* observer) override;
- virtual void RemoveObserver(drive::DriveServiceObserver* observer) override;
- virtual bool CanSendRequest() const override;
- virtual bool HasAccessToken() const override;
- virtual void RequestAccessToken(
+ void Initialize(const std::string& account_id) override;
+ void AddObserver(drive::DriveServiceObserver* observer) override;
+ void RemoveObserver(drive::DriveServiceObserver* observer) override;
+ bool CanSendRequest() const override;
+ bool HasAccessToken() const override;
+ void RequestAccessToken(
const google_apis::AuthStatusCallback& callback) override;
- virtual void ClearAccessToken() override;
- virtual void ClearRefreshToken() override;
- virtual google_apis::CancelCallback GetAllFileList(
+ void ClearAccessToken() override;
+ void ClearRefreshToken() override;
+ google_apis::CancelCallback GetAllFileList(
const google_apis::FileListCallback& callback) override;
- virtual google_apis::CancelCallback Search(
+ google_apis::CancelCallback Search(
const std::string& search_query,
const google_apis::FileListCallback& callback) override;
- virtual google_apis::CancelCallback GetShareUrl(
+ google_apis::CancelCallback GetShareUrl(
const std::string& resource_id,
const GURL& embed_origin,
const google_apis::GetShareUrlCallback& callback) override;
- virtual google_apis::CancelCallback GetAppList(
+ google_apis::CancelCallback GetAppList(
const google_apis::AppListCallback& callback) override;
- virtual google_apis::CancelCallback TrashResource(
+ google_apis::CancelCallback TrashResource(
const std::string& resource_id,
const google_apis::EntryActionCallback& callback) override;
- virtual google_apis::CancelCallback CopyResource(
+ google_apis::CancelCallback CopyResource(
const std::string& resource_id,
const std::string& parent_resource_id,
const std::string& new_title,
const base::Time& last_modified,
const google_apis::FileResourceCallback& callback) override;
- virtual google_apis::CancelCallback UpdateResource(
+ google_apis::CancelCallback UpdateResource(
const std::string& resource_id,
const std::string& parent_resource_id,
const std::string& new_title,
const base::Time& last_modified,
const base::Time& last_viewed_by_me,
const google_apis::FileResourceCallback& callback) override;
- virtual google_apis::CancelCallback AddResourceToDirectory(
+ google_apis::CancelCallback AddResourceToDirectory(
const std::string& parent_resource_id,
const std::string& resource_id,
const google_apis::EntryActionCallback& callback) override;
- virtual google_apis::CancelCallback InitiateUploadNewFile(
+ google_apis::CancelCallback InitiateUploadNewFile(
const std::string& content_type,
int64 content_length,
const std::string& parent_resource_id,
const std::string& title,
const InitiateUploadNewFileOptions& options,
const google_apis::InitiateUploadCallback& callback) override;
- virtual google_apis::CancelCallback InitiateUploadExistingFile(
+ google_apis::CancelCallback InitiateUploadExistingFile(
const std::string& content_type,
int64 content_length,
const std::string& resource_id,
const InitiateUploadExistingFileOptions& options,
const google_apis::InitiateUploadCallback& callback) override;
- virtual google_apis::CancelCallback ResumeUpload(
+ google_apis::CancelCallback ResumeUpload(
const GURL& upload_url,
int64 start_position,
int64 end_position,
@@ -150,18 +150,18 @@ class DriveServiceOnWorker : public drive::DriveServiceInterface {
const base::FilePath& local_file_path,
const google_apis::drive::UploadRangeCallback& callback,
const google_apis::ProgressCallback& progress_callback) override;
- virtual google_apis::CancelCallback GetUploadStatus(
+ google_apis::CancelCallback GetUploadStatus(
const GURL& upload_url,
int64 content_length,
const google_apis::drive::UploadRangeCallback& callback) override;
- virtual google_apis::CancelCallback AuthorizeApp(
+ google_apis::CancelCallback AuthorizeApp(
const std::string& resource_id,
const std::string& app_id,
const google_apis::AuthorizeAppCallback& callback) override;
- virtual google_apis::CancelCallback UninstallApp(
+ google_apis::CancelCallback UninstallApp(
const std::string& app_id,
const google_apis::EntryActionCallback& callback) override;
- virtual google_apis::CancelCallback AddPermission(
+ google_apis::CancelCallback AddPermission(
const std::string& resource_id,
const std::string& email,
google_apis::drive::PermissionRole role,
diff --git a/chrome/browser/sync_file_system/drive_backend/drive_uploader_on_worker.h b/chrome/browser/sync_file_system/drive_backend/drive_uploader_on_worker.h
index dc35689..f76d96e 100644
--- a/chrome/browser/sync_file_system/drive_backend/drive_uploader_on_worker.h
+++ b/chrome/browser/sync_file_system/drive_backend/drive_uploader_on_worker.h
@@ -30,9 +30,9 @@ class DriveUploaderOnWorker : public drive::DriveUploaderInterface {
const base::WeakPtr<DriveUploaderWrapper>& wrapper,
base::SingleThreadTaskRunner* ui_task_runner,
base::SequencedTaskRunner* worker_task_runner);
- virtual ~DriveUploaderOnWorker();
+ ~DriveUploaderOnWorker() override;
- virtual google_apis::CancelCallback UploadNewFile(
+ google_apis::CancelCallback UploadNewFile(
const std::string& parent_resource_id,
const base::FilePath& local_file_path,
const std::string& title,
@@ -41,7 +41,7 @@ class DriveUploaderOnWorker : public drive::DriveUploaderInterface {
const drive::UploadCompletionCallback& callback,
const google_apis::ProgressCallback& progress_callback) override;
- virtual google_apis::CancelCallback UploadExistingFile(
+ google_apis::CancelCallback UploadExistingFile(
const std::string& resource_id,
const base::FilePath& local_file_path,
const std::string& content_type,
@@ -50,7 +50,7 @@ class DriveUploaderOnWorker : public drive::DriveUploaderInterface {
const google_apis::ProgressCallback& progress_callback) override;
// Following method is expected not to be used.
- virtual google_apis::CancelCallback ResumeUploadFile(
+ google_apis::CancelCallback ResumeUploadFile(
const GURL& upload_location,
const base::FilePath& local_file_path,
const std::string& content_type,
diff --git a/chrome/browser/sync_file_system/drive_backend/fake_drive_uploader.h b/chrome/browser/sync_file_system/drive_backend/fake_drive_uploader.h
index 7ff3652..65b2167 100644
--- a/chrome/browser/sync_file_system/drive_backend/fake_drive_uploader.h
+++ b/chrome/browser/sync_file_system/drive_backend/fake_drive_uploader.h
@@ -23,10 +23,10 @@ namespace drive_backend {
class FakeDriveServiceWrapper : public drive::FakeDriveService {
public:
FakeDriveServiceWrapper();
- virtual ~FakeDriveServiceWrapper();
+ ~FakeDriveServiceWrapper() override;
// DriveServiceInterface overrides.
- virtual google_apis::CancelCallback AddNewDirectory(
+ google_apis::CancelCallback AddNewDirectory(
const std::string& parent_resource_id,
const std::string& directory_name,
const AddNewDirectoryOptions& options,
@@ -47,10 +47,10 @@ class FakeDriveServiceWrapper : public drive::FakeDriveService {
class FakeDriveUploader : public drive::DriveUploaderInterface {
public:
explicit FakeDriveUploader(FakeDriveServiceWrapper* fake_drive_service);
- virtual ~FakeDriveUploader();
+ ~FakeDriveUploader() override;
// DriveUploaderInterface overrides.
- virtual google_apis::CancelCallback UploadNewFile(
+ google_apis::CancelCallback UploadNewFile(
const std::string& parent_resource_id,
const base::FilePath& local_file_path,
const std::string& title,
@@ -58,14 +58,14 @@ class FakeDriveUploader : public drive::DriveUploaderInterface {
const UploadNewFileOptions& options,
const drive::UploadCompletionCallback& callback,
const google_apis::ProgressCallback& progress_callback) override;
- virtual google_apis::CancelCallback UploadExistingFile(
+ google_apis::CancelCallback UploadExistingFile(
const std::string& resource_id,
const base::FilePath& local_file_path,
const std::string& content_type,
const UploadExistingFileOptions& options,
const drive::UploadCompletionCallback& callback,
const google_apis::ProgressCallback& progress_callback) override;
- virtual google_apis::CancelCallback ResumeUploadFile(
+ google_apis::CancelCallback ResumeUploadFile(
const GURL& upload_location,
const base::FilePath& local_file_path,
const std::string& content_type,
diff --git a/chrome/browser/sync_file_system/drive_backend/fake_sync_worker.h b/chrome/browser/sync_file_system/drive_backend/fake_sync_worker.h
index c9d56da..4562824 100644
--- a/chrome/browser/sync_file_system/drive_backend/fake_sync_worker.h
+++ b/chrome/browser/sync_file_system/drive_backend/fake_sync_worker.h
@@ -48,42 +48,39 @@ class SyncTaskManager;
class FakeSyncWorker : public SyncWorkerInterface {
public:
FakeSyncWorker();
- virtual ~FakeSyncWorker();
+ ~FakeSyncWorker() override;
// SyncWorkerInterface overrides.
- virtual void Initialize(
- scoped_ptr<SyncEngineContext> sync_engine_context) override;
- virtual void RegisterOrigin(const GURL& origin,
- const SyncStatusCallback& callback) override;
- virtual void EnableOrigin(const GURL& origin,
- const SyncStatusCallback& callback) override;
- virtual void DisableOrigin(const GURL& origin,
- const SyncStatusCallback& callback) override;
- virtual void UninstallOrigin(
- const GURL& origin,
- RemoteFileSyncService::UninstallFlag flag,
- const SyncStatusCallback& callback) override;
- virtual void ProcessRemoteChange(const SyncFileCallback& callback) override;
- virtual void SetRemoteChangeProcessor(
- RemoteChangeProcessorOnWorker* remote_change_processor_on_worker)
- override;
- virtual RemoteServiceState GetCurrentState() const override;
- virtual void GetOriginStatusMap(
+ void Initialize(scoped_ptr<SyncEngineContext> sync_engine_context) override;
+ void RegisterOrigin(const GURL& origin,
+ const SyncStatusCallback& callback) override;
+ void EnableOrigin(const GURL& origin,
+ const SyncStatusCallback& callback) override;
+ void DisableOrigin(const GURL& origin,
+ const SyncStatusCallback& callback) override;
+ void UninstallOrigin(const GURL& origin,
+ RemoteFileSyncService::UninstallFlag flag,
+ const SyncStatusCallback& callback) override;
+ void ProcessRemoteChange(const SyncFileCallback& callback) override;
+ void SetRemoteChangeProcessor(RemoteChangeProcessorOnWorker*
+ remote_change_processor_on_worker) override;
+ RemoteServiceState GetCurrentState() const override;
+ void GetOriginStatusMap(
const RemoteFileSyncService::StatusMapCallback& callback) override;
- virtual scoped_ptr<base::ListValue> DumpFiles(const GURL& origin) override;
- virtual scoped_ptr<base::ListValue> DumpDatabase() override;
- virtual void SetSyncEnabled(bool enabled) override;
- virtual void PromoteDemotedChanges(const base::Closure& callback) override;
- virtual void ApplyLocalChange(const FileChange& local_change,
- const base::FilePath& local_path,
- const SyncFileMetadata& local_metadata,
- const storage::FileSystemURL& url,
- const SyncStatusCallback& callback) override;
- virtual void ActivateService(RemoteServiceState service_state,
- const std::string& description) override;
- virtual void DeactivateService(const std::string& description) override;
- virtual void DetachFromSequence() override;
- virtual void AddObserver(Observer* observer) override;
+ scoped_ptr<base::ListValue> DumpFiles(const GURL& origin) override;
+ scoped_ptr<base::ListValue> DumpDatabase() override;
+ void SetSyncEnabled(bool enabled) override;
+ void PromoteDemotedChanges(const base::Closure& callback) override;
+ void ApplyLocalChange(const FileChange& local_change,
+ const base::FilePath& local_path,
+ const SyncFileMetadata& local_metadata,
+ const storage::FileSystemURL& url,
+ const SyncStatusCallback& callback) override;
+ void ActivateService(RemoteServiceState service_state,
+ const std::string& description) override;
+ void DeactivateService(const std::string& description) override;
+ void DetachFromSequence() override;
+ void AddObserver(Observer* observer) override;
private:
friend class SyncEngineTest;
diff --git a/chrome/browser/sync_file_system/drive_backend/list_changes_task.h b/chrome/browser/sync_file_system/drive_backend/list_changes_task.h
index 6c468a4..fb93629 100644
--- a/chrome/browser/sync_file_system/drive_backend/list_changes_task.h
+++ b/chrome/browser/sync_file_system/drive_backend/list_changes_task.h
@@ -29,9 +29,9 @@ class SyncEngineContext;
class ListChangesTask : public SyncTask {
public:
explicit ListChangesTask(SyncEngineContext* sync_context);
- virtual ~ListChangesTask();
+ ~ListChangesTask() override;
- virtual void RunPreflight(scoped_ptr<SyncTaskToken> token) override;
+ void RunPreflight(scoped_ptr<SyncTaskToken> token) override;
private:
void StartListing(scoped_ptr<SyncTaskToken> token);
diff --git a/chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer.h b/chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer.h
index 9d50950..a46bf6d 100644
--- a/chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer.h
+++ b/chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer.h
@@ -47,8 +47,8 @@ class LocalToRemoteSyncer : public SyncTask {
const FileChange& local_change,
const base::FilePath& local_path,
const storage::FileSystemURL& url);
- virtual ~LocalToRemoteSyncer();
- virtual void RunPreflight(scoped_ptr<SyncTaskToken> token) override;
+ ~LocalToRemoteSyncer() override;
+ void RunPreflight(scoped_ptr<SyncTaskToken> token) override;
const storage::FileSystemURL& url() const { return url_; }
const base::FilePath& target_path() const { return target_path_; }
diff --git a/chrome/browser/sync_file_system/drive_backend/metadata_database_index.h b/chrome/browser/sync_file_system/drive_backend/metadata_database_index.h
index 7c983ec..9c80060 100644
--- a/chrome/browser/sync_file_system/drive_backend/metadata_database_index.h
+++ b/chrome/browser/sync_file_system/drive_backend/metadata_database_index.h
@@ -58,49 +58,48 @@ struct DatabaseContents {
// Maintains indexes of MetadataDatabase on memory.
class MetadataDatabaseIndex : public MetadataDatabaseIndexInterface {
public:
- virtual ~MetadataDatabaseIndex();
+ ~MetadataDatabaseIndex() override;
static scoped_ptr<MetadataDatabaseIndex> Create(LevelDBWrapper* db);
static scoped_ptr<MetadataDatabaseIndex> CreateForTesting(
DatabaseContents* contents, LevelDBWrapper* db);
// MetadataDatabaseIndexInterface overrides.
- virtual bool GetFileMetadata(
- const std::string& file_id, FileMetadata* metadata) const override;
- virtual bool GetFileTracker(
- int64 tracker_id, FileTracker* tracker) const override;
- virtual void StoreFileMetadata(scoped_ptr<FileMetadata> metadata) override;
- virtual void StoreFileTracker(scoped_ptr<FileTracker> tracker) override;
- virtual void RemoveFileMetadata(const std::string& file_id) override;
- virtual void RemoveFileTracker(int64 tracker_id) override;
- virtual TrackerIDSet GetFileTrackerIDsByFileID(
+ bool GetFileMetadata(const std::string& file_id,
+ FileMetadata* metadata) const override;
+ bool GetFileTracker(int64 tracker_id, FileTracker* tracker) const override;
+ void StoreFileMetadata(scoped_ptr<FileMetadata> metadata) override;
+ void StoreFileTracker(scoped_ptr<FileTracker> tracker) override;
+ void RemoveFileMetadata(const std::string& file_id) override;
+ void RemoveFileTracker(int64 tracker_id) override;
+ TrackerIDSet GetFileTrackerIDsByFileID(
const std::string& file_id) const override;
- virtual int64 GetAppRootTracker(const std::string& app_id) const override;
- virtual TrackerIDSet GetFileTrackerIDsByParentAndTitle(
+ int64 GetAppRootTracker(const std::string& app_id) const override;
+ TrackerIDSet GetFileTrackerIDsByParentAndTitle(
int64 parent_tracker_id,
const std::string& title) const override;
- virtual std::vector<int64> GetFileTrackerIDsByParent(
+ std::vector<int64> GetFileTrackerIDsByParent(
int64 parent_tracker_id) const override;
- virtual std::string PickMultiTrackerFileID() const override;
- virtual ParentIDAndTitle PickMultiBackingFilePath() const override;
- virtual int64 PickDirtyTracker() const override;
- virtual void DemoteDirtyTracker(int64 tracker_id) override;
- virtual bool HasDemotedDirtyTracker() const override;
- virtual bool IsDemotedDirtyTracker(int64 tracker_id) const override;
- virtual void PromoteDemotedDirtyTracker(int64 tracker_id) override;
- virtual bool PromoteDemotedDirtyTrackers() override;
- virtual size_t CountDirtyTracker() const override;
- virtual size_t CountFileMetadata() const override;
- virtual size_t CountFileTracker() const override;
- virtual void SetSyncRootTrackerID(int64 sync_root_id) const override;
- virtual void SetLargestChangeID(int64 largest_change_id) const override;
- virtual void SetNextTrackerID(int64 next_tracker_id) const override;
- virtual int64 GetSyncRootTrackerID() const override;
- virtual int64 GetLargestChangeID() const override;
- virtual int64 GetNextTrackerID() const override;
- virtual std::vector<std::string> GetRegisteredAppIDs() const override;
- virtual std::vector<int64> GetAllTrackerIDs() const override;
- virtual std::vector<std::string> GetAllMetadataIDs() const override;
+ std::string PickMultiTrackerFileID() const override;
+ ParentIDAndTitle PickMultiBackingFilePath() const override;
+ int64 PickDirtyTracker() const override;
+ void DemoteDirtyTracker(int64 tracker_id) override;
+ bool HasDemotedDirtyTracker() const override;
+ bool IsDemotedDirtyTracker(int64 tracker_id) const override;
+ void PromoteDemotedDirtyTracker(int64 tracker_id) override;
+ bool PromoteDemotedDirtyTrackers() override;
+ size_t CountDirtyTracker() const override;
+ size_t CountFileMetadata() const override;
+ size_t CountFileTracker() const override;
+ void SetSyncRootTrackerID(int64 sync_root_id) const override;
+ void SetLargestChangeID(int64 largest_change_id) const override;
+ void SetNextTrackerID(int64 next_tracker_id) const override;
+ int64 GetSyncRootTrackerID() const override;
+ int64 GetLargestChangeID() const override;
+ int64 GetNextTrackerID() const override;
+ std::vector<std::string> GetRegisteredAppIDs() const override;
+ std::vector<int64> GetAllTrackerIDs() const override;
+ std::vector<std::string> GetAllMetadataIDs() const override;
private:
typedef base::ScopedPtrHashMap<std::string, FileMetadata> MetadataByID;
diff --git a/chrome/browser/sync_file_system/drive_backend/metadata_database_index_on_disk.h b/chrome/browser/sync_file_system/drive_backend/metadata_database_index_on_disk.h
index 4614307..9eb79aa 100644
--- a/chrome/browser/sync_file_system/drive_backend/metadata_database_index_on_disk.h
+++ b/chrome/browser/sync_file_system/drive_backend/metadata_database_index_on_disk.h
@@ -30,44 +30,44 @@ class MetadataDatabaseIndexOnDisk : public MetadataDatabaseIndexInterface {
public:
static scoped_ptr<MetadataDatabaseIndexOnDisk> Create(LevelDBWrapper* db);
- virtual ~MetadataDatabaseIndexOnDisk();
+ ~MetadataDatabaseIndexOnDisk() override;
// MetadataDatabaseIndexInterface overrides.
- virtual bool GetFileMetadata(
- const std::string& file_id, FileMetadata* metadata) const override;
- virtual bool GetFileTracker(
- int64 tracker_id, FileTracker* tracker) const override;
- virtual void StoreFileMetadata(scoped_ptr<FileMetadata> metadata) override;
- virtual void StoreFileTracker(scoped_ptr<FileTracker> tracker) override;
- virtual void RemoveFileMetadata(const std::string& file_id) override;
- virtual void RemoveFileTracker(int64 tracker_id) override;
- virtual TrackerIDSet GetFileTrackerIDsByFileID(
+ bool GetFileMetadata(const std::string& file_id,
+ FileMetadata* metadata) const override;
+ bool GetFileTracker(int64 tracker_id, FileTracker* tracker) const override;
+ void StoreFileMetadata(scoped_ptr<FileMetadata> metadata) override;
+ void StoreFileTracker(scoped_ptr<FileTracker> tracker) override;
+ void RemoveFileMetadata(const std::string& file_id) override;
+ void RemoveFileTracker(int64 tracker_id) override;
+ TrackerIDSet GetFileTrackerIDsByFileID(
const std::string& file_id) const override;
- virtual int64 GetAppRootTracker(const std::string& app_id) const override;
- virtual TrackerIDSet GetFileTrackerIDsByParentAndTitle(
- int64 parent_tracker_id, const std::string& title) const override;
- virtual std::vector<int64> GetFileTrackerIDsByParent(
+ int64 GetAppRootTracker(const std::string& app_id) const override;
+ TrackerIDSet GetFileTrackerIDsByParentAndTitle(
+ int64 parent_tracker_id,
+ const std::string& title) const override;
+ std::vector<int64> GetFileTrackerIDsByParent(
int64 parent_tracker_id) const override;
- virtual std::string PickMultiTrackerFileID() const override;
- virtual ParentIDAndTitle PickMultiBackingFilePath() const override;
- virtual int64 PickDirtyTracker() const override;
- virtual void DemoteDirtyTracker(int64 tracker_id) override;
- virtual bool HasDemotedDirtyTracker() const override;
- virtual bool IsDemotedDirtyTracker(int64 tracker_id) const override;
- virtual void PromoteDemotedDirtyTracker(int64 tracker_id) override;
- virtual bool PromoteDemotedDirtyTrackers() override;
- virtual size_t CountDirtyTracker() const override;
- virtual size_t CountFileMetadata() const override;
- virtual size_t CountFileTracker() const override;
- virtual void SetSyncRootTrackerID(int64 sync_root_id) const override;
- virtual void SetLargestChangeID(int64 largest_change_id) const override;
- virtual void SetNextTrackerID(int64 next_tracker_id) const override;
- virtual int64 GetSyncRootTrackerID() const override;
- virtual int64 GetLargestChangeID() const override;
- virtual int64 GetNextTrackerID() const override;
- virtual std::vector<std::string> GetRegisteredAppIDs() const override;
- virtual std::vector<int64> GetAllTrackerIDs() const override;
- virtual std::vector<std::string> GetAllMetadataIDs() const override;
+ std::string PickMultiTrackerFileID() const override;
+ ParentIDAndTitle PickMultiBackingFilePath() const override;
+ int64 PickDirtyTracker() const override;
+ void DemoteDirtyTracker(int64 tracker_id) override;
+ bool HasDemotedDirtyTracker() const override;
+ bool IsDemotedDirtyTracker(int64 tracker_id) const override;
+ void PromoteDemotedDirtyTracker(int64 tracker_id) override;
+ bool PromoteDemotedDirtyTrackers() override;
+ size_t CountDirtyTracker() const override;
+ size_t CountFileMetadata() const override;
+ size_t CountFileTracker() const override;
+ void SetSyncRootTrackerID(int64 sync_root_id) const override;
+ void SetLargestChangeID(int64 largest_change_id) const override;
+ void SetNextTrackerID(int64 next_tracker_id) const override;
+ int64 GetSyncRootTrackerID() const override;
+ int64 GetLargestChangeID() const override;
+ int64 GetNextTrackerID() const override;
+ std::vector<std::string> GetRegisteredAppIDs() const override;
+ std::vector<int64> GetAllTrackerIDs() const override;
+ std::vector<std::string> GetAllMetadataIDs() const override;
// Builds on-disk indexes from FileTracker entries on disk.
// Returns the number of newly added entries for indexing.
diff --git a/chrome/browser/sync_file_system/drive_backend/register_app_task.h b/chrome/browser/sync_file_system/drive_backend/register_app_task.h
index 063dfab..2bd628e 100644
--- a/chrome/browser/sync_file_system/drive_backend/register_app_task.h
+++ b/chrome/browser/sync_file_system/drive_backend/register_app_task.h
@@ -34,10 +34,10 @@ class TrackerIDSet;
class RegisterAppTask : public ExclusiveTask {
public:
RegisterAppTask(SyncEngineContext* sync_context, const std::string& app_id);
- virtual ~RegisterAppTask();
+ ~RegisterAppTask() override;
bool CanFinishImmediately();
- virtual void RunExclusive(const SyncStatusCallback& callback) override;
+ void RunExclusive(const SyncStatusCallback& callback) override;
private:
void CreateAppRootFolder(const SyncStatusCallback& callback);
diff --git a/chrome/browser/sync_file_system/drive_backend/remote_change_processor_on_worker.h b/chrome/browser/sync_file_system/drive_backend/remote_change_processor_on_worker.h
index 97e27f7..2e68c09 100644
--- a/chrome/browser/sync_file_system/drive_backend/remote_change_processor_on_worker.h
+++ b/chrome/browser/sync_file_system/drive_backend/remote_change_processor_on_worker.h
@@ -30,23 +30,21 @@ class RemoteChangeProcessorOnWorker : public RemoteChangeProcessor {
const base::WeakPtr<RemoteChangeProcessorWrapper>& wrapper,
base::SingleThreadTaskRunner* ui_task_runner,
base::SequencedTaskRunner* worker_task_runner);
- virtual ~RemoteChangeProcessorOnWorker();
+ ~RemoteChangeProcessorOnWorker() override;
- virtual void PrepareForProcessRemoteChange(
+ void PrepareForProcessRemoteChange(
const storage::FileSystemURL& url,
const PrepareChangeCallback& callback) override;
- virtual void ApplyRemoteChange(const FileChange& change,
- const base::FilePath& local_path,
- const storage::FileSystemURL& url,
- const SyncStatusCallback& callback) override;
- virtual void FinalizeRemoteSync(
- const storage::FileSystemURL& url,
- bool clear_local_changes,
- const base::Closure& completion_callback) override;
- virtual void RecordFakeLocalChange(
- const storage::FileSystemURL& url,
- const FileChange& change,
- const SyncStatusCallback& callback) override;
+ void ApplyRemoteChange(const FileChange& change,
+ const base::FilePath& local_path,
+ const storage::FileSystemURL& url,
+ const SyncStatusCallback& callback) override;
+ void FinalizeRemoteSync(const storage::FileSystemURL& url,
+ bool clear_local_changes,
+ const base::Closure& completion_callback) override;
+ void RecordFakeLocalChange(const storage::FileSystemURL& url,
+ const FileChange& change,
+ const SyncStatusCallback& callback) override;
void DetachFromSequence();
diff --git a/chrome/browser/sync_file_system/drive_backend/remote_to_local_syncer.h b/chrome/browser/sync_file_system/drive_backend/remote_to_local_syncer.h
index 219c791..8eb1125 100644
--- a/chrome/browser/sync_file_system/drive_backend/remote_to_local_syncer.h
+++ b/chrome/browser/sync_file_system/drive_backend/remote_to_local_syncer.h
@@ -47,9 +47,9 @@ class RemoteToLocalSyncer : public SyncTask {
// Conflicting trackers will have low priority for RemoteToLocalSyncer so that
// it should be resolved by LocatToRemoteSyncer.
explicit RemoteToLocalSyncer(SyncEngineContext* sync_context);
- virtual ~RemoteToLocalSyncer();
+ ~RemoteToLocalSyncer() override;
- virtual void RunPreflight(scoped_ptr<SyncTaskToken> token) override;
+ void RunPreflight(scoped_ptr<SyncTaskToken> token) override;
void RunExclusive(scoped_ptr<SyncTaskToken> token);
const storage::FileSystemURL& url() const { return url_; }
diff --git a/chrome/browser/sync_file_system/drive_backend/sync_engine.cc b/chrome/browser/sync_file_system/drive_backend/sync_engine.cc
index e3d8434..c0b2fea 100644
--- a/chrome/browser/sync_file_system/drive_backend/sync_engine.cc
+++ b/chrome/browser/sync_file_system/drive_backend/sync_engine.cc
@@ -89,11 +89,11 @@ class SyncEngine::WorkerObserver : public SyncWorkerInterface::Observer {
sequence_checker_.DetachFromSequence();
}
- virtual ~WorkerObserver() {
+ ~WorkerObserver() override {
DCHECK(sequence_checker_.CalledOnValidSequencedThread());
}
- virtual void OnPendingFileListUpdated(int item_count) override {
+ void OnPendingFileListUpdated(int item_count) override {
if (ui_task_runner_->RunsTasksOnCurrentThread()) {
if (sync_engine_)
sync_engine_->OnPendingFileListUpdated(item_count);
@@ -108,11 +108,11 @@ class SyncEngine::WorkerObserver : public SyncWorkerInterface::Observer {
item_count));
}
- virtual void OnFileStatusChanged(const storage::FileSystemURL& url,
- SyncFileType file_type,
- SyncFileStatus file_status,
- SyncAction sync_action,
- SyncDirection direction) override {
+ void OnFileStatusChanged(const storage::FileSystemURL& url,
+ SyncFileType file_type,
+ SyncFileStatus file_status,
+ SyncAction sync_action,
+ SyncDirection direction) override {
if (ui_task_runner_->RunsTasksOnCurrentThread()) {
if (sync_engine_)
sync_engine_->OnFileStatusChanged(
@@ -128,8 +128,8 @@ class SyncEngine::WorkerObserver : public SyncWorkerInterface::Observer {
url, file_type, file_status, sync_action, direction));
}
- virtual void UpdateServiceState(RemoteServiceState state,
- const std::string& description) override {
+ void UpdateServiceState(RemoteServiceState state,
+ const std::string& description) override {
if (ui_task_runner_->RunsTasksOnCurrentThread()) {
if (sync_engine_)
sync_engine_->UpdateServiceState(state, description);
diff --git a/chrome/browser/sync_file_system/drive_backend/sync_engine.h b/chrome/browser/sync_file_system/drive_backend/sync_engine.h
index 94bdc74..fc5388e 100644
--- a/chrome/browser/sync_file_system/drive_backend/sync_engine.h
+++ b/chrome/browser/sync_file_system/drive_backend/sync_engine.h
@@ -85,7 +85,7 @@ class SyncEngine : public RemoteFileSyncService,
static void AppendDependsOnFactories(
std::set<BrowserContextKeyedServiceFactory*>* factories);
- virtual ~SyncEngine();
+ ~SyncEngine() override;
void Reset();
// Can be called more than once.
@@ -101,59 +101,53 @@ class SyncEngine : public RemoteFileSyncService,
scoped_ptr<SyncWorkerInterface> sync_worker);
// RemoteFileSyncService overrides.
- virtual void AddServiceObserver(SyncServiceObserver* observer) override;
- virtual void AddFileStatusObserver(FileStatusObserver* observer) override;
- virtual void RegisterOrigin(
- const GURL& origin,
- const SyncStatusCallback& callback) override;
- virtual void EnableOrigin(
- const GURL& origin,
- const SyncStatusCallback& callback) override;
- virtual void DisableOrigin(
- const GURL& origin,
- const SyncStatusCallback& callback) override;
- virtual void UninstallOrigin(
- const GURL& origin,
- UninstallFlag flag,
- const SyncStatusCallback& callback) override;
- virtual void ProcessRemoteChange(const SyncFileCallback& callback) override;
- virtual void SetRemoteChangeProcessor(
- RemoteChangeProcessor* processor) override;
- virtual LocalChangeProcessor* GetLocalChangeProcessor() override;
- virtual RemoteServiceState GetCurrentState() const override;
- virtual void GetOriginStatusMap(const StatusMapCallback& callback) override;
- virtual void DumpFiles(const GURL& origin,
- const ListCallback& callback) override;
- virtual void DumpDatabase(const ListCallback& callback) override;
- virtual void SetSyncEnabled(bool enabled) override;
- virtual void PromoteDemotedChanges(const base::Closure& callback) override;
+ void AddServiceObserver(SyncServiceObserver* observer) override;
+ void AddFileStatusObserver(FileStatusObserver* observer) override;
+ void RegisterOrigin(const GURL& origin,
+ const SyncStatusCallback& callback) override;
+ void EnableOrigin(const GURL& origin,
+ const SyncStatusCallback& callback) override;
+ void DisableOrigin(const GURL& origin,
+ const SyncStatusCallback& callback) override;
+ void UninstallOrigin(const GURL& origin,
+ UninstallFlag flag,
+ const SyncStatusCallback& callback) override;
+ void ProcessRemoteChange(const SyncFileCallback& callback) override;
+ void SetRemoteChangeProcessor(RemoteChangeProcessor* processor) override;
+ LocalChangeProcessor* GetLocalChangeProcessor() override;
+ RemoteServiceState GetCurrentState() const override;
+ void GetOriginStatusMap(const StatusMapCallback& callback) override;
+ void DumpFiles(const GURL& origin, const ListCallback& callback) override;
+ void DumpDatabase(const ListCallback& callback) override;
+ void SetSyncEnabled(bool enabled) override;
+ void PromoteDemotedChanges(const base::Closure& callback) override;
// LocalChangeProcessor overrides.
- virtual void ApplyLocalChange(const FileChange& local_change,
- const base::FilePath& local_path,
- const SyncFileMetadata& local_metadata,
- const storage::FileSystemURL& url,
- const SyncStatusCallback& callback) override;
+ void ApplyLocalChange(const FileChange& local_change,
+ const base::FilePath& local_path,
+ const SyncFileMetadata& local_metadata,
+ const storage::FileSystemURL& url,
+ const SyncStatusCallback& callback) override;
// drive::DriveNotificationObserver overrides.
- virtual void OnNotificationReceived() override;
- virtual void OnPushNotificationEnabled(bool enabled) override;
+ void OnNotificationReceived() override;
+ void OnPushNotificationEnabled(bool enabled) override;
// drive::DriveServiceObserver overrides.
- virtual void OnReadyToSendRequests() override;
- virtual void OnRefreshTokenInvalid() override;
+ void OnReadyToSendRequests() override;
+ void OnRefreshTokenInvalid() override;
// net::NetworkChangeNotifier::NetworkChangeObserver overrides.
- virtual void OnNetworkChanged(
+ void OnNetworkChanged(
net::NetworkChangeNotifier::ConnectionType type) override;
// SigninManagerBase::Observer overrides.
- virtual void GoogleSigninFailed(const GoogleServiceAuthError& error) override;
- virtual void GoogleSigninSucceeded(const std::string& account_id,
- const std::string& username,
- const std::string& password) override;
- virtual void GoogleSignedOut(const std::string& account_id,
- const std::string& username) override;
+ void GoogleSigninFailed(const GoogleServiceAuthError& error) override;
+ void GoogleSigninSucceeded(const std::string& account_id,
+ const std::string& username,
+ const std::string& password) override;
+ void GoogleSignedOut(const std::string& account_id,
+ const std::string& username) override;
private:
class WorkerObserver;
diff --git a/chrome/browser/sync_file_system/drive_backend/sync_engine_initializer.h b/chrome/browser/sync_file_system/drive_backend/sync_engine_initializer.h
index ae2c6fd..b522e9d 100644
--- a/chrome/browser/sync_file_system/drive_backend/sync_engine_initializer.h
+++ b/chrome/browser/sync_file_system/drive_backend/sync_engine_initializer.h
@@ -69,8 +69,8 @@ class SyncEngineInitializer : public SyncTask {
SyncEngineInitializer(SyncEngineContext* sync_context,
const base::FilePath& database_path,
leveldb::Env* env_override);
- virtual ~SyncEngineInitializer();
- virtual void RunPreflight(scoped_ptr<SyncTaskToken> token) override;
+ ~SyncEngineInitializer() override;
+ void RunPreflight(scoped_ptr<SyncTaskToken> token) override;
scoped_ptr<MetadataDatabase> PassMetadataDatabase();
diff --git a/chrome/browser/sync_file_system/drive_backend/sync_task.h b/chrome/browser/sync_file_system/drive_backend/sync_task.h
index 5570988..d701684 100644
--- a/chrome/browser/sync_file_system/drive_backend/sync_task.h
+++ b/chrome/browser/sync_file_system/drive_backend/sync_task.h
@@ -36,9 +36,9 @@ class SyncTask {
class ExclusiveTask : public SyncTask {
public:
ExclusiveTask();
- virtual ~ExclusiveTask();
+ ~ExclusiveTask() override;
- virtual void RunPreflight(scoped_ptr<SyncTaskToken> token) override final;
+ void RunPreflight(scoped_ptr<SyncTaskToken> token) final;
virtual void RunExclusive(const SyncStatusCallback& callback) = 0;
private:
diff --git a/chrome/browser/sync_file_system/drive_backend/sync_task_manager.cc b/chrome/browser/sync_file_system/drive_backend/sync_task_manager.cc
index f51f36d..d6ecbae 100644
--- a/chrome/browser/sync_file_system/drive_backend/sync_task_manager.cc
+++ b/chrome/browser/sync_file_system/drive_backend/sync_task_manager.cc
@@ -22,9 +22,9 @@ namespace {
class SyncTaskAdapter : public ExclusiveTask {
public:
explicit SyncTaskAdapter(const SyncTaskManager::Task& task) : task_(task) {}
- virtual ~SyncTaskAdapter() {}
+ ~SyncTaskAdapter() override {}
- virtual void RunExclusive(const SyncStatusCallback& callback) override {
+ void RunExclusive(const SyncStatusCallback& callback) override {
task_.Run(callback);
}
diff --git a/chrome/browser/sync_file_system/drive_backend/sync_task_manager_unittest.cc b/chrome/browser/sync_file_system/drive_backend/sync_task_manager_unittest.cc
index c62c12a..cd24f6e 100644
--- a/chrome/browser/sync_file_system/drive_backend/sync_task_manager_unittest.cc
+++ b/chrome/browser/sync_file_system/drive_backend/sync_task_manager_unittest.cc
@@ -67,19 +67,16 @@ class TaskManagerClient
base::MessageLoop::current()->RunUntilIdle();
maybe_schedule_next_task_count_ = 0;
}
- virtual ~TaskManagerClient() {}
+ ~TaskManagerClient() override {}
// DriveFileSyncManager::Client overrides.
- virtual void MaybeScheduleNextTask() override {
- ++maybe_schedule_next_task_count_;
- }
- virtual void NotifyLastOperationStatus(
- SyncStatusCode last_operation_status,
- bool last_operation_used_network) override {
+ void MaybeScheduleNextTask() override { ++maybe_schedule_next_task_count_; }
+ void NotifyLastOperationStatus(SyncStatusCode last_operation_status,
+ bool last_operation_used_network) override {
last_operation_status_ = last_operation_status;
}
- virtual void RecordTaskLog(scoped_ptr<TaskLogger::TaskLog>) override {}
+ void RecordTaskLog(scoped_ptr<TaskLogger::TaskLog>) override {}
void ScheduleTask(SyncStatusCode status_to_return,
const SyncStatusCallback& callback) {
@@ -141,9 +138,9 @@ class MultihopSyncTask : public ExclusiveTask {
DCHECK(task_completed_);
}
- virtual ~MultihopSyncTask() {}
+ ~MultihopSyncTask() override {}
- virtual void RunExclusive(const SyncStatusCallback& callback) override {
+ void RunExclusive(const SyncStatusCallback& callback) override {
DCHECK(!*task_started_);
*task_started_ = true;
base::MessageLoop::current()->PostTask(
@@ -188,10 +185,9 @@ class BackgroundTask : public SyncTask {
weak_ptr_factory_(this) {
}
- virtual ~BackgroundTask() {
- }
+ ~BackgroundTask() override {}
- virtual void RunPreflight(scoped_ptr<SyncTaskToken> token) override {
+ void RunPreflight(scoped_ptr<SyncTaskToken> token) override {
scoped_ptr<TaskBlocker> task_blocker(new TaskBlocker);
task_blocker->app_id = app_id_;
task_blocker->paths.push_back(path_);
@@ -245,10 +241,9 @@ class BlockerUpdateTestHelper : public SyncTask {
weak_ptr_factory_(this) {
}
- virtual ~BlockerUpdateTestHelper() {
- }
+ ~BlockerUpdateTestHelper() override {}
- virtual void RunPreflight(scoped_ptr<SyncTaskToken> token) override {
+ void RunPreflight(scoped_ptr<SyncTaskToken> token) override {
UpdateBlocker(token.Pass());
}
diff --git a/chrome/browser/sync_file_system/drive_backend/sync_worker.h b/chrome/browser/sync_file_system/drive_backend/sync_worker.h
index 1461ca3..1cf701c 100644
--- a/chrome/browser/sync_file_system/drive_backend/sync_worker.h
+++ b/chrome/browser/sync_file_system/drive_backend/sync_worker.h
@@ -58,47 +58,46 @@ class SyncWorker : public SyncWorkerInterface,
const base::WeakPtr<ExtensionServiceInterface>& extension_service,
leveldb::Env* env_override);
- virtual ~SyncWorker();
+ ~SyncWorker() override;
- virtual void Initialize(scoped_ptr<SyncEngineContext> context) override;
+ void Initialize(scoped_ptr<SyncEngineContext> context) override;
// SyncTaskManager::Client overrides
- virtual void MaybeScheduleNextTask() override;
- virtual void NotifyLastOperationStatus(
- SyncStatusCode sync_status, bool used_network) override;
- virtual void RecordTaskLog(scoped_ptr<TaskLogger::TaskLog> task_log) override;
+ void MaybeScheduleNextTask() override;
+ void NotifyLastOperationStatus(SyncStatusCode sync_status,
+ bool used_network) override;
+ void RecordTaskLog(scoped_ptr<TaskLogger::TaskLog> task_log) override;
// SyncWorkerInterface overrides
- virtual void RegisterOrigin(const GURL& origin,
- const SyncStatusCallback& callback) override;
- virtual void EnableOrigin(const GURL& origin,
- const SyncStatusCallback& callback) override;
- virtual void DisableOrigin(const GURL& origin,
- const SyncStatusCallback& callback) override;
- virtual void UninstallOrigin(const GURL& origin,
- RemoteFileSyncService::UninstallFlag flag,
- const SyncStatusCallback& callback) override;
- virtual void ProcessRemoteChange(const SyncFileCallback& callback) override;
- virtual void SetRemoteChangeProcessor(
- RemoteChangeProcessorOnWorker* remote_change_processor_on_worker)
- override;
- virtual RemoteServiceState GetCurrentState() const override;
- virtual void GetOriginStatusMap(
+ void RegisterOrigin(const GURL& origin,
+ const SyncStatusCallback& callback) override;
+ void EnableOrigin(const GURL& origin,
+ const SyncStatusCallback& callback) override;
+ void DisableOrigin(const GURL& origin,
+ const SyncStatusCallback& callback) override;
+ void UninstallOrigin(const GURL& origin,
+ RemoteFileSyncService::UninstallFlag flag,
+ const SyncStatusCallback& callback) override;
+ void ProcessRemoteChange(const SyncFileCallback& callback) override;
+ void SetRemoteChangeProcessor(RemoteChangeProcessorOnWorker*
+ remote_change_processor_on_worker) override;
+ RemoteServiceState GetCurrentState() const override;
+ void GetOriginStatusMap(
const RemoteFileSyncService::StatusMapCallback& callback) override;
- virtual scoped_ptr<base::ListValue> DumpFiles(const GURL& origin) override;
- virtual scoped_ptr<base::ListValue> DumpDatabase() override;
- virtual void SetSyncEnabled(bool enabled) override;
- virtual void PromoteDemotedChanges(const base::Closure& callback) override;
- virtual void ApplyLocalChange(const FileChange& local_change,
- const base::FilePath& local_path,
- const SyncFileMetadata& local_metadata,
- const storage::FileSystemURL& url,
- const SyncStatusCallback& callback) override;
- virtual void ActivateService(RemoteServiceState service_state,
- const std::string& description) override;
- virtual void DeactivateService(const std::string& description) override;
- virtual void DetachFromSequence() override;
- virtual void AddObserver(Observer* observer) override;
+ scoped_ptr<base::ListValue> DumpFiles(const GURL& origin) override;
+ scoped_ptr<base::ListValue> DumpDatabase() override;
+ void SetSyncEnabled(bool enabled) override;
+ void PromoteDemotedChanges(const base::Closure& callback) override;
+ void ApplyLocalChange(const FileChange& local_change,
+ const base::FilePath& local_path,
+ const SyncFileMetadata& local_metadata,
+ const storage::FileSystemURL& url,
+ const SyncStatusCallback& callback) override;
+ void ActivateService(RemoteServiceState service_state,
+ const std::string& description) override;
+ void DeactivateService(const std::string& description) override;
+ void DetachFromSequence() override;
+ void AddObserver(Observer* observer) override;
private:
friend class DriveBackendSyncTest;
diff --git a/chrome/browser/sync_file_system/drive_backend/sync_worker_unittest.cc b/chrome/browser/sync_file_system/drive_backend/sync_worker_unittest.cc
index ddc5c79..ae2797a 100644
--- a/chrome/browser/sync_file_system/drive_backend/sync_worker_unittest.cc
+++ b/chrome/browser/sync_file_system/drive_backend/sync_worker_unittest.cc
@@ -45,9 +45,9 @@ class MockSyncTask : public ExclusiveTask {
explicit MockSyncTask(bool used_network) {
set_used_network(used_network);
}
- virtual ~MockSyncTask() {}
+ ~MockSyncTask() override {}
- virtual void RunExclusive(const SyncStatusCallback& callback) override {
+ void RunExclusive(const SyncStatusCallback& callback) override {
callback.Run(SYNC_STATUS_OK);
}
@@ -58,23 +58,22 @@ class MockSyncTask : public ExclusiveTask {
class MockExtensionService : public TestExtensionService {
public:
MockExtensionService() {}
- virtual ~MockExtensionService() {}
+ ~MockExtensionService() override {}
- virtual const extensions::ExtensionSet* extensions() const override {
+ const extensions::ExtensionSet* extensions() const override {
return &extensions_;
}
- virtual void AddExtension(const extensions::Extension* extension) override {
+ void AddExtension(const extensions::Extension* extension) override {
extensions_.Insert(make_scoped_refptr(extension));
}
- virtual const extensions::Extension* GetInstalledExtension(
+ const extensions::Extension* GetInstalledExtension(
const std::string& extension_id) const override {
return extensions_.GetByID(extension_id);
}
- virtual bool IsExtensionEnabled(
- const std::string& extension_id) const override {
+ bool IsExtensionEnabled(const std::string& extension_id) const override {
return extensions_.Contains(extension_id) &&
!disabled_extensions_.Contains(extension_id);
}
diff --git a/chrome/browser/sync_file_system/drive_backend/uninstall_app_task.h b/chrome/browser/sync_file_system/drive_backend/uninstall_app_task.h
index ca2d59c..e6baead 100644
--- a/chrome/browser/sync_file_system/drive_backend/uninstall_app_task.h
+++ b/chrome/browser/sync_file_system/drive_backend/uninstall_app_task.h
@@ -37,9 +37,9 @@ class UninstallAppTask : public ExclusiveTask {
UninstallAppTask(SyncEngineContext* sync_context,
const std::string& app_id,
UninstallFlag uninstall_flag);
- virtual ~UninstallAppTask();
+ ~UninstallAppTask() override;
- virtual void RunExclusive(const SyncStatusCallback& callback) override;
+ void RunExclusive(const SyncStatusCallback& callback) override;
private:
void DidDeleteAppRoot(const SyncStatusCallback& callback,
diff --git a/chrome/browser/sync_file_system/fake_remote_change_processor.h b/chrome/browser/sync_file_system/fake_remote_change_processor.h
index f751bca..48bfa8d 100644
--- a/chrome/browser/sync_file_system/fake_remote_change_processor.h
+++ b/chrome/browser/sync_file_system/fake_remote_change_processor.h
@@ -38,24 +38,22 @@ class FakeRemoteChangeProcessor : public RemoteChangeProcessor {
storage::FileSystemURL::Comparator> URLToFileMetadata;
FakeRemoteChangeProcessor();
- virtual ~FakeRemoteChangeProcessor();
+ ~FakeRemoteChangeProcessor() override;
// RemoteChangeProcessor overrides.
- virtual void PrepareForProcessRemoteChange(
+ void PrepareForProcessRemoteChange(
const storage::FileSystemURL& url,
const PrepareChangeCallback& callback) override;
- virtual void ApplyRemoteChange(const FileChange& change,
- const base::FilePath& local_path,
- const storage::FileSystemURL& url,
- const SyncStatusCallback& callback) override;
- virtual void FinalizeRemoteSync(
- const storage::FileSystemURL& url,
- bool clear_local_changes,
- const base::Closure& completion_callback) override;
- virtual void RecordFakeLocalChange(
- const storage::FileSystemURL& url,
- const FileChange& change,
- const SyncStatusCallback& callback) override;
+ void ApplyRemoteChange(const FileChange& change,
+ const base::FilePath& local_path,
+ const storage::FileSystemURL& url,
+ const SyncStatusCallback& callback) override;
+ void FinalizeRemoteSync(const storage::FileSystemURL& url,
+ bool clear_local_changes,
+ const base::Closure& completion_callback) override;
+ void RecordFakeLocalChange(const storage::FileSystemURL& url,
+ const FileChange& change,
+ const SyncStatusCallback& callback) override;
void UpdateLocalFileMetadata(const storage::FileSystemURL& url,
const FileChange& change);
diff --git a/chrome/browser/sync_file_system/local/canned_syncable_file_system.h b/chrome/browser/sync_file_system/local/canned_syncable_file_system.h
index cd7d478..13ebb83 100644
--- a/chrome/browser/sync_file_system/local/canned_syncable_file_system.h
+++ b/chrome/browser/sync_file_system/local/canned_syncable_file_system.h
@@ -75,7 +75,7 @@ class CannedSyncableFileSystem
leveldb::Env* env_override,
const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner,
const scoped_refptr<base::SingleThreadTaskRunner>& file_task_runner);
- virtual ~CannedSyncableFileSystem();
+ ~CannedSyncableFileSystem() override;
// SetUp must be called before using this instance.
void SetUp(QuotaMode quota_mode);
@@ -159,8 +159,8 @@ class CannedSyncableFileSystem
storage::FileSystemOperationRunner* operation_runner();
// LocalFileSyncStatus::Observer overrides.
- virtual void OnSyncEnabled(const storage::FileSystemURL& url) override;
- virtual void OnWriteEnabled(const storage::FileSystemURL& url) override;
+ void OnSyncEnabled(const storage::FileSystemURL& url) override;
+ void OnWriteEnabled(const storage::FileSystemURL& url) override;
// Operation methods body.
// They can be also called directly if the caller is already on IO thread.
diff --git a/chrome/browser/sync_file_system/local/local_file_change_tracker.h b/chrome/browser/sync_file_system/local/local_file_change_tracker.h
index daf2235..d38c8fc 100644
--- a/chrome/browser/sync_file_system/local/local_file_change_tracker.h
+++ b/chrome/browser/sync_file_system/local/local_file_change_tracker.h
@@ -48,22 +48,21 @@ class LocalFileChangeTracker : public storage::FileUpdateObserver,
LocalFileChangeTracker(const base::FilePath& base_path,
leveldb::Env* env_override,
base::SequencedTaskRunner* file_task_runner);
- virtual ~LocalFileChangeTracker();
+ ~LocalFileChangeTracker() override;
// FileUpdateObserver overrides.
- virtual void OnStartUpdate(const storage::FileSystemURL& url) override;
- virtual void OnUpdate(const storage::FileSystemURL& url,
- int64 delta) override {}
- virtual void OnEndUpdate(const storage::FileSystemURL& url) override;
+ void OnStartUpdate(const storage::FileSystemURL& url) override;
+ void OnUpdate(const storage::FileSystemURL& url, int64 delta) override {}
+ void OnEndUpdate(const storage::FileSystemURL& url) override;
// FileChangeObserver overrides.
- virtual void OnCreateFile(const storage::FileSystemURL& url) override;
- virtual void OnCreateFileFrom(const storage::FileSystemURL& url,
- const storage::FileSystemURL& src) override;
- virtual void OnRemoveFile(const storage::FileSystemURL& url) override;
- virtual void OnModifyFile(const storage::FileSystemURL& url) override;
- virtual void OnCreateDirectory(const storage::FileSystemURL& url) override;
- virtual void OnRemoveDirectory(const storage::FileSystemURL& url) override;
+ void OnCreateFile(const storage::FileSystemURL& url) override;
+ void OnCreateFileFrom(const storage::FileSystemURL& url,
+ const storage::FileSystemURL& src) override;
+ void OnRemoveFile(const storage::FileSystemURL& url) override;
+ void OnModifyFile(const storage::FileSystemURL& url) override;
+ void OnCreateDirectory(const storage::FileSystemURL& url) override;
+ void OnRemoveDirectory(const storage::FileSystemURL& url) override;
// Retrieves an array of |url| which have more than one pending changes.
// If |max_urls| is non-zero (recommended in production code) this
diff --git a/chrome/browser/sync_file_system/local/local_file_sync_context.h b/chrome/browser/sync_file_system/local/local_file_sync_context.h
index 71fcd82..6a18c81 100644
--- a/chrome/browser/sync_file_system/local/local_file_sync_context.h
+++ b/chrome/browser/sync_file_system/local/local_file_sync_context.h
@@ -206,8 +206,8 @@ class LocalFileSyncContext
protected:
// LocalFileSyncStatus::Observer overrides. They are called on IO thread.
- virtual void OnSyncEnabled(const storage::FileSystemURL& url) override;
- virtual void OnWriteEnabled(const storage::FileSystemURL& url) override;
+ void OnSyncEnabled(const storage::FileSystemURL& url) override;
+ void OnWriteEnabled(const storage::FileSystemURL& url) override;
private:
typedef base::Callback<void(base::File::Error result)> StatusCallback;
@@ -216,7 +216,7 @@ class LocalFileSyncContext
friend class base::RefCountedThreadSafe<LocalFileSyncContext>;
friend class CannedSyncableFileSystem;
- virtual ~LocalFileSyncContext();
+ ~LocalFileSyncContext() override;
void ShutdownOnIOThread();
diff --git a/chrome/browser/sync_file_system/local/local_file_sync_service.h b/chrome/browser/sync_file_system/local/local_file_sync_service.h
index 86414d5..dbf24c5 100644
--- a/chrome/browser/sync_file_system/local/local_file_sync_service.h
+++ b/chrome/browser/sync_file_system/local/local_file_sync_service.h
@@ -74,7 +74,7 @@ class LocalFileSyncService
static scoped_ptr<LocalFileSyncService> CreateForTesting(
Profile* profile,
leveldb::Env* env_override);
- virtual ~LocalFileSyncService();
+ ~LocalFileSyncService() override;
void Shutdown();
@@ -129,25 +129,22 @@ class LocalFileSyncService
const SyncFileMetadataCallback& callback);
// RemoteChangeProcessor overrides.
- virtual void PrepareForProcessRemoteChange(
+ void PrepareForProcessRemoteChange(
const storage::FileSystemURL& url,
const PrepareChangeCallback& callback) override;
- virtual void ApplyRemoteChange(const FileChange& change,
- const base::FilePath& local_path,
- const storage::FileSystemURL& url,
- const SyncStatusCallback& callback) override;
- virtual void FinalizeRemoteSync(
- const storage::FileSystemURL& url,
- bool clear_local_changes,
- const base::Closure& completion_callback) override;
- virtual void RecordFakeLocalChange(
- const storage::FileSystemURL& url,
- const FileChange& change,
- const SyncStatusCallback& callback) override;
+ void ApplyRemoteChange(const FileChange& change,
+ const base::FilePath& local_path,
+ const storage::FileSystemURL& url,
+ const SyncStatusCallback& callback) override;
+ void FinalizeRemoteSync(const storage::FileSystemURL& url,
+ bool clear_local_changes,
+ const base::Closure& completion_callback) override;
+ void RecordFakeLocalChange(const storage::FileSystemURL& url,
+ const FileChange& change,
+ const SyncStatusCallback& callback) override;
// LocalOriginChangeObserver override.
- virtual void OnChangesAvailableInOrigins(
- const std::set<GURL>& origins) override;
+ void OnChangesAvailableInOrigins(const std::set<GURL>& origins) override;
// Called when a particular origin (app) is disabled/enabled while
// the service is running. This may be called for origins/apps that
diff --git a/chrome/browser/sync_file_system/local/local_file_sync_service_unittest.cc b/chrome/browser/sync_file_system/local/local_file_sync_service_unittest.cc
index 482280b..0d78aa5 100644
--- a/chrome/browser/sync_file_system/local/local_file_sync_service_unittest.cc
+++ b/chrome/browser/sync_file_system/local/local_file_sync_service_unittest.cc
@@ -148,7 +148,7 @@ class LocalFileSyncServiceTest
}
// LocalChangeObserver overrides.
- virtual void OnLocalChangeAvailable(int64 num_changes) override {
+ void OnLocalChangeAvailable(int64 num_changes) override {
num_changes_ = num_changes;
}
diff --git a/chrome/browser/sync_file_system/local/sync_file_system_backend.h b/chrome/browser/sync_file_system/local/sync_file_system_backend.h
index a6bb622..4b47e28 100644
--- a/chrome/browser/sync_file_system/local/sync_file_system_backend.h
+++ b/chrome/browser/sync_file_system/local/sync_file_system_backend.h
@@ -23,47 +23,46 @@ class LocalFileSyncContext;
class SyncFileSystemBackend : public storage::FileSystemBackend {
public:
explicit SyncFileSystemBackend(Profile* profile);
- virtual ~SyncFileSystemBackend();
+ ~SyncFileSystemBackend() override;
static SyncFileSystemBackend* CreateForTesting();
// FileSystemBackend overrides.
- virtual bool CanHandleType(storage::FileSystemType type) const override;
- virtual void Initialize(storage::FileSystemContext* context) override;
- virtual void ResolveURL(const storage::FileSystemURL& url,
- storage::OpenFileSystemMode mode,
- const OpenFileSystemCallback& callback) override;
- virtual storage::AsyncFileUtil* GetAsyncFileUtil(
+ bool CanHandleType(storage::FileSystemType type) const override;
+ void Initialize(storage::FileSystemContext* context) override;
+ void ResolveURL(const storage::FileSystemURL& url,
+ storage::OpenFileSystemMode mode,
+ const OpenFileSystemCallback& callback) override;
+ storage::AsyncFileUtil* GetAsyncFileUtil(
storage::FileSystemType type) override;
- virtual storage::WatcherManager* GetWatcherManager(
+ storage::WatcherManager* GetWatcherManager(
storage::FileSystemType type) override;
- virtual storage::CopyOrMoveFileValidatorFactory*
- GetCopyOrMoveFileValidatorFactory(storage::FileSystemType type,
- base::File::Error* error_code) override;
- virtual storage::FileSystemOperation* CreateFileSystemOperation(
+ storage::CopyOrMoveFileValidatorFactory* GetCopyOrMoveFileValidatorFactory(
+ storage::FileSystemType type,
+ base::File::Error* error_code) override;
+ storage::FileSystemOperation* CreateFileSystemOperation(
const storage::FileSystemURL& url,
storage::FileSystemContext* context,
base::File::Error* error_code) const override;
- virtual bool SupportsStreaming(
- const storage::FileSystemURL& url) const override;
- virtual bool HasInplaceCopyImplementation(
+ bool SupportsStreaming(const storage::FileSystemURL& url) const override;
+ bool HasInplaceCopyImplementation(
storage::FileSystemType type) const override;
- virtual scoped_ptr<storage::FileStreamReader> CreateFileStreamReader(
+ scoped_ptr<storage::FileStreamReader> CreateFileStreamReader(
const storage::FileSystemURL& url,
int64 offset,
int64 max_bytes_to_read,
const base::Time& expected_modification_time,
storage::FileSystemContext* context) const override;
- virtual scoped_ptr<storage::FileStreamWriter> CreateFileStreamWriter(
+ scoped_ptr<storage::FileStreamWriter> CreateFileStreamWriter(
const storage::FileSystemURL& url,
int64 offset,
storage::FileSystemContext* context) const override;
- virtual storage::FileSystemQuotaUtil* GetQuotaUtil() override;
- virtual const storage::UpdateObserverList* GetUpdateObservers(
+ storage::FileSystemQuotaUtil* GetQuotaUtil() override;
+ const storage::UpdateObserverList* GetUpdateObservers(
storage::FileSystemType type) const override;
- virtual const storage::ChangeObserverList* GetChangeObservers(
+ const storage::ChangeObserverList* GetChangeObservers(
storage::FileSystemType type) const override;
- virtual const storage::AccessObserverList* GetAccessObservers(
+ const storage::AccessObserverList* GetAccessObservers(
storage::FileSystemType type) const override;
static SyncFileSystemBackend* GetBackend(
@@ -81,9 +80,9 @@ class SyncFileSystemBackend : public storage::FileSystemBackend {
explicit ProfileHolder(Profile* profile);
// NotificationObserver override.
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) override;
+ void Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) override;
Profile* GetProfile();
diff --git a/chrome/browser/sync_file_system/local/syncable_file_operation_runner.h b/chrome/browser/sync_file_system/local/syncable_file_operation_runner.h
index 8d18818..0005ab2 100644
--- a/chrome/browser/sync_file_system/local/syncable_file_operation_runner.h
+++ b/chrome/browser/sync_file_system/local/syncable_file_operation_runner.h
@@ -54,11 +54,11 @@ class SyncableFileOperationRunner
SyncableFileOperationRunner(int64 max_inflight_tasks,
LocalFileSyncStatus* sync_status);
- virtual ~SyncableFileOperationRunner();
+ ~SyncableFileOperationRunner() override;
// LocalFileSyncStatus::Observer overrides.
- virtual void OnSyncEnabled(const storage::FileSystemURL& url) override;
- virtual void OnWriteEnabled(const storage::FileSystemURL& url) override;
+ void OnSyncEnabled(const storage::FileSystemURL& url) override;
+ void OnWriteEnabled(const storage::FileSystemURL& url) override;
// Runs the given |task| if no sync operation is running on any of
// its target_paths(). This also runs pending tasks that have become
diff --git a/chrome/browser/sync_file_system/local/syncable_file_system_operation.cc b/chrome/browser/sync_file_system/local/syncable_file_system_operation.cc
index 9198912..5a2e7b5 100644
--- a/chrome/browser/sync_file_system/local/syncable_file_system_operation.cc
+++ b/chrome/browser/sync_file_system/local/syncable_file_system_operation.cc
@@ -40,11 +40,9 @@ class SyncableFileSystemOperation::QueueableTask
task_(task),
target_paths_(operation->target_paths_) {}
- virtual ~QueueableTask() {
- DCHECK(!operation_);
- }
+ ~QueueableTask() override { DCHECK(!operation_); }
- virtual void Run() override {
+ void Run() override {
if (!operation_)
return;
DCHECK(!task_.is_null());
@@ -52,7 +50,7 @@ class SyncableFileSystemOperation::QueueableTask
operation_.reset();
}
- virtual void Cancel() override {
+ void Cancel() override {
DCHECK(!task_.is_null());
if (operation_)
operation_->OnCancelled();
@@ -60,7 +58,7 @@ class SyncableFileSystemOperation::QueueableTask
operation_.reset();
}
- virtual const std::vector<FileSystemURL>& target_paths() const override {
+ const std::vector<FileSystemURL>& target_paths() const override {
return target_paths_;
}
diff --git a/chrome/browser/sync_file_system/local/syncable_file_system_operation.h b/chrome/browser/sync_file_system/local/syncable_file_system_operation.h
index 069e0b5..b93ac91 100644
--- a/chrome/browser/sync_file_system/local/syncable_file_system_operation.h
+++ b/chrome/browser/sync_file_system/local/syncable_file_system_operation.h
@@ -29,73 +29,71 @@ class SyncableFileSystemOperation
: public NON_EXPORTED_BASE(storage::FileSystemOperation),
public base::NonThreadSafe {
public:
- virtual ~SyncableFileSystemOperation();
+ ~SyncableFileSystemOperation() override;
// storage::FileSystemOperation overrides.
- virtual void CreateFile(const storage::FileSystemURL& url,
- bool exclusive,
- const StatusCallback& callback) override;
- virtual void CreateDirectory(const storage::FileSystemURL& url,
- bool exclusive,
- bool recursive,
- const StatusCallback& callback) override;
- virtual void Copy(const storage::FileSystemURL& src_url,
- const storage::FileSystemURL& dest_url,
- CopyOrMoveOption option,
- const CopyProgressCallback& progress_callback,
- const StatusCallback& callback) override;
- virtual void Move(const storage::FileSystemURL& src_url,
- const storage::FileSystemURL& dest_url,
- CopyOrMoveOption option,
- const StatusCallback& callback) override;
- virtual void DirectoryExists(const storage::FileSystemURL& url,
- const StatusCallback& callback) override;
- virtual void FileExists(const storage::FileSystemURL& url,
- const StatusCallback& callback) override;
- virtual void GetMetadata(const storage::FileSystemURL& url,
- const GetMetadataCallback& callback) override;
- virtual void ReadDirectory(const storage::FileSystemURL& url,
- const ReadDirectoryCallback& callback) override;
- virtual void Remove(const storage::FileSystemURL& url,
- bool recursive,
- const StatusCallback& callback) override;
- virtual void Write(const storage::FileSystemURL& url,
- scoped_ptr<storage::FileWriterDelegate> writer_delegate,
- scoped_ptr<net::URLRequest> blob_request,
- const WriteCallback& callback) override;
- virtual void Truncate(const storage::FileSystemURL& url,
- int64 length,
- const StatusCallback& callback) override;
- virtual void TouchFile(const storage::FileSystemURL& url,
- const base::Time& last_access_time,
- const base::Time& last_modified_time,
+ void CreateFile(const storage::FileSystemURL& url,
+ bool exclusive,
+ const StatusCallback& callback) override;
+ void CreateDirectory(const storage::FileSystemURL& url,
+ bool exclusive,
+ bool recursive,
+ const StatusCallback& callback) override;
+ void Copy(const storage::FileSystemURL& src_url,
+ const storage::FileSystemURL& dest_url,
+ CopyOrMoveOption option,
+ const CopyProgressCallback& progress_callback,
+ const StatusCallback& callback) override;
+ void Move(const storage::FileSystemURL& src_url,
+ const storage::FileSystemURL& dest_url,
+ CopyOrMoveOption option,
+ const StatusCallback& callback) override;
+ void DirectoryExists(const storage::FileSystemURL& url,
+ const StatusCallback& callback) override;
+ void FileExists(const storage::FileSystemURL& url,
+ const StatusCallback& callback) override;
+ void GetMetadata(const storage::FileSystemURL& url,
+ const GetMetadataCallback& callback) override;
+ void ReadDirectory(const storage::FileSystemURL& url,
+ const ReadDirectoryCallback& callback) override;
+ void Remove(const storage::FileSystemURL& url,
+ bool recursive,
+ const StatusCallback& callback) override;
+ void Write(const storage::FileSystemURL& url,
+ scoped_ptr<storage::FileWriterDelegate> writer_delegate,
+ scoped_ptr<net::URLRequest> blob_request,
+ const WriteCallback& callback) override;
+ void Truncate(const storage::FileSystemURL& url,
+ int64 length,
+ const StatusCallback& callback) override;
+ void TouchFile(const storage::FileSystemURL& url,
+ const base::Time& last_access_time,
+ const base::Time& last_modified_time,
+ const StatusCallback& callback) override;
+ void OpenFile(const storage::FileSystemURL& url,
+ int file_flags,
+ const OpenFileCallback& callback) override;
+ void Cancel(const StatusCallback& cancel_callback) override;
+ void CreateSnapshotFile(const storage::FileSystemURL& path,
+ const SnapshotFileCallback& callback) override;
+ void CopyInForeignFile(const base::FilePath& src_local_disk_path,
+ const storage::FileSystemURL& dest_url,
const StatusCallback& callback) override;
- virtual void OpenFile(const storage::FileSystemURL& url,
- int file_flags,
- const OpenFileCallback& callback) override;
- virtual void Cancel(const StatusCallback& cancel_callback) override;
- virtual void CreateSnapshotFile(
- const storage::FileSystemURL& path,
- const SnapshotFileCallback& callback) override;
- virtual void CopyInForeignFile(const base::FilePath& src_local_disk_path,
- const storage::FileSystemURL& dest_url,
- const StatusCallback& callback) override;
- virtual void RemoveFile(const storage::FileSystemURL& url,
- const StatusCallback& callback) override;
- virtual void RemoveDirectory(const storage::FileSystemURL& url,
- const StatusCallback& callback) override;
- virtual void CopyFileLocal(const storage::FileSystemURL& src_url,
- const storage::FileSystemURL& dest_url,
- CopyOrMoveOption option,
- const CopyFileProgressCallback& progress_callback,
- const StatusCallback& callback) override;
- virtual void MoveFileLocal(const storage::FileSystemURL& src_url,
- const storage::FileSystemURL& dest_url,
- CopyOrMoveOption option,
- const StatusCallback& callback) override;
- virtual base::File::Error SyncGetPlatformPath(
- const storage::FileSystemURL& url,
- base::FilePath* platform_path) override;
+ void RemoveFile(const storage::FileSystemURL& url,
+ const StatusCallback& callback) override;
+ void RemoveDirectory(const storage::FileSystemURL& url,
+ const StatusCallback& callback) override;
+ void CopyFileLocal(const storage::FileSystemURL& src_url,
+ const storage::FileSystemURL& dest_url,
+ CopyOrMoveOption option,
+ const CopyFileProgressCallback& progress_callback,
+ const StatusCallback& callback) override;
+ void MoveFileLocal(const storage::FileSystemURL& src_url,
+ const storage::FileSystemURL& dest_url,
+ CopyOrMoveOption option,
+ const StatusCallback& callback) override;
+ base::File::Error SyncGetPlatformPath(const storage::FileSystemURL& url,
+ base::FilePath* platform_path) override;
private:
typedef SyncableFileSystemOperation self;
diff --git a/chrome/browser/sync_file_system/sync_file_system_service.cc b/chrome/browser/sync_file_system/sync_file_system_service.cc
index 730708b..5f30648 100644
--- a/chrome/browser/sync_file_system/sync_file_system_service.cc
+++ b/chrome/browser/sync_file_system/sync_file_system_service.cc
@@ -150,14 +150,14 @@ class LocalSyncRunner : public SyncProcessRunner,
1 /* max_parallel_task */),
factory_(this) {}
- virtual void StartSync(const SyncStatusCallback& callback) override {
+ void StartSync(const SyncStatusCallback& callback) override {
GetSyncService()->local_service_->ProcessLocalChange(
base::Bind(&LocalSyncRunner::DidProcessLocalChange,
factory_.GetWeakPtr(), callback));
}
// LocalFileSyncService::Observer overrides.
- virtual void OnLocalChangeAvailable(int64 pending_changes) override {
+ void OnLocalChangeAvailable(int64 pending_changes) override {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
OnChangesUpdated(pending_changes);
@@ -196,18 +196,18 @@ class RemoteSyncRunner : public SyncProcessRunner,
last_state_(REMOTE_SERVICE_OK),
factory_(this) {}
- virtual void StartSync(const SyncStatusCallback& callback) override {
+ void StartSync(const SyncStatusCallback& callback) override {
remote_service_->ProcessRemoteChange(
base::Bind(&RemoteSyncRunner::DidProcessRemoteChange,
factory_.GetWeakPtr(), callback));
}
- virtual SyncServiceState GetServiceState() override {
+ SyncServiceState GetServiceState() override {
return RemoteStateToSyncServiceState(last_state_);
}
// RemoteFileSyncService::Observer overrides.
- virtual void OnRemoteChangeQueueUpdated(int64 pending_changes) override {
+ void OnRemoteChangeQueueUpdated(int64 pending_changes) override {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
OnChangesUpdated(pending_changes);
@@ -216,9 +216,8 @@ class RemoteSyncRunner : public SyncProcessRunner,
GetSyncService()->RunForEachSyncRunners(&SyncProcessRunner::Schedule);
}
- virtual void OnRemoteServiceStateUpdated(
- RemoteServiceState state,
- const std::string& description) override {
+ void OnRemoteServiceStateUpdated(RemoteServiceState state,
+ const std::string& description) override {
// Just forward to SyncFileSystemService.
GetSyncService()->OnRemoteServiceStateUpdated(state, description);
last_state_ = state;
diff --git a/chrome/browser/sync_file_system/sync_file_system_service.h b/chrome/browser/sync_file_system/sync_file_system_service.h
index 9ba4185..db520b6 100644
--- a/chrome/browser/sync_file_system/sync_file_system_service.h
+++ b/chrome/browser/sync_file_system/sync_file_system_service.h
@@ -54,7 +54,7 @@ class SyncFileSystemService
ExtensionStatusMapCallback;
// KeyedService implementation.
- virtual void Shutdown() override;
+ void Shutdown() override;
void InitializeForApp(storage::FileSystemContext* file_system_context,
const GURL& app_origin,
@@ -74,9 +74,9 @@ class SyncFileSystemService
LocalChangeProcessor* GetLocalChangeProcessor(const GURL& origin);
// SyncProcessRunner::Client implementations.
- virtual void OnSyncIdle() override;
- virtual SyncServiceState GetSyncServiceState() override;
- virtual SyncFileSystemService* GetSyncService() override;
+ void OnSyncIdle() override;
+ SyncServiceState GetSyncServiceState() override;
+ SyncFileSystemService* GetSyncService() override;
void OnPromotionCompleted(int* num_running_jobs);
void CheckIfIdle();
@@ -94,7 +94,7 @@ class SyncFileSystemService
friend class RemoteSyncRunner;
explicit SyncFileSystemService(Profile* profile);
- virtual ~SyncFileSystemService();
+ ~SyncFileSystemService() override;
void Initialize(scoped_ptr<LocalFileSyncService> local_file_service,
scoped_ptr<RemoteFileSyncService> remote_file_service);
@@ -132,31 +132,28 @@ class SyncFileSystemService
const std::string& description);
// extensions::ExtensionRegistryObserver implementations.
- virtual void OnExtensionInstalled(
- content::BrowserContext* browser_context,
- const extensions::Extension* extension,
- bool is_update) override;
- virtual void OnExtensionUnloaded(
+ void OnExtensionInstalled(content::BrowserContext* browser_context,
+ const extensions::Extension* extension,
+ bool is_update) override;
+ void OnExtensionUnloaded(
content::BrowserContext* browser_context,
const extensions::Extension* extension,
extensions::UnloadedExtensionInfo::Reason reason) override;
- virtual void OnExtensionUninstalled(
- content::BrowserContext* browser_context,
- const extensions::Extension* extension,
- extensions::UninstallReason reason) override;
- virtual void OnExtensionLoaded(
- content::BrowserContext* browser_context,
- const extensions::Extension* extension) override;
+ void OnExtensionUninstalled(content::BrowserContext* browser_context,
+ const extensions::Extension* extension,
+ extensions::UninstallReason reason) override;
+ void OnExtensionLoaded(content::BrowserContext* browser_context,
+ const extensions::Extension* extension) override;
// ProfileSyncServiceObserver implementation.
- virtual void OnStateChanged() override;
+ void OnStateChanged() override;
// SyncFileStatusObserver implementation.
- virtual void OnFileStatusChanged(const storage::FileSystemURL& url,
- SyncFileType file_type,
- SyncFileStatus sync_status,
- SyncAction action_taken,
- SyncDirection direction) override;
+ void OnFileStatusChanged(const storage::FileSystemURL& url,
+ SyncFileType file_type,
+ SyncFileStatus sync_status,
+ SyncAction action_taken,
+ SyncDirection direction) override;
// Check the profile's sync preference settings and call
// remote_file_service_->SetSyncEnabled() to update the status.
diff --git a/chrome/browser/sync_file_system/sync_file_system_service_factory.h b/chrome/browser/sync_file_system/sync_file_system_service_factory.h
index 2e533064..c157678 100644
--- a/chrome/browser/sync_file_system/sync_file_system_service_factory.h
+++ b/chrome/browser/sync_file_system/sync_file_system_service_factory.h
@@ -37,10 +37,10 @@ class SyncFileSystemServiceFactory : public BrowserContextKeyedServiceFactory {
private:
friend struct DefaultSingletonTraits<SyncFileSystemServiceFactory>;
SyncFileSystemServiceFactory();
- virtual ~SyncFileSystemServiceFactory();
+ ~SyncFileSystemServiceFactory() override;
// BrowserContextKeyedServiceFactory overrides.
- virtual KeyedService* BuildServiceInstanceFor(
+ KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
mutable scoped_ptr<LocalFileSyncService> mock_local_file_service_;
diff --git a/chrome/browser/sync_file_system/sync_process_runner.cc b/chrome/browser/sync_file_system/sync_process_runner.cc
index fa1f100..748d21a 100644
--- a/chrome/browser/sync_file_system/sync_process_runner.cc
+++ b/chrome/browser/sync_file_system/sync_process_runner.cc
@@ -26,21 +26,17 @@ class BaseTimerHelper : public SyncProcessRunner::TimerHelper {
public:
BaseTimerHelper() {}
- virtual bool IsRunning() override {
- return timer_.IsRunning();
- }
+ bool IsRunning() override { return timer_.IsRunning(); }
- virtual void Start(const tracked_objects::Location& from_here,
- const base::TimeDelta& delay,
- const base::Closure& closure) override {
+ void Start(const tracked_objects::Location& from_here,
+ const base::TimeDelta& delay,
+ const base::Closure& closure) override {
timer_.Start(from_here, delay, closure);
}
- virtual base::TimeTicks Now() const override {
- return base::TimeTicks::Now();
- }
+ base::TimeTicks Now() const override { return base::TimeTicks::Now(); }
- virtual ~BaseTimerHelper() {}
+ ~BaseTimerHelper() override {}
private:
base::OneShotTimer<SyncProcessRunner> timer_;
diff --git a/chrome/browser/sync_file_system/sync_process_runner_unittest.cc b/chrome/browser/sync_file_system/sync_process_runner_unittest.cc
index 98594ac..a1bd4b7 100644
--- a/chrome/browser/sync_file_system/sync_process_runner_unittest.cc
+++ b/chrome/browser/sync_file_system/sync_process_runner_unittest.cc
@@ -16,15 +16,11 @@ namespace {
class FakeClient : public SyncProcessRunner::Client {
public:
FakeClient() : service_state_(SYNC_SERVICE_RUNNING) {}
- virtual ~FakeClient() {}
+ ~FakeClient() override {}
- virtual SyncServiceState GetSyncServiceState() override {
- return service_state_;
- }
+ SyncServiceState GetSyncServiceState() override { return service_state_; }
- virtual SyncFileSystemService* GetSyncService() override {
- return nullptr;
- }
+ SyncFileSystemService* GetSyncService() override { return nullptr; }
void set_service_state(SyncServiceState service_state) {
service_state_ = service_state;
@@ -39,22 +35,18 @@ class FakeClient : public SyncProcessRunner::Client {
class FakeTimerHelper : public SyncProcessRunner::TimerHelper {
public:
FakeTimerHelper() {}
- virtual ~FakeTimerHelper() {}
+ ~FakeTimerHelper() override {}
- virtual bool IsRunning() override {
- return !timer_task_.is_null();
- }
+ bool IsRunning() override { return !timer_task_.is_null(); }
- virtual void Start(const tracked_objects::Location& from_here,
- const base::TimeDelta& delay,
- const base::Closure& closure) override {
+ void Start(const tracked_objects::Location& from_here,
+ const base::TimeDelta& delay,
+ const base::Closure& closure) override {
scheduled_time_ = current_time_ + delay;
timer_task_ = closure;
}
- virtual base::TimeTicks Now() const override {
- return current_time_;
- }
+ base::TimeTicks Now() const override { return current_time_; }
void SetCurrentTime(const base::TimeTicks& current_time) {
current_time_ = current_time;
@@ -94,13 +86,12 @@ class FakeSyncProcessRunner : public SyncProcessRunner {
max_parallel_task_(max_parallel_task) {
}
- virtual void StartSync(const SyncStatusCallback& callback) override {
+ void StartSync(const SyncStatusCallback& callback) override {
EXPECT_LT(running_tasks_.size(), max_parallel_task_);
running_tasks_.push(callback);
}
- virtual ~FakeSyncProcessRunner() {
- }
+ ~FakeSyncProcessRunner() override {}
void UpdateChanges(int num_changes) {
OnChangesUpdated(num_changes);