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

Side by Side Diff: storage/browser/fileapi/sandbox_file_stream_writer.h

Issue 669603008: Standardize usage of virtual/override/final in storage/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef STORAGE_BROWSER_FILEAPI_SANDBOX_FILE_STREAM_WRITER_H_ 5 #ifndef STORAGE_BROWSER_FILEAPI_SANDBOX_FILE_STREAM_WRITER_H_
6 #define STORAGE_BROWSER_FILEAPI_SANDBOX_FILE_STREAM_WRITER_H_ 6 #define STORAGE_BROWSER_FILEAPI_SANDBOX_FILE_STREAM_WRITER_H_
7 7
8 #include "base/files/file.h" 8 #include "base/files/file.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 12 matching lines...) Expand all
23 class FileSystemQuotaUtil; 23 class FileSystemQuotaUtil;
24 class FileStreamWriter; 24 class FileStreamWriter;
25 25
26 class STORAGE_EXPORT_PRIVATE SandboxFileStreamWriter 26 class STORAGE_EXPORT_PRIVATE SandboxFileStreamWriter
27 : public NON_EXPORTED_BASE(FileStreamWriter) { 27 : public NON_EXPORTED_BASE(FileStreamWriter) {
28 public: 28 public:
29 SandboxFileStreamWriter(FileSystemContext* file_system_context, 29 SandboxFileStreamWriter(FileSystemContext* file_system_context,
30 const FileSystemURL& url, 30 const FileSystemURL& url,
31 int64 initial_offset, 31 int64 initial_offset,
32 const UpdateObserverList& observers); 32 const UpdateObserverList& observers);
33 virtual ~SandboxFileStreamWriter(); 33 ~SandboxFileStreamWriter() override;
34 34
35 // FileStreamWriter overrides. 35 // FileStreamWriter overrides.
36 virtual int Write(net::IOBuffer* buf, int buf_len, 36 int Write(net::IOBuffer* buf,
37 const net::CompletionCallback& callback) override; 37 int buf_len,
38 virtual int Cancel(const net::CompletionCallback& callback) override; 38 const net::CompletionCallback& callback) override;
39 virtual int Flush(const net::CompletionCallback& callback) override; 39 int Cancel(const net::CompletionCallback& callback) override;
40 int Flush(const net::CompletionCallback& callback) override;
40 41
41 // Used only by tests. 42 // Used only by tests.
42 void set_default_quota(int64 quota) { 43 void set_default_quota(int64 quota) {
43 default_quota_ = quota; 44 default_quota_ = quota;
44 } 45 }
45 46
46 private: 47 private:
47 // Performs quota calculation and calls local_file_writer_->Write(). 48 // Performs quota calculation and calls local_file_writer_->Write().
48 int WriteInternal(net::IOBuffer* buf, int buf_len, 49 int WriteInternal(net::IOBuffer* buf, int buf_len,
49 const net::CompletionCallback& callback); 50 const net::CompletionCallback& callback);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 int64 default_quota_; 88 int64 default_quota_;
88 89
89 base::WeakPtrFactory<SandboxFileStreamWriter> weak_factory_; 90 base::WeakPtrFactory<SandboxFileStreamWriter> weak_factory_;
90 91
91 DISALLOW_COPY_AND_ASSIGN(SandboxFileStreamWriter); 92 DISALLOW_COPY_AND_ASSIGN(SandboxFileStreamWriter);
92 }; 93 };
93 94
94 } // namespace storage 95 } // namespace storage
95 96
96 #endif // STORAGE_BROWSER_FILEAPI_SANDBOX_FILE_STREAM_WRITER_H_ 97 #endif // STORAGE_BROWSER_FILEAPI_SANDBOX_FILE_STREAM_WRITER_H_
OLDNEW
« no previous file with comments | « storage/browser/fileapi/remove_operation_delegate.h ('k') | storage/browser/fileapi/sandbox_file_system_backend.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698