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

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

Issue 145303002: Convert Media Galleries to use base::File (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 10 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 | Annotate | Revision Log
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 WEBKIT_BROWSER_FILEAPI_SANDBOX_FILE_STREAM_WRITER_H_ 5 #ifndef WEBKIT_BROWSER_FILEAPI_SANDBOX_FILE_STREAM_WRITER_H_
6 #define WEBKIT_BROWSER_FILEAPI_SANDBOX_FILE_STREAM_WRITER_H_ 6 #define WEBKIT_BROWSER_FILEAPI_SANDBOX_FILE_STREAM_WRITER_H_
7 7
8 #include "base/files/file.h"
8 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
9 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
10 #include "base/platform_file.h"
11 #include "url/gurl.h" 11 #include "url/gurl.h"
12 #include "webkit/browser/fileapi/file_stream_writer.h" 12 #include "webkit/browser/fileapi/file_stream_writer.h"
13 #include "webkit/browser/fileapi/file_system_url.h" 13 #include "webkit/browser/fileapi/file_system_url.h"
14 #include "webkit/browser/fileapi/task_runner_bound_observer_list.h" 14 #include "webkit/browser/fileapi/task_runner_bound_observer_list.h"
15 #include "webkit/browser/webkit_storage_browser_export.h" 15 #include "webkit/browser/webkit_storage_browser_export.h"
16 #include "webkit/common/blob/shareable_file_reference.h" 16 #include "webkit/common/blob/shareable_file_reference.h"
17 #include "webkit/common/fileapi/file_system_types.h" 17 #include "webkit/common/fileapi/file_system_types.h"
18 #include "webkit/common/quota/quota_types.h" 18 #include "webkit/common/quota/quota_types.h"
19 19
20 namespace fileapi { 20 namespace fileapi {
(...skipping 24 matching lines...) Expand all
45 45
46 private: 46 private:
47 // Performs quota calculation and calls local_file_writer_->Write(). 47 // Performs quota calculation and calls local_file_writer_->Write().
48 int WriteInternal(net::IOBuffer* buf, int buf_len, 48 int WriteInternal(net::IOBuffer* buf, int buf_len,
49 const net::CompletionCallback& callback); 49 const net::CompletionCallback& callback);
50 50
51 // Callbacks that are chained for the first write. This eventually calls 51 // Callbacks that are chained for the first write. This eventually calls
52 // WriteInternal. 52 // WriteInternal.
53 void DidCreateSnapshotFile( 53 void DidCreateSnapshotFile(
54 const net::CompletionCallback& callback, 54 const net::CompletionCallback& callback,
55 base::PlatformFileError file_error, 55 base::File::Error file_error,
56 const base::PlatformFileInfo& file_info, 56 const base::File::Info& file_info,
57 const base::FilePath& platform_path, 57 const base::FilePath& platform_path,
58 const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref); 58 const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref);
59 void DidGetUsageAndQuota(const net::CompletionCallback& callback, 59 void DidGetUsageAndQuota(const net::CompletionCallback& callback,
60 quota::QuotaStatusCode status, 60 quota::QuotaStatusCode status,
61 int64 usage, int64 quota); 61 int64 usage, int64 quota);
62 void DidInitializeForWrite(net::IOBuffer* buf, int buf_len, 62 void DidInitializeForWrite(net::IOBuffer* buf, int buf_len,
63 const net::CompletionCallback& callback, 63 const net::CompletionCallback& callback,
64 int init_status); 64 int init_status);
65 65
66 void DidWrite(const net::CompletionCallback& callback, int write_response); 66 void DidWrite(const net::CompletionCallback& callback, int write_response);
(...skipping 19 matching lines...) Expand all
86 int64 default_quota_; 86 int64 default_quota_;
87 87
88 base::WeakPtrFactory<SandboxFileStreamWriter> weak_factory_; 88 base::WeakPtrFactory<SandboxFileStreamWriter> weak_factory_;
89 89
90 DISALLOW_COPY_AND_ASSIGN(SandboxFileStreamWriter); 90 DISALLOW_COPY_AND_ASSIGN(SandboxFileStreamWriter);
91 }; 91 };
92 92
93 } // namespace fileapi 93 } // namespace fileapi
94 94
95 #endif // WEBKIT_BROWSER_FILEAPI_SANDBOX_FILE_STREAM_WRITER_H_ 95 #endif // WEBKIT_BROWSER_FILEAPI_SANDBOX_FILE_STREAM_WRITER_H_
OLDNEW
« no previous file with comments | « webkit/browser/fileapi/sandbox_directory_database_unittest.cc ('k') | webkit/browser/fileapi/sandbox_file_stream_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698