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

Side by Side Diff: webkit/blob/shareable_file_reference.h

Issue 11103031: webkit: Merge blob and fileapi into one build target 'storage' (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Leave *.gypi files in blob and fileapi Created 8 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 | Annotate | Revision Log
« no previous file with comments | « webkit/blob/local_file_stream_reader.h ('k') | webkit/blob/view_blob_internals_job.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_BLOB_SHAREABLE_FILE_REFERENCE_H_ 5 #ifndef WEBKIT_BLOB_SHAREABLE_FILE_REFERENCE_H_
6 #define WEBKIT_BLOB_SHAREABLE_FILE_REFERENCE_H_ 6 #define WEBKIT_BLOB_SHAREABLE_FILE_REFERENCE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/file_path.h" 11 #include "base/file_path.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "webkit/blob/blob_export.h" 13 #include "webkit/storage/webkit_storage_export.h"
14 14
15 namespace base { 15 namespace base {
16 class TaskRunner; 16 class TaskRunner;
17 } 17 }
18 18
19 namespace webkit_blob { 19 namespace webkit_blob {
20 20
21 // A refcounted wrapper around a FilePath that can optionally schedule 21 // A refcounted wrapper around a FilePath that can optionally schedule
22 // the file to be deleted upon final release and/or to notify a consumer 22 // the file to be deleted upon final release and/or to notify a consumer
23 // when final release occurs. This class is single-threaded and should 23 // when final release occurs. This class is single-threaded and should
24 // only be invoked on the IO thread in chrome. 24 // only be invoked on the IO thread in chrome.
25 class BLOB_EXPORT ShareableFileReference 25 class WEBKIT_STORAGE_EXPORT ShareableFileReference
26 : public base::RefCounted<ShareableFileReference> { 26 : public base::RefCounted<ShareableFileReference> {
27 public: 27 public:
28 typedef base::Callback<void(const FilePath&)> FinalReleaseCallback; 28 typedef base::Callback<void(const FilePath&)> FinalReleaseCallback;
29 29
30 enum FinalReleasePolicy { 30 enum FinalReleasePolicy {
31 DELETE_ON_FINAL_RELEASE, 31 DELETE_ON_FINAL_RELEASE,
32 DONT_DELETE_ON_FINAL_RELEASE, 32 DONT_DELETE_ON_FINAL_RELEASE,
33 }; 33 };
34 34
35 // Returns a ShareableFileReference for the given path, if no reference 35 // Returns a ShareableFileReference for the given path, if no reference
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 const FinalReleasePolicy final_release_policy_; 67 const FinalReleasePolicy final_release_policy_;
68 const scoped_refptr<base::TaskRunner> file_task_runner_; 68 const scoped_refptr<base::TaskRunner> file_task_runner_;
69 std::vector<FinalReleaseCallback> final_release_callbacks_; 69 std::vector<FinalReleaseCallback> final_release_callbacks_;
70 70
71 DISALLOW_COPY_AND_ASSIGN(ShareableFileReference); 71 DISALLOW_COPY_AND_ASSIGN(ShareableFileReference);
72 }; 72 };
73 73
74 } // namespace webkit_blob 74 } // namespace webkit_blob
75 75
76 #endif // WEBKIT_BLOB_SHAREABLE_FILE_REFERENCE_H_ 76 #endif // WEBKIT_BLOB_SHAREABLE_FILE_REFERENCE_H_
OLDNEW
« no previous file with comments | « webkit/blob/local_file_stream_reader.h ('k') | webkit/blob/view_blob_internals_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698