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

Side by Side Diff: content/browser/loader/temporary_file_stream.h

Issue 442383002: Move storage-related files from webkit/ to new top-level directory storage/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CONTENT_BROWSER_LOADER_TEMPORARY_FILE_STREAM_H_ 5 #ifndef CONTENT_BROWSER_LOADER_TEMPORARY_FILE_STREAM_H_
6 #define CONTENT_BROWSER_LOADER_TEMPORARY_FILE_STREAM_H_ 6 #define CONTENT_BROWSER_LOADER_TEMPORARY_FILE_STREAM_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "base/files/file.h" 9 #include "base/files/file.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
12 12
13 namespace net { 13 namespace net {
14 class FileStream; 14 class FileStream;
15 } 15 }
16 16
17 namespace webkit_blob { 17 namespace storage {
18 class ShareableFileReference; 18 class ShareableFileReference;
19 } 19 }
20 20
21 namespace content { 21 namespace content {
22 22
23 typedef base::Callback<void(base::File::Error, 23 typedef base::Callback<void(base::File::Error,
24 scoped_ptr<net::FileStream>, 24 scoped_ptr<net::FileStream>,
25 webkit_blob::ShareableFileReference*)> 25 storage::ShareableFileReference*)>
26 CreateTemporaryFileStreamCallback; 26 CreateTemporaryFileStreamCallback;
27 27
28 // Creates a temporary file and asynchronously calls |callback| with a 28 // Creates a temporary file and asynchronously calls |callback| with a
29 // net::FileStream and webkit_blob::ShareableFileReference. The file is deleted 29 // net::FileStream and storage::ShareableFileReference. The file is deleted
30 // when the webkit_blob::ShareableFileReference is deleted. Note it is the 30 // when the storage::ShareableFileReference is deleted. Note it is the
31 // consumer's responsibility to ensure the webkit_blob::ShareableFileReference 31 // consumer's responsibility to ensure the storage::ShareableFileReference
32 // stays in scope until net::FileStream has finished closing the file. On error, 32 // stays in scope until net::FileStream has finished closing the file. On error,
33 // |callback| is called with an error in the first parameter. 33 // |callback| is called with an error in the first parameter.
34 // 34 //
35 // This function may only be called on the IO thread. 35 // This function may only be called on the IO thread.
36 // 36 //
37 // TODO(davidben): Juggling the net::FileStream and 37 // TODO(davidben): Juggling the net::FileStream and
38 // webkit_blob::ShareableFileReference lifetimes is a nuisance. The two should 38 // storage::ShareableFileReference lifetimes is a nuisance. The two should
39 // be tied together so the consumer need not deal with it. 39 // be tied together so the consumer need not deal with it.
40 CONTENT_EXPORT void CreateTemporaryFileStream( 40 CONTENT_EXPORT void CreateTemporaryFileStream(
41 const CreateTemporaryFileStreamCallback& callback); 41 const CreateTemporaryFileStreamCallback& callback);
42 42
43 } // namespace content 43 } // namespace content
44 44
45 #endif // CONTENT_BROWSER_LOADER_TEMPORARY_FILE_STREAM_H_ 45 #endif // CONTENT_BROWSER_LOADER_TEMPORARY_FILE_STREAM_H_
OLDNEW
« no previous file with comments | « content/browser/loader/resource_message_filter.cc ('k') | content/browser/loader/temporary_file_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698