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

Side by Side Diff: chrome/browser/sync_file_system/local/syncable_file_system_operation.cc

Issue 629603002: replace OVERRIDE and FINAL with override and final in chrome/browser/[r-z]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 6 years, 2 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/sync_file_system/local/syncable_file_system_operation.h " 5 #include "chrome/browser/sync_file_system/local/syncable_file_system_operation.h "
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/sync_file_system/local/local_file_sync_context.h" 8 #include "chrome/browser/sync_file_system/local/local_file_sync_context.h"
9 #include "chrome/browser/sync_file_system/local/sync_file_system_backend.h" 9 #include "chrome/browser/sync_file_system/local/sync_file_system_backend.h"
10 #include "chrome/browser/sync_file_system/local/syncable_file_operation_runner.h " 10 #include "chrome/browser/sync_file_system/local/syncable_file_operation_runner.h "
(...skipping 26 matching lines...) Expand all
37 QueueableTask(base::WeakPtr<SyncableFileSystemOperation> operation, 37 QueueableTask(base::WeakPtr<SyncableFileSystemOperation> operation,
38 const base::Closure& task) 38 const base::Closure& task)
39 : operation_(operation), 39 : operation_(operation),
40 task_(task), 40 task_(task),
41 target_paths_(operation->target_paths_) {} 41 target_paths_(operation->target_paths_) {}
42 42
43 virtual ~QueueableTask() { 43 virtual ~QueueableTask() {
44 DCHECK(!operation_); 44 DCHECK(!operation_);
45 } 45 }
46 46
47 virtual void Run() OVERRIDE { 47 virtual void Run() override {
48 if (!operation_) 48 if (!operation_)
49 return; 49 return;
50 DCHECK(!task_.is_null()); 50 DCHECK(!task_.is_null());
51 task_.Run(); 51 task_.Run();
52 operation_.reset(); 52 operation_.reset();
53 } 53 }
54 54
55 virtual void Cancel() OVERRIDE { 55 virtual void Cancel() override {
56 DCHECK(!task_.is_null()); 56 DCHECK(!task_.is_null());
57 if (operation_) 57 if (operation_)
58 operation_->OnCancelled(); 58 operation_->OnCancelled();
59 task_.Reset(); 59 task_.Reset();
60 operation_.reset(); 60 operation_.reset();
61 } 61 }
62 62
63 virtual const std::vector<FileSystemURL>& target_paths() const OVERRIDE { 63 virtual const std::vector<FileSystemURL>& target_paths() const override {
64 return target_paths_; 64 return target_paths_;
65 } 65 }
66 66
67 private: 67 private:
68 base::WeakPtr<SyncableFileSystemOperation> operation_; 68 base::WeakPtr<SyncableFileSystemOperation> operation_;
69 base::Closure task_; 69 base::Closure task_;
70 std::vector<FileSystemURL> target_paths_; 70 std::vector<FileSystemURL> target_paths_;
71 DISALLOW_COPY_AND_ASSIGN(QueueableTask); 71 DISALLOW_COPY_AND_ASSIGN(QueueableTask);
72 }; 72 };
73 73
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 operation_runner_->OnOperationCompleted(target_paths_); 389 operation_runner_->OnOperationCompleted(target_paths_);
390 callback.Run(result, bytes, complete); 390 callback.Run(result, bytes, complete);
391 } 391 }
392 392
393 void SyncableFileSystemOperation::OnCancelled() { 393 void SyncableFileSystemOperation::OnCancelled() {
394 DCHECK(!completion_callback_.is_null()); 394 DCHECK(!completion_callback_.is_null());
395 completion_callback_.Run(base::File::FILE_ERROR_ABORT); 395 completion_callback_.Run(base::File::FILE_ERROR_ABORT);
396 } 396 }
397 397
398 } // namespace sync_file_system 398 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698