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

Side by Side Diff: storage/browser/blob/shareable_file_reference.h

Issue 810403004: [Storage] Blob Storage Refactoring pt 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed copyright Created 5 years, 11 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_COMMON_BLOB_SHAREABLE_FILE_REFERENCE_H_ 5 #ifndef STORAGE_BROWSER_BLOB_SHAREABLE_FILE_REFERENCE_H_
6 #define STORAGE_COMMON_BLOB_SHAREABLE_FILE_REFERENCE_H_ 6 #define STORAGE_BROWSER_BLOB_SHAREABLE_FILE_REFERENCE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "storage/common/blob/scoped_file.h" 10 #include "storage/browser/blob/scoped_file.h"
11 #include "storage/browser/storage_browser_export.h"
11 12
12 namespace storage { 13 namespace storage {
13 14
14 // ShareableFileReference allows consumers to share FileReference for the 15 // ShareableFileReference allows consumers to share FileReference for the
15 // same path if it already exists in its internal map. 16 // same path if it already exists in its internal map.
16 // This class is non-thread-safe and all methods must be called on a single 17 // This class is non-thread-safe and all methods must be called on a single
17 // thread. 18 // thread.
18 class STORAGE_COMMON_EXPORT ShareableFileReference 19 class STORAGE_EXPORT ShareableFileReference
19 : public base::RefCounted<ShareableFileReference> { 20 : public base::RefCounted<ShareableFileReference> {
20 public: 21 public:
21 typedef ScopedFile::ScopeOutCallback FinalReleaseCallback; 22 typedef ScopedFile::ScopeOutCallback FinalReleaseCallback;
22 23
23 enum FinalReleasePolicy { 24 enum FinalReleasePolicy {
24 DELETE_ON_FINAL_RELEASE = ScopedFile::DELETE_ON_SCOPE_OUT, 25 DELETE_ON_FINAL_RELEASE = ScopedFile::DELETE_ON_SCOPE_OUT,
25 DONT_DELETE_ON_FINAL_RELEASE = ScopedFile::DONT_DELETE_ON_SCOPE_OUT, 26 DONT_DELETE_ON_FINAL_RELEASE = ScopedFile::DONT_DELETE_ON_SCOPE_OUT,
26 }; 27 };
27 28
28 // Returns a ShareableFileReference for the given path, if no reference 29 // Returns a ShareableFileReference for the given path, if no reference
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 ShareableFileReference(ScopedFile scoped_file); 65 ShareableFileReference(ScopedFile scoped_file);
65 ~ShareableFileReference(); 66 ~ShareableFileReference();
66 67
67 ScopedFile scoped_file_; 68 ScopedFile scoped_file_;
68 69
69 DISALLOW_COPY_AND_ASSIGN(ShareableFileReference); 70 DISALLOW_COPY_AND_ASSIGN(ShareableFileReference);
70 }; 71 };
71 72
72 } // namespace storage 73 } // namespace storage
73 74
74 #endif // STORAGE_COMMON_BLOB_SHAREABLE_FILE_REFERENCE_H_ 75 #endif // STORAGE_BROWSER_BLOB_SHAREABLE_FILE_REFERENCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698