diff options
author | dcheng <dcheng@chromium.org> | 2014-10-21 04:01:19 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-21 11:01:39 +0000 |
commit | 1a54c8dfd0e8425ff93b471a1dedf8ea246c0b33 (patch) | |
tree | c56ea7e58422a58abef8fc78538d73c240d07010 /storage | |
parent | 5648818ef9d5ef5fda79cd5dde2e42567af07785 (diff) | |
download | chromium_src-1a54c8dfd0e8425ff93b471a1dedf8ea246c0b33.zip chromium_src-1a54c8dfd0e8425ff93b471a1dedf8ea246c0b33.tar.gz chromium_src-1a54c8dfd0e8425ff93b471a1dedf8ea246c0b33.tar.bz2 |
Standardize usage of virtual/override/final in storage/
This patch was automatically generated by applying clang fixit hints
generated by the plugin to the source tree.
BUG=417463
TBR=kinuko@chromium.org
Review URL: https://codereview.chromium.org/669603008
Cr-Commit-Position: refs/heads/master@{#300448}
Diffstat (limited to 'storage')
44 files changed, 526 insertions, 600 deletions
diff --git a/storage/browser/blob/blob_data_handle.h b/storage/browser/blob/blob_data_handle.h index 1120bdf..0b1d151 100644 --- a/storage/browser/blob/blob_data_handle.h +++ b/storage/browser/blob/blob_data_handle.h @@ -29,7 +29,7 @@ class STORAGE_EXPORT BlobDataHandle : public base::SupportsUserData::Data { public: BlobDataHandle(const BlobDataHandle& other); // May be copied on any thread. - virtual ~BlobDataHandle(); // Maybe be deleted on any thread. + ~BlobDataHandle() override; // Maybe be deleted on any thread. BlobData* data() const; // May only be accessed on the IO thread. std::string uuid() const; // May be accessed on any thread. diff --git a/storage/browser/blob/blob_url_request_job.h b/storage/browser/blob/blob_url_request_job.h index f8a4968..dab61dc 100644 --- a/storage/browser/blob/blob_url_request_job.h +++ b/storage/browser/blob/blob_url_request_job.h @@ -43,19 +43,16 @@ class STORAGE_EXPORT BlobURLRequestJob base::MessageLoopProxy* resolving_message_loop_proxy); // net::URLRequestJob methods. - virtual void Start() override; - virtual void Kill() override; - virtual bool ReadRawData(net::IOBuffer* buf, - int buf_size, - int* bytes_read) override; - virtual bool GetMimeType(std::string* mime_type) const override; - virtual void GetResponseInfo(net::HttpResponseInfo* info) override; - virtual int GetResponseCode() const override; - virtual void SetExtraRequestHeaders( - const net::HttpRequestHeaders& headers) override; + void Start() override; + void Kill() override; + bool ReadRawData(net::IOBuffer* buf, int buf_size, int* bytes_read) override; + bool GetMimeType(std::string* mime_type) const override; + void GetResponseInfo(net::HttpResponseInfo* info) override; + int GetResponseCode() const override; + void SetExtraRequestHeaders(const net::HttpRequestHeaders& headers) override; protected: - virtual ~BlobURLRequestJob(); + ~BlobURLRequestJob() override; private: typedef std::map<size_t, FileStreamReader*> IndexToReaderMap; diff --git a/storage/browser/blob/blob_url_request_job_factory.h b/storage/browser/blob/blob_url_request_job_factory.h index f10e34c..c3e34e3 100644 --- a/storage/browser/blob/blob_url_request_job_factory.h +++ b/storage/browser/blob/blob_url_request_job_factory.h @@ -49,9 +49,9 @@ class STORAGE_EXPORT BlobProtocolHandler BlobStorageContext* context, storage::FileSystemContext* file_system_context, const scoped_refptr<base::MessageLoopProxy>& file_loop_proxy); - virtual ~BlobProtocolHandler(); + ~BlobProtocolHandler() override; - virtual net::URLRequestJob* MaybeCreateJob( + net::URLRequestJob* MaybeCreateJob( net::URLRequest* request, net::NetworkDelegate* network_delegate) const override; diff --git a/storage/browser/blob/local_file_stream_reader.h b/storage/browser/blob/local_file_stream_reader.h index 2d401af..ba8a348 100644 --- a/storage/browser/blob/local_file_stream_reader.h +++ b/storage/browser/blob/local_file_stream_reader.h @@ -33,13 +33,13 @@ namespace storage { class STORAGE_EXPORT LocalFileStreamReader : public NON_EXPORTED_BASE(FileStreamReader) { public: - virtual ~LocalFileStreamReader(); + ~LocalFileStreamReader() override; // FileStreamReader overrides. - virtual int Read(net::IOBuffer* buf, int buf_len, - const net::CompletionCallback& callback) override; - virtual int64 GetLength( - const net::Int64CompletionCallback& callback) override; + int Read(net::IOBuffer* buf, + int buf_len, + const net::CompletionCallback& callback) override; + int64 GetLength(const net::Int64CompletionCallback& callback) override; private: friend class FileStreamReader; diff --git a/storage/browser/blob/view_blob_internals_job.h b/storage/browser/blob/view_blob_internals_job.h index 9fc3850..4ab1e30 100644 --- a/storage/browser/blob/view_blob_internals_job.h +++ b/storage/browser/blob/view_blob_internals_job.h @@ -29,17 +29,16 @@ class STORAGE_EXPORT ViewBlobInternalsJob net::NetworkDelegate* network_delegate, BlobStorageContext* blob_storage_context); - virtual void Start() override; - virtual int GetData(std::string* mime_type, - std::string* charset, - std::string* data, - const net::CompletionCallback& callback) const override; - virtual bool IsRedirectResponse(GURL* location, - int* http_status_code) override; - virtual void Kill() override; + void Start() override; + int GetData(std::string* mime_type, + std::string* charset, + std::string* data, + const net::CompletionCallback& callback) const override; + bool IsRedirectResponse(GURL* location, int* http_status_code) override; + void Kill() override; private: - virtual ~ViewBlobInternalsJob(); + ~ViewBlobInternalsJob() override; void GenerateHTML(std::string* out) const; static void GenerateHTMLForBlobData(const BlobData& blob_data, diff --git a/storage/browser/database/database_quota_client.h b/storage/browser/database/database_quota_client.h index c561f32..4b168c6 100644 --- a/storage/browser/database/database_quota_client.h +++ b/storage/browser/database/database_quota_client.h @@ -27,23 +27,23 @@ class STORAGE_EXPORT_PRIVATE DatabaseQuotaClient DatabaseQuotaClient( base::MessageLoopProxy* tracker_thread, DatabaseTracker* tracker); - virtual ~DatabaseQuotaClient(); + ~DatabaseQuotaClient() override; // QuotaClient method overrides - virtual ID id() const override; - virtual void OnQuotaManagerDestroyed() override; - virtual void GetOriginUsage(const GURL& origin_url, - storage::StorageType type, - const GetUsageCallback& callback) override; - virtual void GetOriginsForType(storage::StorageType type, - const GetOriginsCallback& callback) override; - virtual void GetOriginsForHost(storage::StorageType type, - const std::string& host, - const GetOriginsCallback& callback) override; - virtual void DeleteOriginData(const GURL& origin, - storage::StorageType type, - const DeletionCallback& callback) override; - virtual bool DoesSupport(storage::StorageType type) const override; + ID id() const override; + void OnQuotaManagerDestroyed() override; + void GetOriginUsage(const GURL& origin_url, + storage::StorageType type, + const GetUsageCallback& callback) override; + void GetOriginsForType(storage::StorageType type, + const GetOriginsCallback& callback) override; + void GetOriginsForHost(storage::StorageType type, + const std::string& host, + const GetOriginsCallback& callback) override; + void DeleteOriginData(const GURL& origin, + storage::StorageType type, + const DeletionCallback& callback) override; + bool DoesSupport(storage::StorageType type) const override; private: scoped_refptr<base::MessageLoopProxy> db_tracker_thread_; diff --git a/storage/browser/fileapi/async_file_util_adapter.h b/storage/browser/fileapi/async_file_util_adapter.h index 7dc4982..9c661a6 100644 --- a/storage/browser/fileapi/async_file_util_adapter.h +++ b/storage/browser/fileapi/async_file_util_adapter.h @@ -31,81 +31,67 @@ class STORAGE_EXPORT AsyncFileUtilAdapter // created only for this adapter.) explicit AsyncFileUtilAdapter(FileSystemFileUtil* sync_file_util); - virtual ~AsyncFileUtilAdapter(); + ~AsyncFileUtilAdapter() override; FileSystemFileUtil* sync_file_util() { return sync_file_util_.get(); } // AsyncFileUtil overrides. - virtual void CreateOrOpen( - scoped_ptr<FileSystemOperationContext> context, - const FileSystemURL& url, - int file_flags, - const CreateOrOpenCallback& callback) override; - virtual void EnsureFileExists( - scoped_ptr<FileSystemOperationContext> context, - const FileSystemURL& url, - const EnsureFileExistsCallback& callback) override; - virtual void CreateDirectory( - scoped_ptr<FileSystemOperationContext> context, - const FileSystemURL& url, - bool exclusive, - bool recursive, - const StatusCallback& callback) override; - virtual void GetFileInfo( - scoped_ptr<FileSystemOperationContext> context, - const FileSystemURL& url, - const GetFileInfoCallback& callback) override; - virtual void ReadDirectory( - scoped_ptr<FileSystemOperationContext> context, - const FileSystemURL& url, - const ReadDirectoryCallback& callback) override; - virtual void Touch( - scoped_ptr<FileSystemOperationContext> context, - const FileSystemURL& url, - const base::Time& last_access_time, - const base::Time& last_modified_time, - const StatusCallback& callback) override; - virtual void Truncate( - scoped_ptr<FileSystemOperationContext> context, - const FileSystemURL& url, - int64 length, - const StatusCallback& callback) override; - virtual void CopyFileLocal( - scoped_ptr<FileSystemOperationContext> context, - const FileSystemURL& src_url, - const FileSystemURL& dest_url, - CopyOrMoveOption option, - const CopyFileProgressCallback& progress_callback, - const StatusCallback& callback) override; - virtual void MoveFileLocal( - scoped_ptr<FileSystemOperationContext> context, - const FileSystemURL& src_url, - const FileSystemURL& dest_url, - CopyOrMoveOption option, - const StatusCallback& callback) override; - virtual void CopyInForeignFile( - scoped_ptr<FileSystemOperationContext> context, - const base::FilePath& src_file_path, - const FileSystemURL& dest_url, - const StatusCallback& callback) override; - virtual void DeleteFile( - scoped_ptr<FileSystemOperationContext> context, - const FileSystemURL& url, - const StatusCallback& callback) override; - virtual void DeleteDirectory( - scoped_ptr<FileSystemOperationContext> context, - const FileSystemURL& url, - const StatusCallback& callback) override; - virtual void DeleteRecursively( - scoped_ptr<FileSystemOperationContext> context, - const FileSystemURL& url, - const StatusCallback& callback) override; - virtual void CreateSnapshotFile( - scoped_ptr<FileSystemOperationContext> context, - const FileSystemURL& url, - const CreateSnapshotFileCallback& callback) override; + void CreateOrOpen(scoped_ptr<FileSystemOperationContext> context, + const FileSystemURL& url, + int file_flags, + const CreateOrOpenCallback& callback) override; + void EnsureFileExists(scoped_ptr<FileSystemOperationContext> context, + const FileSystemURL& url, + const EnsureFileExistsCallback& callback) override; + void CreateDirectory(scoped_ptr<FileSystemOperationContext> context, + const FileSystemURL& url, + bool exclusive, + bool recursive, + const StatusCallback& callback) override; + void GetFileInfo(scoped_ptr<FileSystemOperationContext> context, + const FileSystemURL& url, + const GetFileInfoCallback& callback) override; + void ReadDirectory(scoped_ptr<FileSystemOperationContext> context, + const FileSystemURL& url, + const ReadDirectoryCallback& callback) override; + void Touch(scoped_ptr<FileSystemOperationContext> context, + const FileSystemURL& url, + const base::Time& last_access_time, + const base::Time& last_modified_time, + const StatusCallback& callback) override; + void Truncate(scoped_ptr<FileSystemOperationContext> context, + const FileSystemURL& url, + int64 length, + const StatusCallback& callback) override; + void CopyFileLocal(scoped_ptr<FileSystemOperationContext> context, + const FileSystemURL& src_url, + const FileSystemURL& dest_url, + CopyOrMoveOption option, + const CopyFileProgressCallback& progress_callback, + const StatusCallback& callback) override; + void MoveFileLocal(scoped_ptr<FileSystemOperationContext> context, + const FileSystemURL& src_url, + const FileSystemURL& dest_url, + CopyOrMoveOption option, + const StatusCallback& callback) override; + void CopyInForeignFile(scoped_ptr<FileSystemOperationContext> context, + const base::FilePath& src_file_path, + const FileSystemURL& dest_url, + const StatusCallback& callback) override; + void DeleteFile(scoped_ptr<FileSystemOperationContext> context, + const FileSystemURL& url, + const StatusCallback& callback) override; + void DeleteDirectory(scoped_ptr<FileSystemOperationContext> context, + const FileSystemURL& url, + const StatusCallback& callback) override; + void DeleteRecursively(scoped_ptr<FileSystemOperationContext> context, + const FileSystemURL& url, + const StatusCallback& callback) override; + void CreateSnapshotFile(scoped_ptr<FileSystemOperationContext> context, + const FileSystemURL& url, + const CreateSnapshotFileCallback& callback) override; private: scoped_ptr<FileSystemFileUtil> sync_file_util_; diff --git a/storage/browser/fileapi/copy_or_move_operation_delegate.cc b/storage/browser/fileapi/copy_or_move_operation_delegate.cc index a1e212b..5b1d7d2 100644 --- a/storage/browser/fileapi/copy_or_move_operation_delegate.cc +++ b/storage/browser/fileapi/copy_or_move_operation_delegate.cc @@ -60,7 +60,7 @@ class CopyOrMoveOnSameFileSystemImpl file_progress_callback_(file_progress_callback) { } - virtual void Run( + void Run( const CopyOrMoveOperationDelegate::StatusCallback& callback) override { if (operation_type_ == CopyOrMoveOperationDelegate::OPERATION_MOVE) { operation_runner_->MoveFileLocal(src_url_, dest_url_, option_, callback); @@ -70,7 +70,7 @@ class CopyOrMoveOnSameFileSystemImpl } } - virtual void Cancel() override { + void Cancel() override { // We can do nothing for the copy/move operation on a local file system. // Assuming the operation is quickly done, it should be ok to just wait // for the completion. @@ -113,7 +113,7 @@ class SnapshotCopyOrMoveImpl weak_factory_(this) { } - virtual void Run( + void Run( const CopyOrMoveOperationDelegate::StatusCallback& callback) override { file_progress_callback_.Run(0); operation_runner_->CreateSnapshotFile( @@ -122,9 +122,7 @@ class SnapshotCopyOrMoveImpl weak_factory_.GetWeakPtr(), callback)); } - virtual void Cancel() override { - cancel_requested_ = true; - } + void Cancel() override { cancel_requested_ = true; } private: void RunAfterCreateSnapshot( @@ -388,7 +386,7 @@ class StreamCopyOrMoveImpl cancel_requested_(false), weak_factory_(this) {} - virtual void Run( + void Run( const CopyOrMoveOperationDelegate::StatusCallback& callback) override { // Reader can be created even if the entry does not exist or the entry is // a directory. To check errors before destination file creation, @@ -399,7 +397,7 @@ class StreamCopyOrMoveImpl weak_factory_.GetWeakPtr(), callback)); } - virtual void Cancel() override { + void Cancel() override { cancel_requested_ = true; if (copy_helper_) copy_helper_->Cancel(); diff --git a/storage/browser/fileapi/copy_or_move_operation_delegate.h b/storage/browser/fileapi/copy_or_move_operation_delegate.h index 8173117..7860e1e 100644 --- a/storage/browser/fileapi/copy_or_move_operation_delegate.h +++ b/storage/browser/fileapi/copy_or_move_operation_delegate.h @@ -98,21 +98,20 @@ class CopyOrMoveOperationDelegate CopyOrMoveOption option, const CopyProgressCallback& progress_callback, const StatusCallback& callback); - virtual ~CopyOrMoveOperationDelegate(); + ~CopyOrMoveOperationDelegate() override; // RecursiveOperationDelegate overrides: - virtual void Run() override; - virtual void RunRecursively() override; - virtual void ProcessFile(const FileSystemURL& url, - const StatusCallback& callback) override; - virtual void ProcessDirectory(const FileSystemURL& url, - const StatusCallback& callback) override; - virtual void PostProcessDirectory(const FileSystemURL& url, - const StatusCallback& callback) override; - + void Run() override; + void RunRecursively() override; + void ProcessFile(const FileSystemURL& url, + const StatusCallback& callback) override; + void ProcessDirectory(const FileSystemURL& url, + const StatusCallback& callback) override; + void PostProcessDirectory(const FileSystemURL& url, + const StatusCallback& callback) override; protected: - virtual void OnCancel() override; + void OnCancel() override; private: void DidCopyOrMoveFile(const FileSystemURL& src_url, diff --git a/storage/browser/fileapi/dragged_file_util.cc b/storage/browser/fileapi/dragged_file_util.cc index 7c96d64..9a5b66e 100644 --- a/storage/browser/fileapi/dragged_file_util.cc +++ b/storage/browser/fileapi/dragged_file_util.cc @@ -29,21 +29,19 @@ class SetFileEnumerator : public FileSystemFileUtil::AbstractFileEnumerator { : files_(files) { file_iter_ = files_.begin(); } - virtual ~SetFileEnumerator() {} + ~SetFileEnumerator() override {} // AbstractFileEnumerator overrides. - virtual base::FilePath Next() override { + base::FilePath Next() override { if (file_iter_ == files_.end()) return base::FilePath(); base::FilePath platform_file = (file_iter_++)->path; NativeFileUtil::GetFileInfo(platform_file, &file_info_); return platform_file; } - virtual int64 Size() override { return file_info_.size; } - virtual bool IsDirectory() override { return file_info_.is_directory; } - virtual base::Time LastModifiedTime() override { - return file_info_.last_modified; - } + int64 Size() override { return file_info_.size; } + bool IsDirectory() override { return file_info_.is_directory; } + base::Time LastModifiedTime() override { return file_info_.last_modified; } private: std::vector<FileInfo> files_; diff --git a/storage/browser/fileapi/dragged_file_util.h b/storage/browser/fileapi/dragged_file_util.h index a29eafa..efa14c4 100644 --- a/storage/browser/fileapi/dragged_file_util.h +++ b/storage/browser/fileapi/dragged_file_util.h @@ -20,15 +20,14 @@ class STORAGE_EXPORT_PRIVATE DraggedFileUtil : public LocalFileUtil { public: DraggedFileUtil(); - virtual ~DraggedFileUtil() {} + ~DraggedFileUtil() override {} // FileSystemFileUtil overrides. - virtual base::File::Error GetFileInfo( - FileSystemOperationContext* context, - const FileSystemURL& url, - base::File::Info* file_info, - base::FilePath* platform_path) override; - virtual scoped_ptr<AbstractFileEnumerator> CreateFileEnumerator( + base::File::Error GetFileInfo(FileSystemOperationContext* context, + const FileSystemURL& url, + base::File::Info* file_info, + base::FilePath* platform_path) override; + scoped_ptr<AbstractFileEnumerator> CreateFileEnumerator( FileSystemOperationContext* context, const FileSystemURL& root_url) override; diff --git a/storage/browser/fileapi/external_mount_points.h b/storage/browser/fileapi/external_mount_points.h index d80c511..37d4149 100644 --- a/storage/browser/fileapi/external_mount_points.h +++ b/storage/browser/fileapi/external_mount_points.h @@ -65,19 +65,18 @@ class STORAGE_EXPORT ExternalMountPoints const base::FilePath& path); // MountPoints overrides. - virtual bool HandlesFileSystemMountType(FileSystemType type) const override; - virtual bool RevokeFileSystem(const std::string& mount_name) override; - virtual bool GetRegisteredPath(const std::string& mount_name, - base::FilePath* path) const override; - virtual bool CrackVirtualPath( - const base::FilePath& virtual_path, - std::string* mount_name, - FileSystemType* type, - std::string* cracked_id, - base::FilePath* path, - FileSystemMountOption* mount_option) const override; - virtual FileSystemURL CrackURL(const GURL& url) const override; - virtual FileSystemURL CreateCrackedFileSystemURL( + bool HandlesFileSystemMountType(FileSystemType type) const override; + bool RevokeFileSystem(const std::string& mount_name) override; + bool GetRegisteredPath(const std::string& mount_name, + base::FilePath* path) const override; + bool CrackVirtualPath(const base::FilePath& virtual_path, + std::string* mount_name, + FileSystemType* type, + std::string* cracked_id, + base::FilePath* path, + FileSystemMountOption* mount_option) const override; + FileSystemURL CrackURL(const GURL& url) const override; + FileSystemURL CreateCrackedFileSystemURL( const GURL& origin, FileSystemType type, const base::FilePath& path) const override; @@ -126,11 +125,10 @@ class STORAGE_EXPORT ExternalMountPoints // Use |GetSystemInstance| of |CreateRefCounted| to get an instance. ExternalMountPoints(); - virtual ~ExternalMountPoints(); + ~ExternalMountPoints() override; // MountPoint overrides. - virtual FileSystemURL CrackFileSystemURL( - const FileSystemURL& url) const override; + FileSystemURL CrackFileSystemURL(const FileSystemURL& url) const override; // Performs sanity checks on the new mount point. // Checks the following: diff --git a/storage/browser/fileapi/file_system_dir_url_request_job.h b/storage/browser/fileapi/file_system_dir_url_request_job.h index 3423182..f2567e4 100644 --- a/storage/browser/fileapi/file_system_dir_url_request_job.h +++ b/storage/browser/fileapi/file_system_dir_url_request_job.h @@ -32,22 +32,20 @@ class STORAGE_EXPORT_PRIVATE FileSystemDirURLRequestJob FileSystemContext* file_system_context); // URLRequestJob methods: - virtual void Start() override; - virtual void Kill() override; - virtual bool ReadRawData(net::IOBuffer* buf, - int buf_size, - int* bytes_read) override; - virtual bool GetCharset(std::string* charset) override; + void Start() override; + void Kill() override; + bool ReadRawData(net::IOBuffer* buf, int buf_size, int* bytes_read) override; + bool GetCharset(std::string* charset) override; // FilterContext methods (via URLRequestJob): - virtual bool GetMimeType(std::string* mime_type) const override; + bool GetMimeType(std::string* mime_type) const override; // TODO(adamk): Implement GetResponseInfo and GetResponseCode to simulate // an HTTP response. private: class CallbackDispatcher; - virtual ~FileSystemDirURLRequestJob(); + ~FileSystemDirURLRequestJob() override; void StartAsync(); void DidAttemptAutoMount(base::File::Error result); diff --git a/storage/browser/fileapi/file_system_file_stream_reader.h b/storage/browser/fileapi/file_system_file_stream_reader.h index 6b9273a..b0a718a 100644 --- a/storage/browser/fileapi/file_system_file_stream_reader.h +++ b/storage/browser/fileapi/file_system_file_stream_reader.h @@ -35,13 +35,13 @@ class FileSystemContext; class STORAGE_EXPORT_PRIVATE FileSystemFileStreamReader : public NON_EXPORTED_BASE(storage::FileStreamReader) { public: - virtual ~FileSystemFileStreamReader(); + ~FileSystemFileStreamReader() override; // FileStreamReader overrides. - virtual int Read(net::IOBuffer* buf, int buf_len, - const net::CompletionCallback& callback) override; - virtual int64 GetLength( - const net::Int64CompletionCallback& callback) override; + int Read(net::IOBuffer* buf, + int buf_len, + const net::CompletionCallback& callback) override; + int64 GetLength(const net::Int64CompletionCallback& callback) override; private: friend class storage::FileStreamReader; diff --git a/storage/browser/fileapi/file_system_file_util.h b/storage/browser/fileapi/file_system_file_util.h index 77fea58..c649c31 100644 --- a/storage/browser/fileapi/file_system_file_util.h +++ b/storage/browser/fileapi/file_system_file_util.h @@ -49,10 +49,10 @@ class STORAGE_EXPORT FileSystemFileUtil { class STORAGE_EXPORT EmptyFileEnumerator : public AbstractFileEnumerator { - virtual base::FilePath Next() override; - virtual int64 Size() override; - virtual base::Time LastModifiedTime() override; - virtual bool IsDirectory() override; + base::FilePath Next() override; + int64 Size() override; + base::Time LastModifiedTime() override; + bool IsDirectory() override; }; virtual ~FileSystemFileUtil() {} diff --git a/storage/browser/fileapi/file_system_operation_context.h b/storage/browser/fileapi/file_system_operation_context.h index ceecec1..96563ad 100644 --- a/storage/browser/fileapi/file_system_operation_context.h +++ b/storage/browser/fileapi/file_system_operation_context.h @@ -36,7 +36,7 @@ class STORAGE_EXPORT_PRIVATE FileSystemOperationContext FileSystemOperationContext(FileSystemContext* context, base::SequencedTaskRunner* task_runner); - virtual ~FileSystemOperationContext(); + ~FileSystemOperationContext() override; FileSystemContext* file_system_context() const { return file_system_context_.get(); diff --git a/storage/browser/fileapi/file_system_operation_impl.h b/storage/browser/fileapi/file_system_operation_impl.h index ca855d17..05dd76d 100644 --- a/storage/browser/fileapi/file_system_operation_impl.h +++ b/storage/browser/fileapi/file_system_operation_impl.h @@ -28,71 +28,71 @@ class RecursiveOperationDelegate; class STORAGE_EXPORT FileSystemOperationImpl : public NON_EXPORTED_BASE(FileSystemOperation) { public: - virtual ~FileSystemOperationImpl(); + ~FileSystemOperationImpl() override; // FileSystemOperation overrides. - virtual void CreateFile(const FileSystemURL& url, - bool exclusive, - const StatusCallback& callback) override; - virtual void CreateDirectory(const FileSystemURL& url, - bool exclusive, - bool recursive, - const StatusCallback& callback) override; - virtual void Copy(const FileSystemURL& src_url, - const FileSystemURL& dest_url, - CopyOrMoveOption option, - const CopyProgressCallback& progress_callback, - const StatusCallback& callback) override; - virtual void Move(const FileSystemURL& src_url, - const FileSystemURL& dest_url, - CopyOrMoveOption option, - const StatusCallback& callback) override; - virtual void DirectoryExists(const FileSystemURL& url, - const StatusCallback& callback) override; - virtual void FileExists(const FileSystemURL& url, - const StatusCallback& callback) override; - virtual void GetMetadata(const FileSystemURL& url, - const GetMetadataCallback& callback) override; - virtual void ReadDirectory(const FileSystemURL& url, - const ReadDirectoryCallback& callback) override; - virtual void Remove(const FileSystemURL& url, bool recursive, - const StatusCallback& callback) override; - virtual void Write(const FileSystemURL& url, - scoped_ptr<FileWriterDelegate> writer_delegate, - scoped_ptr<net::URLRequest> blob_request, - const WriteCallback& callback) override; - virtual void Truncate(const FileSystemURL& url, int64 length, - const StatusCallback& callback) override; - virtual void TouchFile(const FileSystemURL& url, - const base::Time& last_access_time, - const base::Time& last_modified_time, + void CreateFile(const FileSystemURL& url, + bool exclusive, + const StatusCallback& callback) override; + void CreateDirectory(const FileSystemURL& url, + bool exclusive, + bool recursive, + const StatusCallback& callback) override; + void Copy(const FileSystemURL& src_url, + const FileSystemURL& dest_url, + CopyOrMoveOption option, + const CopyProgressCallback& progress_callback, + const StatusCallback& callback) override; + void Move(const FileSystemURL& src_url, + const FileSystemURL& dest_url, + CopyOrMoveOption option, + const StatusCallback& callback) override; + void DirectoryExists(const FileSystemURL& url, + const StatusCallback& callback) override; + void FileExists(const FileSystemURL& url, + const StatusCallback& callback) override; + void GetMetadata(const FileSystemURL& url, + const GetMetadataCallback& callback) override; + void ReadDirectory(const FileSystemURL& url, + const ReadDirectoryCallback& callback) override; + void Remove(const FileSystemURL& url, + bool recursive, + const StatusCallback& callback) override; + void Write(const FileSystemURL& url, + scoped_ptr<FileWriterDelegate> writer_delegate, + scoped_ptr<net::URLRequest> blob_request, + const WriteCallback& callback) override; + void Truncate(const FileSystemURL& url, + int64 length, + const StatusCallback& callback) override; + void TouchFile(const FileSystemURL& url, + const base::Time& last_access_time, + const base::Time& last_modified_time, + const StatusCallback& callback) override; + void OpenFile(const FileSystemURL& url, + int file_flags, + const OpenFileCallback& callback) override; + void Cancel(const StatusCallback& cancel_callback) override; + void CreateSnapshotFile(const FileSystemURL& path, + const SnapshotFileCallback& callback) override; + void CopyInForeignFile(const base::FilePath& src_local_disk_path, + const FileSystemURL& dest_url, const StatusCallback& callback) override; - virtual void OpenFile(const FileSystemURL& url, - int file_flags, - const OpenFileCallback& callback) override; - virtual void Cancel(const StatusCallback& cancel_callback) override; - virtual void CreateSnapshotFile( - const FileSystemURL& path, - const SnapshotFileCallback& callback) override; - virtual void CopyInForeignFile(const base::FilePath& src_local_disk_path, - const FileSystemURL& dest_url, - const StatusCallback& callback) override; - virtual void RemoveFile(const FileSystemURL& url, - const StatusCallback& callback) override; - virtual void RemoveDirectory(const FileSystemURL& url, - const StatusCallback& callback) override; - virtual void CopyFileLocal(const FileSystemURL& src_url, - const FileSystemURL& dest_url, - CopyOrMoveOption option, - const CopyFileProgressCallback& progress_callback, - const StatusCallback& callback) override; - virtual void MoveFileLocal(const FileSystemURL& src_url, - const FileSystemURL& dest_url, - CopyOrMoveOption option, - const StatusCallback& callback) override; - virtual base::File::Error SyncGetPlatformPath( - const FileSystemURL& url, - base::FilePath* platform_path) override; + void RemoveFile(const FileSystemURL& url, + const StatusCallback& callback) override; + void RemoveDirectory(const FileSystemURL& url, + const StatusCallback& callback) override; + void CopyFileLocal(const FileSystemURL& src_url, + const FileSystemURL& dest_url, + CopyOrMoveOption option, + const CopyFileProgressCallback& progress_callback, + const StatusCallback& callback) override; + void MoveFileLocal(const FileSystemURL& src_url, + const FileSystemURL& dest_url, + CopyOrMoveOption option, + const StatusCallback& callback) override; + base::File::Error SyncGetPlatformPath(const FileSystemURL& url, + base::FilePath* platform_path) override; FileSystemContext* file_system_context() const { return file_system_context_.get(); diff --git a/storage/browser/fileapi/file_system_quota_client.h b/storage/browser/fileapi/file_system_quota_client.h index f8dab3d..869e63e 100644 --- a/storage/browser/fileapi/file_system_quota_client.h +++ b/storage/browser/fileapi/file_system_quota_client.h @@ -37,23 +37,23 @@ class STORAGE_EXPORT_PRIVATE FileSystemQuotaClient FileSystemQuotaClient( FileSystemContext* file_system_context, bool is_incognito); - virtual ~FileSystemQuotaClient(); + ~FileSystemQuotaClient() override; // QuotaClient methods. - virtual storage::QuotaClient::ID id() const override; - virtual void OnQuotaManagerDestroyed() override; - virtual void GetOriginUsage(const GURL& origin_url, - storage::StorageType type, - const GetUsageCallback& callback) override; - virtual void GetOriginsForType(storage::StorageType type, - const GetOriginsCallback& callback) override; - virtual void GetOriginsForHost(storage::StorageType type, - const std::string& host, - const GetOriginsCallback& callback) override; - virtual void DeleteOriginData(const GURL& origin, - storage::StorageType type, - const DeletionCallback& callback) override; - virtual bool DoesSupport(storage::StorageType type) const override; + storage::QuotaClient::ID id() const override; + void OnQuotaManagerDestroyed() override; + void GetOriginUsage(const GURL& origin_url, + storage::StorageType type, + const GetUsageCallback& callback) override; + void GetOriginsForType(storage::StorageType type, + const GetOriginsCallback& callback) override; + void GetOriginsForHost(storage::StorageType type, + const std::string& host, + const GetOriginsCallback& callback) override; + void DeleteOriginData(const GURL& origin, + storage::StorageType type, + const DeletionCallback& callback) override; + bool DoesSupport(storage::StorageType type) const override; private: base::SequencedTaskRunner* file_task_runner() const; diff --git a/storage/browser/fileapi/file_system_url_request_job.h b/storage/browser/fileapi/file_system_url_request_job.h index 1729618..0021210 100644 --- a/storage/browser/fileapi/file_system_url_request_job.h +++ b/storage/browser/fileapi/file_system_url_request_job.h @@ -40,25 +40,21 @@ class STORAGE_EXPORT_PRIVATE FileSystemURLRequestJob FileSystemContext* file_system_context); // URLRequestJob methods: - virtual void Start() override; - virtual void Kill() override; - virtual bool ReadRawData(net::IOBuffer* buf, - int buf_size, - int* bytes_read) override; - virtual bool IsRedirectResponse(GURL* location, - int* http_status_code) override; - virtual void SetExtraRequestHeaders( - const net::HttpRequestHeaders& headers) override; - virtual void GetResponseInfo(net::HttpResponseInfo* info) override; - virtual int GetResponseCode() const override; + void Start() override; + void Kill() override; + bool ReadRawData(net::IOBuffer* buf, int buf_size, int* bytes_read) override; + bool IsRedirectResponse(GURL* location, int* http_status_code) override; + void SetExtraRequestHeaders(const net::HttpRequestHeaders& headers) override; + void GetResponseInfo(net::HttpResponseInfo* info) override; + int GetResponseCode() const override; // FilterContext methods (via URLRequestJob): - virtual bool GetMimeType(std::string* mime_type) const override; + bool GetMimeType(std::string* mime_type) const override; private: class CallbackDispatcher; - virtual ~FileSystemURLRequestJob(); + ~FileSystemURLRequestJob() override; void StartAsync(); void DidAttemptAutoMount(base::File::Error result); diff --git a/storage/browser/fileapi/file_system_url_request_job_factory.cc b/storage/browser/fileapi/file_system_url_request_job_factory.cc index caf3273..c27013c 100644 --- a/storage/browser/fileapi/file_system_url_request_job_factory.cc +++ b/storage/browser/fileapi/file_system_url_request_job_factory.cc @@ -21,9 +21,9 @@ class FileSystemProtocolHandler public: FileSystemProtocolHandler(const std::string& storage_domain, FileSystemContext* context); - virtual ~FileSystemProtocolHandler(); + ~FileSystemProtocolHandler() override; - virtual net::URLRequestJob* MaybeCreateJob( + net::URLRequestJob* MaybeCreateJob( net::URLRequest* request, net::NetworkDelegate* network_delegate) const override; diff --git a/storage/browser/fileapi/file_writer_delegate.h b/storage/browser/fileapi/file_writer_delegate.h index 7636063..a58d5d2 100644 --- a/storage/browser/fileapi/file_writer_delegate.h +++ b/storage/browser/fileapi/file_writer_delegate.h @@ -41,7 +41,7 @@ class STORAGE_EXPORT_PRIVATE FileWriterDelegate FileWriterDelegate(scoped_ptr<FileStreamWriter> file_writer, FlushPolicy flush_policy); - virtual ~FileWriterDelegate(); + ~FileWriterDelegate() override; void Start(scoped_ptr<net::URLRequest> request, const DelegateWriteCallback& write_callback); @@ -51,20 +51,19 @@ class STORAGE_EXPORT_PRIVATE FileWriterDelegate // deleting this). void Cancel(); - virtual void OnReceivedRedirect(net::URLRequest* request, - const net::RedirectInfo& redirect_info, - bool* defer_redirect) override; - virtual void OnAuthRequired(net::URLRequest* request, - net::AuthChallengeInfo* auth_info) override; - virtual void OnCertificateRequested( + void OnReceivedRedirect(net::URLRequest* request, + const net::RedirectInfo& redirect_info, + bool* defer_redirect) override; + void OnAuthRequired(net::URLRequest* request, + net::AuthChallengeInfo* auth_info) override; + void OnCertificateRequested( net::URLRequest* request, net::SSLCertRequestInfo* cert_request_info) override; - virtual void OnSSLCertificateError(net::URLRequest* request, - const net::SSLInfo& ssl_info, - bool fatal) override; - virtual void OnResponseStarted(net::URLRequest* request) override; - virtual void OnReadCompleted(net::URLRequest* request, - int bytes_read) override; + void OnSSLCertificateError(net::URLRequest* request, + const net::SSLInfo& ssl_info, + bool fatal) override; + void OnResponseStarted(net::URLRequest* request) override; + void OnReadCompleted(net::URLRequest* request, int bytes_read) override; private: void OnGetFileInfoAndStartRequest( diff --git a/storage/browser/fileapi/isolated_context.h b/storage/browser/fileapi/isolated_context.h index 2501a99..ff1f58e 100644 --- a/storage/browser/fileapi/isolated_context.h +++ b/storage/browser/fileapi/isolated_context.h @@ -141,19 +141,18 @@ class STORAGE_EXPORT IsolatedContext : public MountPoints { std::vector<MountPointInfo>* files) const; // MountPoints overrides. - virtual bool HandlesFileSystemMountType(FileSystemType type) const override; - virtual bool RevokeFileSystem(const std::string& filesystem_id) override; - virtual bool GetRegisteredPath(const std::string& filesystem_id, - base::FilePath* path) const override; - virtual bool CrackVirtualPath( - const base::FilePath& virtual_path, - std::string* filesystem_id, - FileSystemType* type, - std::string* cracked_id, - base::FilePath* path, - FileSystemMountOption* mount_option) const override; - virtual FileSystemURL CrackURL(const GURL& url) const override; - virtual FileSystemURL CreateCrackedFileSystemURL( + bool HandlesFileSystemMountType(FileSystemType type) const override; + bool RevokeFileSystem(const std::string& filesystem_id) override; + bool GetRegisteredPath(const std::string& filesystem_id, + base::FilePath* path) const override; + bool CrackVirtualPath(const base::FilePath& virtual_path, + std::string* filesystem_id, + FileSystemType* type, + std::string* cracked_id, + base::FilePath* path, + FileSystemMountOption* mount_option) const override; + FileSystemURL CrackURL(const GURL& url) const override; + FileSystemURL CreateCrackedFileSystemURL( const GURL& origin, FileSystemType type, const base::FilePath& path) const override; @@ -174,11 +173,10 @@ class STORAGE_EXPORT IsolatedContext : public MountPoints { // Obtain an instance of this class via GetInstance(). IsolatedContext(); - virtual ~IsolatedContext(); + ~IsolatedContext() override; // MountPoints overrides. - virtual FileSystemURL CrackFileSystemURL( - const FileSystemURL& url) const override; + FileSystemURL CrackFileSystemURL(const FileSystemURL& url) const override; // Unregisters a file system of given |filesystem_id|. Must be called with // lock_ held. Returns true if the file system is unregistered. diff --git a/storage/browser/fileapi/isolated_file_system_backend.h b/storage/browser/fileapi/isolated_file_system_backend.h index 44e8a24..2c12379 100644 --- a/storage/browser/fileapi/isolated_file_system_backend.h +++ b/storage/browser/fileapi/isolated_file_system_backend.h @@ -16,42 +16,42 @@ class AsyncFileUtilAdapter; class IsolatedFileSystemBackend : public FileSystemBackend { public: IsolatedFileSystemBackend(); - virtual ~IsolatedFileSystemBackend(); + ~IsolatedFileSystemBackend() override; // FileSystemBackend implementation. - virtual bool CanHandleType(FileSystemType type) const override; - virtual void Initialize(FileSystemContext* context) override; - virtual void ResolveURL(const FileSystemURL& url, - OpenFileSystemMode mode, - const OpenFileSystemCallback& callback) override; - virtual AsyncFileUtil* GetAsyncFileUtil(FileSystemType type) override; - virtual WatcherManager* GetWatcherManager(FileSystemType type) override; - virtual CopyOrMoveFileValidatorFactory* GetCopyOrMoveFileValidatorFactory( + bool CanHandleType(FileSystemType type) const override; + void Initialize(FileSystemContext* context) override; + void ResolveURL(const FileSystemURL& url, + OpenFileSystemMode mode, + const OpenFileSystemCallback& callback) override; + AsyncFileUtil* GetAsyncFileUtil(FileSystemType type) override; + WatcherManager* GetWatcherManager(FileSystemType type) override; + CopyOrMoveFileValidatorFactory* GetCopyOrMoveFileValidatorFactory( FileSystemType type, base::File::Error* error_code) override; - virtual FileSystemOperation* CreateFileSystemOperation( + FileSystemOperation* CreateFileSystemOperation( const FileSystemURL& url, FileSystemContext* context, base::File::Error* error_code) const override; - virtual bool SupportsStreaming(const FileSystemURL& url) const override; - virtual bool HasInplaceCopyImplementation( + bool SupportsStreaming(const FileSystemURL& url) const override; + bool HasInplaceCopyImplementation( storage::FileSystemType type) const override; - virtual scoped_ptr<storage::FileStreamReader> CreateFileStreamReader( + scoped_ptr<storage::FileStreamReader> CreateFileStreamReader( const FileSystemURL& url, int64 offset, int64 max_bytes_to_read, const base::Time& expected_modification_time, FileSystemContext* context) const override; - virtual scoped_ptr<FileStreamWriter> CreateFileStreamWriter( + scoped_ptr<FileStreamWriter> CreateFileStreamWriter( const FileSystemURL& url, int64 offset, FileSystemContext* context) const override; - virtual FileSystemQuotaUtil* GetQuotaUtil() override; - virtual const UpdateObserverList* GetUpdateObservers( + FileSystemQuotaUtil* GetQuotaUtil() override; + const UpdateObserverList* GetUpdateObservers( FileSystemType type) const override; - virtual const ChangeObserverList* GetChangeObservers( + const ChangeObserverList* GetChangeObservers( FileSystemType type) const override; - virtual const AccessObserverList* GetAccessObservers( + const AccessObserverList* GetAccessObservers( FileSystemType type) const override; private: diff --git a/storage/browser/fileapi/local_file_stream_writer.h b/storage/browser/fileapi/local_file_stream_writer.h index c955d58..6771a14 100644 --- a/storage/browser/fileapi/local_file_stream_writer.h +++ b/storage/browser/fileapi/local_file_stream_writer.h @@ -31,13 +31,14 @@ namespace storage { class STORAGE_EXPORT LocalFileStreamWriter : public NON_EXPORTED_BASE(FileStreamWriter) { public: - virtual ~LocalFileStreamWriter(); + ~LocalFileStreamWriter() override; // FileStreamWriter overrides. - virtual int Write(net::IOBuffer* buf, int buf_len, - const net::CompletionCallback& callback) override; - virtual int Cancel(const net::CompletionCallback& callback) override; - virtual int Flush(const net::CompletionCallback& callback) override; + int Write(net::IOBuffer* buf, + int buf_len, + const net::CompletionCallback& callback) override; + int Cancel(const net::CompletionCallback& callback) override; + int Flush(const net::CompletionCallback& callback) override; private: friend class content::LocalFileStreamWriterTest; diff --git a/storage/browser/fileapi/local_file_util.cc b/storage/browser/fileapi/local_file_util.cc index 5f3be4f..27a1308 100644 --- a/storage/browser/fileapi/local_file_util.cc +++ b/storage/browser/fileapi/local_file_util.cc @@ -32,12 +32,12 @@ class LocalFileEnumerator : public FileSystemFileUtil::AbstractFileEnumerator { virtual_root_path_(virtual_root_path) { } - virtual ~LocalFileEnumerator() {} + ~LocalFileEnumerator() override {} - virtual base::FilePath Next() override; - virtual int64 Size() override; - virtual base::Time LastModifiedTime() override; - virtual bool IsDirectory() override; + base::FilePath Next() override; + int64 Size() override; + base::Time LastModifiedTime() override; + bool IsDirectory() override; private: base::FileEnumerator file_enum_; diff --git a/storage/browser/fileapi/local_file_util.h b/storage/browser/fileapi/local_file_util.h index 517494a..44dddb6 100644 --- a/storage/browser/fileapi/local_file_util.h +++ b/storage/browser/fileapi/local_file_util.h @@ -27,58 +27,48 @@ class STORAGE_EXPORT LocalFileUtil : public FileSystemFileUtil { public: LocalFileUtil(); - virtual ~LocalFileUtil(); + ~LocalFileUtil() override; - virtual base::File CreateOrOpen( - FileSystemOperationContext* context, - const FileSystemURL& url, - int file_flags) override; - virtual base::File::Error EnsureFileExists( - FileSystemOperationContext* context, - const FileSystemURL& url, bool* created) override; - virtual base::File::Error CreateDirectory( - FileSystemOperationContext* context, - const FileSystemURL& url, - bool exclusive, - bool recursive) override; - virtual base::File::Error GetFileInfo( - FileSystemOperationContext* context, - const FileSystemURL& url, - base::File::Info* file_info, - base::FilePath* platform_file) override; - virtual scoped_ptr<AbstractFileEnumerator> CreateFileEnumerator( + base::File CreateOrOpen(FileSystemOperationContext* context, + const FileSystemURL& url, + int file_flags) override; + base::File::Error EnsureFileExists(FileSystemOperationContext* context, + const FileSystemURL& url, + bool* created) override; + base::File::Error CreateDirectory(FileSystemOperationContext* context, + const FileSystemURL& url, + bool exclusive, + bool recursive) override; + base::File::Error GetFileInfo(FileSystemOperationContext* context, + const FileSystemURL& url, + base::File::Info* file_info, + base::FilePath* platform_file) override; + scoped_ptr<AbstractFileEnumerator> CreateFileEnumerator( FileSystemOperationContext* context, const FileSystemURL& root_url) override; - virtual base::File::Error GetLocalFilePath( - FileSystemOperationContext* context, - const FileSystemURL& file_system_url, - base::FilePath* local_file_path) override; - virtual base::File::Error Touch( - FileSystemOperationContext* context, - const FileSystemURL& url, - const base::Time& last_access_time, - const base::Time& last_modified_time) override; - virtual base::File::Error Truncate( - FileSystemOperationContext* context, - const FileSystemURL& url, - int64 length) override; - virtual base::File::Error CopyOrMoveFile( - FileSystemOperationContext* context, - const FileSystemURL& src_url, - const FileSystemURL& dest_url, - CopyOrMoveOption option, - bool copy) override; - virtual base::File::Error CopyInForeignFile( - FileSystemOperationContext* context, - const base::FilePath& src_file_path, - const FileSystemURL& dest_url) override; - virtual base::File::Error DeleteFile( - FileSystemOperationContext* context, - const FileSystemURL& url) override; - virtual base::File::Error DeleteDirectory( - FileSystemOperationContext* context, - const FileSystemURL& url) override; - virtual storage::ScopedFile CreateSnapshotFile( + base::File::Error GetLocalFilePath(FileSystemOperationContext* context, + const FileSystemURL& file_system_url, + base::FilePath* local_file_path) override; + base::File::Error Touch(FileSystemOperationContext* context, + const FileSystemURL& url, + const base::Time& last_access_time, + const base::Time& last_modified_time) override; + base::File::Error Truncate(FileSystemOperationContext* context, + const FileSystemURL& url, + int64 length) override; + base::File::Error CopyOrMoveFile(FileSystemOperationContext* context, + const FileSystemURL& src_url, + const FileSystemURL& dest_url, + CopyOrMoveOption option, + bool copy) override; + base::File::Error CopyInForeignFile(FileSystemOperationContext* context, + const base::FilePath& src_file_path, + const FileSystemURL& dest_url) override; + base::File::Error DeleteFile(FileSystemOperationContext* context, + const FileSystemURL& url) override; + base::File::Error DeleteDirectory(FileSystemOperationContext* context, + const FileSystemURL& url) override; + storage::ScopedFile CreateSnapshotFile( FileSystemOperationContext* context, const FileSystemURL& url, base::File::Error* error, diff --git a/storage/browser/fileapi/native_file_util.cc b/storage/browser/fileapi/native_file_util.cc index 84b9463..5b3b61e 100644 --- a/storage/browser/fileapi/native_file_util.cc +++ b/storage/browser/fileapi/native_file_util.cc @@ -81,12 +81,12 @@ class NativeFileEnumerator : public FileSystemFileUtil::AbstractFileEnumerator { : file_enum_(root_path, recursive, file_type) { } - virtual ~NativeFileEnumerator() {} + ~NativeFileEnumerator() override {} - virtual base::FilePath Next() override; - virtual int64 Size() override; - virtual base::Time LastModifiedTime() override; - virtual bool IsDirectory() override; + base::FilePath Next() override; + int64 Size() override; + base::Time LastModifiedTime() override; + bool IsDirectory() override; private: base::FileEnumerator file_enum_; diff --git a/storage/browser/fileapi/obfuscated_file_util.cc b/storage/browser/fileapi/obfuscated_file_util.cc index aa6a28c..fb671e7 100644 --- a/storage/browser/fileapi/obfuscated_file_util.cc +++ b/storage/browser/fileapi/obfuscated_file_util.cc @@ -130,9 +130,9 @@ class ObfuscatedFileEnumerator recurse_queue_.push(record); } - virtual ~ObfuscatedFileEnumerator() {} + ~ObfuscatedFileEnumerator() override {} - virtual base::FilePath Next() override { + base::FilePath Next() override { ProcessRecurseQueue(); if (display_stack_.empty()) return base::FilePath(); @@ -158,15 +158,13 @@ class ObfuscatedFileEnumerator return virtual_path; } - virtual int64 Size() override { - return current_platform_file_info_.size; - } + int64 Size() override { return current_platform_file_info_.size; } - virtual base::Time LastModifiedTime() override { + base::Time LastModifiedTime() override { return current_platform_file_info_.last_modified; } - virtual bool IsDirectory() override { + bool IsDirectory() override { return current_platform_file_info_.is_directory; } @@ -217,10 +215,10 @@ class ObfuscatedOriginEnumerator origin_database->ListAllOrigins(&origins_); } - virtual ~ObfuscatedOriginEnumerator() {} + ~ObfuscatedOriginEnumerator() override {} // Returns the next origin. Returns empty if there are no more origins. - virtual GURL Next() override { + GURL Next() override { OriginRecord record; if (!origins_.empty()) { record = origins_.back(); @@ -231,7 +229,7 @@ class ObfuscatedOriginEnumerator } // Returns the current origin's information. - virtual bool HasTypeDirectory(const std::string& type_string) const override { + bool HasTypeDirectory(const std::string& type_string) const override { if (current_.path.empty()) return false; if (type_string.empty()) { diff --git a/storage/browser/fileapi/obfuscated_file_util.h b/storage/browser/fileapi/obfuscated_file_util.h index a597ccd..d22d2e2 100644 --- a/storage/browser/fileapi/obfuscated_file_util.h +++ b/storage/browser/fileapi/obfuscated_file_util.h @@ -108,59 +108,49 @@ class STORAGE_EXPORT_PRIVATE ObfuscatedFileUtil const GetTypeStringForURLCallback& get_type_string_for_url, const std::set<std::string>& known_type_strings, SandboxFileSystemBackendDelegate* sandbox_delegate); - virtual ~ObfuscatedFileUtil(); + ~ObfuscatedFileUtil() override; // FileSystemFileUtil overrides. - virtual base::File CreateOrOpen( - FileSystemOperationContext* context, - const FileSystemURL& url, - int file_flags) override; - virtual base::File::Error EnsureFileExists( - FileSystemOperationContext* context, - const FileSystemURL& url, bool* created) override; - virtual base::File::Error CreateDirectory( - FileSystemOperationContext* context, - const FileSystemURL& url, - bool exclusive, - bool recursive) override; - virtual base::File::Error GetFileInfo( - FileSystemOperationContext* context, - const FileSystemURL& url, - base::File::Info* file_info, - base::FilePath* platform_file) override; - virtual scoped_ptr<AbstractFileEnumerator> CreateFileEnumerator( + base::File CreateOrOpen(FileSystemOperationContext* context, + const FileSystemURL& url, + int file_flags) override; + base::File::Error EnsureFileExists(FileSystemOperationContext* context, + const FileSystemURL& url, + bool* created) override; + base::File::Error CreateDirectory(FileSystemOperationContext* context, + const FileSystemURL& url, + bool exclusive, + bool recursive) override; + base::File::Error GetFileInfo(FileSystemOperationContext* context, + const FileSystemURL& url, + base::File::Info* file_info, + base::FilePath* platform_file) override; + scoped_ptr<AbstractFileEnumerator> CreateFileEnumerator( FileSystemOperationContext* context, const FileSystemURL& root_url) override; - virtual base::File::Error GetLocalFilePath( - FileSystemOperationContext* context, - const FileSystemURL& file_system_url, - base::FilePath* local_path) override; - virtual base::File::Error Touch( - FileSystemOperationContext* context, - const FileSystemURL& url, - const base::Time& last_access_time, - const base::Time& last_modified_time) override; - virtual base::File::Error Truncate( - FileSystemOperationContext* context, - const FileSystemURL& url, - int64 length) override; - virtual base::File::Error CopyOrMoveFile( - FileSystemOperationContext* context, - const FileSystemURL& src_url, - const FileSystemURL& dest_url, - CopyOrMoveOption option, - bool copy) override; - virtual base::File::Error CopyInForeignFile( - FileSystemOperationContext* context, - const base::FilePath& src_file_path, - const FileSystemURL& dest_url) override; - virtual base::File::Error DeleteFile( - FileSystemOperationContext* context, - const FileSystemURL& url) override; - virtual base::File::Error DeleteDirectory( - FileSystemOperationContext* context, - const FileSystemURL& url) override; - virtual storage::ScopedFile CreateSnapshotFile( + base::File::Error GetLocalFilePath(FileSystemOperationContext* context, + const FileSystemURL& file_system_url, + base::FilePath* local_path) override; + base::File::Error Touch(FileSystemOperationContext* context, + const FileSystemURL& url, + const base::Time& last_access_time, + const base::Time& last_modified_time) override; + base::File::Error Truncate(FileSystemOperationContext* context, + const FileSystemURL& url, + int64 length) override; + base::File::Error CopyOrMoveFile(FileSystemOperationContext* context, + const FileSystemURL& src_url, + const FileSystemURL& dest_url, + CopyOrMoveOption option, + bool copy) override; + base::File::Error CopyInForeignFile(FileSystemOperationContext* context, + const base::FilePath& src_file_path, + const FileSystemURL& dest_url) override; + base::File::Error DeleteFile(FileSystemOperationContext* context, + const FileSystemURL& url) override; + base::File::Error DeleteDirectory(FileSystemOperationContext* context, + const FileSystemURL& url) override; + storage::ScopedFile CreateSnapshotFile( FileSystemOperationContext* context, const FileSystemURL& url, base::File::Error* error, diff --git a/storage/browser/fileapi/plugin_private_file_system_backend.h b/storage/browser/fileapi/plugin_private_file_system_backend.h index 09671ee..72599fa 100644 --- a/storage/browser/fileapi/plugin_private_file_system_backend.h +++ b/storage/browser/fileapi/plugin_private_file_system_backend.h @@ -44,7 +44,7 @@ class STORAGE_EXPORT PluginPrivateFileSystemBackend const base::FilePath& profile_path, storage::SpecialStoragePolicy* special_storage_policy, const FileSystemOptions& file_system_options); - virtual ~PluginPrivateFileSystemBackend(); + ~PluginPrivateFileSystemBackend() override; // This must be used to open 'private' filesystem instead of regular // OpenFileSystem. @@ -61,62 +61,58 @@ class STORAGE_EXPORT PluginPrivateFileSystemBackend const StatusCallback& callback); // FileSystemBackend overrides. - virtual bool CanHandleType(FileSystemType type) const override; - virtual void Initialize(FileSystemContext* context) override; - virtual void ResolveURL(const FileSystemURL& url, - OpenFileSystemMode mode, - const OpenFileSystemCallback& callback) override; - virtual AsyncFileUtil* GetAsyncFileUtil(FileSystemType type) override; - virtual WatcherManager* GetWatcherManager(FileSystemType type) override; - virtual CopyOrMoveFileValidatorFactory* GetCopyOrMoveFileValidatorFactory( + bool CanHandleType(FileSystemType type) const override; + void Initialize(FileSystemContext* context) override; + void ResolveURL(const FileSystemURL& url, + OpenFileSystemMode mode, + const OpenFileSystemCallback& callback) override; + AsyncFileUtil* GetAsyncFileUtil(FileSystemType type) override; + WatcherManager* GetWatcherManager(FileSystemType type) override; + CopyOrMoveFileValidatorFactory* GetCopyOrMoveFileValidatorFactory( FileSystemType type, base::File::Error* error_code) override; - virtual FileSystemOperation* CreateFileSystemOperation( + FileSystemOperation* CreateFileSystemOperation( const FileSystemURL& url, FileSystemContext* context, base::File::Error* error_code) const override; - virtual bool SupportsStreaming(const FileSystemURL& url) const override; - virtual bool HasInplaceCopyImplementation( + bool SupportsStreaming(const FileSystemURL& url) const override; + bool HasInplaceCopyImplementation( storage::FileSystemType type) const override; - virtual scoped_ptr<storage::FileStreamReader> CreateFileStreamReader( + scoped_ptr<storage::FileStreamReader> CreateFileStreamReader( const FileSystemURL& url, int64 offset, int64 max_bytes_to_read, const base::Time& expected_modification_time, FileSystemContext* context) const override; - virtual scoped_ptr<FileStreamWriter> CreateFileStreamWriter( + scoped_ptr<FileStreamWriter> CreateFileStreamWriter( const FileSystemURL& url, int64 offset, FileSystemContext* context) const override; - virtual FileSystemQuotaUtil* GetQuotaUtil() override; - virtual const UpdateObserverList* GetUpdateObservers( + FileSystemQuotaUtil* GetQuotaUtil() override; + const UpdateObserverList* GetUpdateObservers( FileSystemType type) const override; - virtual const ChangeObserverList* GetChangeObservers( + const ChangeObserverList* GetChangeObservers( FileSystemType type) const override; - virtual const AccessObserverList* GetAccessObservers( + const AccessObserverList* GetAccessObservers( FileSystemType type) const override; // FileSystemQuotaUtil overrides. - virtual base::File::Error DeleteOriginDataOnFileTaskRunner( + base::File::Error DeleteOriginDataOnFileTaskRunner( FileSystemContext* context, storage::QuotaManagerProxy* proxy, const GURL& origin_url, FileSystemType type) override; - virtual void GetOriginsForTypeOnFileTaskRunner( - FileSystemType type, - std::set<GURL>* origins) override; - virtual void GetOriginsForHostOnFileTaskRunner( - FileSystemType type, - const std::string& host, - std::set<GURL>* origins) override; - virtual int64 GetOriginUsageOnFileTaskRunner( - FileSystemContext* context, + void GetOriginsForTypeOnFileTaskRunner(FileSystemType type, + std::set<GURL>* origins) override; + void GetOriginsForHostOnFileTaskRunner(FileSystemType type, + const std::string& host, + std::set<GURL>* origins) override; + int64 GetOriginUsageOnFileTaskRunner(FileSystemContext* context, + const GURL& origin_url, + FileSystemType type) override; + scoped_refptr<QuotaReservation> CreateQuotaReservationOnFileTaskRunner( const GURL& origin_url, FileSystemType type) override; - virtual scoped_refptr<QuotaReservation> - CreateQuotaReservationOnFileTaskRunner( - const GURL& origin_url, - FileSystemType type) override; private: friend class content::PluginPrivateFileSystemBackendTest; diff --git a/storage/browser/fileapi/quota/quota_backend_impl.h b/storage/browser/fileapi/quota/quota_backend_impl.h index c2d7190..7e4092d 100644 --- a/storage/browser/fileapi/quota/quota_backend_impl.h +++ b/storage/browser/fileapi/quota/quota_backend_impl.h @@ -40,28 +40,21 @@ class STORAGE_EXPORT QuotaBackendImpl ObfuscatedFileUtil* obfuscated_file_util, FileSystemUsageCache* file_system_usage_cache, storage::QuotaManagerProxy* quota_manager_proxy); - virtual ~QuotaBackendImpl(); + ~QuotaBackendImpl() override; // QuotaReservationManager::QuotaBackend overrides. - virtual void ReserveQuota( - const GURL& origin, - FileSystemType type, - int64 delta, - const ReserveQuotaCallback& callback) override; - virtual void ReleaseReservedQuota( - const GURL& origin, - FileSystemType type, - int64 size) override; - virtual void CommitQuotaUsage( - const GURL& origin, - FileSystemType type, - int64 delta) override; - virtual void IncrementDirtyCount( - const GURL& origin, - FileSystemType type) override; - virtual void DecrementDirtyCount( - const GURL& origin, - FileSystemType type) override; + void ReserveQuota(const GURL& origin, + FileSystemType type, + int64 delta, + const ReserveQuotaCallback& callback) override; + void ReleaseReservedQuota(const GURL& origin, + FileSystemType type, + int64 size) override; + void CommitQuotaUsage(const GURL& origin, + FileSystemType type, + int64 delta) override; + void IncrementDirtyCount(const GURL& origin, FileSystemType type) override; + void DecrementDirtyCount(const GURL& origin, FileSystemType type) override; private: friend class content::QuotaBackendImplTest; diff --git a/storage/browser/fileapi/remove_operation_delegate.h b/storage/browser/fileapi/remove_operation_delegate.h index fc83028..9625059 100644 --- a/storage/browser/fileapi/remove_operation_delegate.h +++ b/storage/browser/fileapi/remove_operation_delegate.h @@ -16,17 +16,17 @@ class RemoveOperationDelegate : public RecursiveOperationDelegate { RemoveOperationDelegate(FileSystemContext* file_system_context, const FileSystemURL& url, const StatusCallback& callback); - virtual ~RemoveOperationDelegate(); + ~RemoveOperationDelegate() override; // RecursiveOperationDelegate overrides: - virtual void Run() override; - virtual void RunRecursively() override; - virtual void ProcessFile(const FileSystemURL& url, - const StatusCallback& callback) override; - virtual void ProcessDirectory(const FileSystemURL& url, - const StatusCallback& callback) override; - virtual void PostProcessDirectory(const FileSystemURL& url, - const StatusCallback& callback) override; + void Run() override; + void RunRecursively() override; + void ProcessFile(const FileSystemURL& url, + const StatusCallback& callback) override; + void ProcessDirectory(const FileSystemURL& url, + const StatusCallback& callback) override; + void PostProcessDirectory(const FileSystemURL& url, + const StatusCallback& callback) override; private: void DidTryRemoveFile(base::File::Error error); diff --git a/storage/browser/fileapi/sandbox_file_stream_writer.h b/storage/browser/fileapi/sandbox_file_stream_writer.h index 78bf2a1..69b3136 100644 --- a/storage/browser/fileapi/sandbox_file_stream_writer.h +++ b/storage/browser/fileapi/sandbox_file_stream_writer.h @@ -30,13 +30,14 @@ class STORAGE_EXPORT_PRIVATE SandboxFileStreamWriter const FileSystemURL& url, int64 initial_offset, const UpdateObserverList& observers); - virtual ~SandboxFileStreamWriter(); + ~SandboxFileStreamWriter() override; // FileStreamWriter overrides. - virtual int Write(net::IOBuffer* buf, int buf_len, - const net::CompletionCallback& callback) override; - virtual int Cancel(const net::CompletionCallback& callback) override; - virtual int Flush(const net::CompletionCallback& callback) override; + int Write(net::IOBuffer* buf, + int buf_len, + const net::CompletionCallback& callback) override; + int Cancel(const net::CompletionCallback& callback) override; + int Flush(const net::CompletionCallback& callback) override; // Used only by tests. void set_default_quota(int64 quota) { diff --git a/storage/browser/fileapi/sandbox_file_system_backend.h b/storage/browser/fileapi/sandbox_file_system_backend.h index 71e0b8b..e187f9b 100644 --- a/storage/browser/fileapi/sandbox_file_system_backend.h +++ b/storage/browser/fileapi/sandbox_file_system_backend.h @@ -29,42 +29,42 @@ class STORAGE_EXPORT SandboxFileSystemBackend : public FileSystemBackend { public: explicit SandboxFileSystemBackend(SandboxFileSystemBackendDelegate* delegate); - virtual ~SandboxFileSystemBackend(); + ~SandboxFileSystemBackend() override; // FileSystemBackend overrides. - virtual bool CanHandleType(FileSystemType type) const override; - virtual void Initialize(FileSystemContext* context) override; - virtual void ResolveURL(const FileSystemURL& url, - OpenFileSystemMode mode, - const OpenFileSystemCallback& callback) override; - virtual AsyncFileUtil* GetAsyncFileUtil(FileSystemType type) override; - virtual WatcherManager* GetWatcherManager(FileSystemType type) override; - virtual CopyOrMoveFileValidatorFactory* GetCopyOrMoveFileValidatorFactory( + bool CanHandleType(FileSystemType type) const override; + void Initialize(FileSystemContext* context) override; + void ResolveURL(const FileSystemURL& url, + OpenFileSystemMode mode, + const OpenFileSystemCallback& callback) override; + AsyncFileUtil* GetAsyncFileUtil(FileSystemType type) override; + WatcherManager* GetWatcherManager(FileSystemType type) override; + CopyOrMoveFileValidatorFactory* GetCopyOrMoveFileValidatorFactory( FileSystemType type, base::File::Error* error_code) override; - virtual FileSystemOperation* CreateFileSystemOperation( + FileSystemOperation* CreateFileSystemOperation( const FileSystemURL& url, FileSystemContext* context, base::File::Error* error_code) const override; - virtual bool SupportsStreaming(const FileSystemURL& url) const override; - virtual bool HasInplaceCopyImplementation( + bool SupportsStreaming(const FileSystemURL& url) const override; + bool HasInplaceCopyImplementation( storage::FileSystemType type) const override; - virtual scoped_ptr<storage::FileStreamReader> CreateFileStreamReader( + scoped_ptr<storage::FileStreamReader> CreateFileStreamReader( const FileSystemURL& url, int64 offset, int64 max_bytes_to_read, const base::Time& expected_modification_time, FileSystemContext* context) const override; - virtual scoped_ptr<FileStreamWriter> CreateFileStreamWriter( + scoped_ptr<FileStreamWriter> CreateFileStreamWriter( const FileSystemURL& url, int64 offset, FileSystemContext* context) const override; - virtual FileSystemQuotaUtil* GetQuotaUtil() override; - virtual const UpdateObserverList* GetUpdateObservers( + FileSystemQuotaUtil* GetQuotaUtil() override; + const UpdateObserverList* GetUpdateObservers( FileSystemType type) const override; - virtual const ChangeObserverList* GetChangeObservers( + const ChangeObserverList* GetChangeObservers( FileSystemType type) const override; - virtual const AccessObserverList* GetAccessObservers( + const AccessObserverList* GetAccessObservers( FileSystemType type) const override; // Returns an origin enumerator of this backend. diff --git a/storage/browser/fileapi/sandbox_file_system_backend_delegate.cc b/storage/browser/fileapi/sandbox_file_system_backend_delegate.cc index d68ba2c..9fb6b0e 100644 --- a/storage/browser/fileapi/sandbox_file_system_backend_delegate.cc +++ b/storage/browser/fileapi/sandbox_file_system_backend_delegate.cc @@ -92,13 +92,11 @@ class ObfuscatedOriginEnumerator explicit ObfuscatedOriginEnumerator(ObfuscatedFileUtil* file_util) { enum_.reset(file_util->CreateOriginEnumerator()); } - virtual ~ObfuscatedOriginEnumerator() {} + ~ObfuscatedOriginEnumerator() override {} - virtual GURL Next() override { - return enum_->Next(); - } + GURL Next() override { return enum_->Next(); } - virtual bool HasFileSystemType(FileSystemType type) const override { + bool HasFileSystemType(FileSystemType type) const override { return enum_->HasTypeDirectory( SandboxFileSystemBackendDelegate::GetTypeString(type)); } diff --git a/storage/browser/fileapi/sandbox_file_system_backend_delegate.h b/storage/browser/fileapi/sandbox_file_system_backend_delegate.h index c22b8fd..88dec7f 100644 --- a/storage/browser/fileapi/sandbox_file_system_backend_delegate.h +++ b/storage/browser/fileapi/sandbox_file_system_backend_delegate.h @@ -87,7 +87,7 @@ class STORAGE_EXPORT SandboxFileSystemBackendDelegate storage::SpecialStoragePolicy* special_storage_policy, const FileSystemOptions& file_system_options); - virtual ~SandboxFileSystemBackendDelegate(); + ~SandboxFileSystemBackendDelegate() override; // Returns an origin enumerator of sandbox filesystem. // This method can only be called on the file thread. @@ -127,26 +127,22 @@ class STORAGE_EXPORT SandboxFileSystemBackendDelegate FileSystemType type) const; // FileSystemQuotaUtil overrides. - virtual base::File::Error DeleteOriginDataOnFileTaskRunner( + base::File::Error DeleteOriginDataOnFileTaskRunner( FileSystemContext* context, storage::QuotaManagerProxy* proxy, const GURL& origin_url, FileSystemType type) override; - virtual void GetOriginsForTypeOnFileTaskRunner( - FileSystemType type, - std::set<GURL>* origins) override; - virtual void GetOriginsForHostOnFileTaskRunner( - FileSystemType type, - const std::string& host, - std::set<GURL>* origins) override; - virtual int64 GetOriginUsageOnFileTaskRunner( - FileSystemContext* context, + void GetOriginsForTypeOnFileTaskRunner(FileSystemType type, + std::set<GURL>* origins) override; + void GetOriginsForHostOnFileTaskRunner(FileSystemType type, + const std::string& host, + std::set<GURL>* origins) override; + int64 GetOriginUsageOnFileTaskRunner(FileSystemContext* context, + const GURL& origin_url, + FileSystemType type) override; + scoped_refptr<QuotaReservation> CreateQuotaReservationOnFileTaskRunner( const GURL& origin_url, FileSystemType type) override; - virtual scoped_refptr<QuotaReservation> - CreateQuotaReservationOnFileTaskRunner( - const GURL& origin_url, - FileSystemType type) override; // Adds an observer for the secified |type| of a file system, bound to // |task_runner|. diff --git a/storage/browser/fileapi/sandbox_isolated_origin_database.h b/storage/browser/fileapi/sandbox_isolated_origin_database.h index 4fb9f77..b5203d2 100644 --- a/storage/browser/fileapi/sandbox_isolated_origin_database.h +++ b/storage/browser/fileapi/sandbox_isolated_origin_database.h @@ -27,15 +27,15 @@ class STORAGE_EXPORT_PRIVATE SandboxIsolatedOriginDatabase const std::string& origin, const base::FilePath& file_system_directory, const base::FilePath& origin_directory); - virtual ~SandboxIsolatedOriginDatabase(); + ~SandboxIsolatedOriginDatabase() override; // SandboxOriginDatabaseInterface overrides. - virtual bool HasOriginPath(const std::string& origin) override; - virtual bool GetPathForOrigin(const std::string& origin, - base::FilePath* directory) override; - virtual bool RemovePathForOrigin(const std::string& origin) override; - virtual bool ListAllOrigins(std::vector<OriginRecord>* origins) override; - virtual void DropDatabase() override; + bool HasOriginPath(const std::string& origin) override; + bool GetPathForOrigin(const std::string& origin, + base::FilePath* directory) override; + bool RemovePathForOrigin(const std::string& origin) override; + bool ListAllOrigins(std::vector<OriginRecord>* origins) override; + void DropDatabase() override; // TODO(kinuko): Deprecate this after a few release cycles, e.g. around M33. static void MigrateBackFromObsoleteOriginDatabase( diff --git a/storage/browser/fileapi/sandbox_origin_database.h b/storage/browser/fileapi/sandbox_origin_database.h index 3fef8d5..30e66c9 100644 --- a/storage/browser/fileapi/sandbox_origin_database.h +++ b/storage/browser/fileapi/sandbox_origin_database.h @@ -33,15 +33,15 @@ class STORAGE_EXPORT_PRIVATE SandboxOriginDatabase // at a given time. SandboxOriginDatabase(const base::FilePath& file_system_directory, leveldb::Env* env_override); - virtual ~SandboxOriginDatabase(); + ~SandboxOriginDatabase() override; // SandboxOriginDatabaseInterface overrides. - virtual bool HasOriginPath(const std::string& origin) override; - virtual bool GetPathForOrigin(const std::string& origin, - base::FilePath* directory) override; - virtual bool RemovePathForOrigin(const std::string& origin) override; - virtual bool ListAllOrigins(std::vector<OriginRecord>* origins) override; - virtual void DropDatabase() override; + bool HasOriginPath(const std::string& origin) override; + bool GetPathForOrigin(const std::string& origin, + base::FilePath* directory) override; + bool RemovePathForOrigin(const std::string& origin) override; + bool ListAllOrigins(std::vector<OriginRecord>* origins) override; + void DropDatabase() override; base::FilePath GetDatabasePath() const; void RemoveDatabase(); diff --git a/storage/browser/fileapi/sandbox_prioritized_origin_database.h b/storage/browser/fileapi/sandbox_prioritized_origin_database.h index 4309bb3..c1b6a80 100644 --- a/storage/browser/fileapi/sandbox_prioritized_origin_database.h +++ b/storage/browser/fileapi/sandbox_prioritized_origin_database.h @@ -30,7 +30,7 @@ class STORAGE_EXPORT_PRIVATE SandboxPrioritizedOriginDatabase SandboxPrioritizedOriginDatabase(const base::FilePath& file_system_directory, leveldb::Env* env_override); - virtual ~SandboxPrioritizedOriginDatabase(); + ~SandboxPrioritizedOriginDatabase() override; // Sets |origin| as primary origin in this database (e.g. may // allow faster access). @@ -40,12 +40,12 @@ class STORAGE_EXPORT_PRIVATE SandboxPrioritizedOriginDatabase std::string GetPrimaryOrigin(); // SandboxOriginDatabaseInterface overrides. - virtual bool HasOriginPath(const std::string& origin) override; - virtual bool GetPathForOrigin(const std::string& origin, - base::FilePath* directory) override; - virtual bool RemovePathForOrigin(const std::string& origin) override; - virtual bool ListAllOrigins(std::vector<OriginRecord>* origins) override; - virtual void DropDatabase() override; + bool HasOriginPath(const std::string& origin) override; + bool GetPathForOrigin(const std::string& origin, + base::FilePath* directory) override; + bool RemovePathForOrigin(const std::string& origin) override; + bool ListAllOrigins(std::vector<OriginRecord>* origins) override; + void DropDatabase() override; const base::FilePath& primary_origin_file() const { return primary_origin_file_; diff --git a/storage/browser/fileapi/sandbox_quota_observer.h b/storage/browser/fileapi/sandbox_quota_observer.h index 3c3d619..64c153a 100644 --- a/storage/browser/fileapi/sandbox_quota_observer.h +++ b/storage/browser/fileapi/sandbox_quota_observer.h @@ -41,15 +41,15 @@ class SandboxQuotaObserver base::SequencedTaskRunner* update_notify_runner, ObfuscatedFileUtil* sandbox_file_util, FileSystemUsageCache* file_system_usage_cache_); - virtual ~SandboxQuotaObserver(); + ~SandboxQuotaObserver() override; // FileUpdateObserver overrides. - virtual void OnStartUpdate(const FileSystemURL& url) override; - virtual void OnUpdate(const FileSystemURL& url, int64 delta) override; - virtual void OnEndUpdate(const FileSystemURL& url) override; + void OnStartUpdate(const FileSystemURL& url) override; + void OnUpdate(const FileSystemURL& url, int64 delta) override; + void OnEndUpdate(const FileSystemURL& url) override; // FileAccessObserver overrides. - virtual void OnAccess(const FileSystemURL& url) override; + void OnAccess(const FileSystemURL& url) override; void SetUsageCacheEnabled(const GURL& origin, FileSystemType type, diff --git a/storage/browser/fileapi/transient_file_util.h b/storage/browser/fileapi/transient_file_util.h index 054f8b0..b14969b 100644 --- a/storage/browser/fileapi/transient_file_util.h +++ b/storage/browser/fileapi/transient_file_util.h @@ -17,10 +17,10 @@ class STORAGE_EXPORT_PRIVATE TransientFileUtil : public LocalFileUtil { public: TransientFileUtil() {} - virtual ~TransientFileUtil() {} + ~TransientFileUtil() override {} // LocalFileUtil overrides. - virtual storage::ScopedFile CreateSnapshotFile( + storage::ScopedFile CreateSnapshotFile( FileSystemOperationContext* context, const FileSystemURL& url, base::File::Error* error, diff --git a/storage/browser/quota/quota_manager.cc b/storage/browser/quota/quota_manager.cc index 0e3e7e4..e7b5f7b 100644 --- a/storage/browser/quota/quota_manager.cc +++ b/storage/browser/quota/quota_manager.cc @@ -334,7 +334,7 @@ class UsageAndQuotaCallbackDispatcher usage_and_quota_(-1, -1, -1, -1), waiting_callbacks_(1) {} - virtual ~UsageAndQuotaCallbackDispatcher() {} + ~UsageAndQuotaCallbackDispatcher() override {} void WaitForResults(const QuotaManager::UsageAndQuotaCallback& callback) { callback_ = callback; @@ -420,19 +420,19 @@ class UsageAndQuotaCallbackDispatcher CheckCompleted(); } - virtual void Run() override { + void Run() override { // We initialize waiting_callbacks to 1 so that we won't run // the completion callback until here even some of the callbacks // are dispatched synchronously. CheckCompleted(); } - virtual void Aborted() override { + void Aborted() override { callback_.Run(kQuotaErrorAbort, UsageAndQuota()); DeleteSoon(); } - virtual void Completed() override { + void Completed() override { DCHECK(!has_usage_ || usage_and_quota_.usage >= 0); DCHECK(!has_global_limited_usage_ || usage_and_quota_.global_limited_usage >= 0); @@ -474,7 +474,7 @@ class QuotaManager::GetUsageInfoTask : public QuotaTask { } protected: - virtual void Run() override { + void Run() override { remaining_trackers_ = 3; // This will populate cached hosts and usage info. manager()->GetUsageTracker(kStorageTypeTemporary)->GetGlobalUsage( @@ -491,12 +491,12 @@ class QuotaManager::GetUsageInfoTask : public QuotaTask { kStorageTypeSyncable)); } - virtual void Completed() override { + void Completed() override { callback_.Run(entries_); DeleteSoon(); } - virtual void Aborted() override { + void Aborted() override { callback_.Run(UsageInfoEntries()); DeleteSoon(); } @@ -549,7 +549,7 @@ class QuotaManager::OriginDataDeleter : public QuotaTask { weak_factory_(this) {} protected: - virtual void Run() override { + void Run() override { error_count_ = 0; remaining_clients_ = manager()->clients_.size(); for (QuotaClientList::iterator iter = manager()->clients_.begin(); @@ -567,7 +567,7 @@ class QuotaManager::OriginDataDeleter : public QuotaTask { } } - virtual void Completed() override { + void Completed() override { if (error_count_ == 0) { // Only remove the entire origin if we didn't skip any client types. if (skipped_clients_ == 0) @@ -579,7 +579,7 @@ class QuotaManager::OriginDataDeleter : public QuotaTask { DeleteSoon(); } - virtual void Aborted() override { + void Aborted() override { callback_.Run(kQuotaErrorAbort); DeleteSoon(); } @@ -629,7 +629,7 @@ class QuotaManager::HostDataDeleter : public QuotaTask { weak_factory_(this) {} protected: - virtual void Run() override { + void Run() override { error_count_ = 0; remaining_clients_ = manager()->clients_.size(); for (QuotaClientList::iterator iter = manager()->clients_.begin(); @@ -641,7 +641,7 @@ class QuotaManager::HostDataDeleter : public QuotaTask { } } - virtual void Completed() override { + void Completed() override { if (error_count_ == 0) { callback_.Run(kQuotaStatusOk); } else { @@ -650,7 +650,7 @@ class QuotaManager::HostDataDeleter : public QuotaTask { DeleteSoon(); } - virtual void Aborted() override { + void Aborted() override { callback_.Run(kQuotaErrorAbort); DeleteSoon(); } diff --git a/storage/browser/quota/quota_manager.h b/storage/browser/quota/quota_manager.h index c713006..a61332f 100644 --- a/storage/browser/quota/quota_manager.h +++ b/storage/browser/quota/quota_manager.h @@ -261,7 +261,7 @@ class STORAGE_EXPORT QuotaManager static int64 kSyncableStorageDefaultHostQuota; protected: - virtual ~QuotaManager(); + ~QuotaManager() override; private: friend class base::DeleteHelper<QuotaManager>; @@ -356,14 +356,12 @@ class STORAGE_EXPORT QuotaManager int64 unlimited_usage); // QuotaEvictionHandler. - virtual void GetLRUOrigin( - StorageType type, - const GetLRUOriginCallback& callback) override; - virtual void EvictOriginData( - const GURL& origin, - StorageType type, - const EvictOriginDataCallback& callback) override; - virtual void GetUsageAndQuotaForEviction( + void GetLRUOrigin(StorageType type, + const GetLRUOriginCallback& callback) override; + void EvictOriginData(const GURL& origin, + StorageType type, + const EvictOriginDataCallback& callback) override; + void GetUsageAndQuotaForEviction( const UsageAndQuotaCallback& callback) override; void DidSetTemporaryGlobalOverrideQuota(const QuotaCallback& callback, diff --git a/storage/browser/quota/usage_tracker.h b/storage/browser/quota/usage_tracker.h index 02b64de..b19aea1 100644 --- a/storage/browser/quota/usage_tracker.h +++ b/storage/browser/quota/usage_tracker.h @@ -35,7 +35,7 @@ class STORAGE_EXPORT UsageTracker : public QuotaTaskObserver { UsageTracker(const QuotaClientList& clients, StorageType type, SpecialStoragePolicy* special_storage_policy, StorageMonitor* storage_monitor); - virtual ~UsageTracker(); + ~UsageTracker() override; StorageType type() const { return type_; } ClientUsageTracker* GetClientTracker(QuotaClient::ID client_id); @@ -107,7 +107,7 @@ class ClientUsageTracker : public SpecialStoragePolicy::Observer, StorageType type, SpecialStoragePolicy* special_storage_policy, StorageMonitor* storage_monitor); - virtual ~ClientUsageTracker(); + ~ClientUsageTracker() override; void GetGlobalLimitedUsage(const UsageCallback& callback); void GetGlobalUsage(const GlobalUsageCallback& callback); @@ -169,9 +169,9 @@ class ClientUsageTracker : public SpecialStoragePolicy::Observer, bool GetCachedOriginUsage(const GURL& origin, int64* usage) const; // SpecialStoragePolicy::Observer overrides - virtual void OnGranted(const GURL& origin, int change_flags) override; - virtual void OnRevoked(const GURL& origin, int change_flags) override; - virtual void OnCleared() override; + void OnGranted(const GURL& origin, int change_flags) override; + void OnRevoked(const GURL& origin, int change_flags) override; + void OnCleared() override; bool IsStorageUnlimited(const GURL& origin) const; |