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

Side by Side Diff: webkit/browser/fileapi/quota/quota_reservation_buffer.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_QUOTA_QUOTA_RESERVATION_BUFFER_H_ 5 #ifndef WEBKIT_BROWSER_FILEAPI_QUOTA_QUOTA_RESERVATION_BUFFER_H_
6 #define WEBKIT_BROWSER_FILEAPI_QUOTA_QUOTA_RESERVATION_BUFFER_H_ 6 #define WEBKIT_BROWSER_FILEAPI_QUOTA_QUOTA_RESERVATION_BUFFER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/files/file.h"
11 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
12 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
13 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
14 #include "base/platform_file.h"
15 #include "url/gurl.h" 15 #include "url/gurl.h"
16 #include "webkit/browser/webkit_storage_browser_export.h" 16 #include "webkit/browser/webkit_storage_browser_export.h"
17 #include "webkit/common/fileapi/file_system_types.h" 17 #include "webkit/common/fileapi/file_system_types.h"
18 18
19 namespace fileapi { 19 namespace fileapi {
20 20
21 class QuotaReservation; 21 class QuotaReservation;
22 class OpenFileHandle; 22 class OpenFileHandle;
23 class OpenFileHandleContext; 23 class OpenFileHandleContext;
24 class QuotaReservationManager; 24 class QuotaReservationManager;
(...skipping 28 matching lines...) Expand all
53 FileSystemType type() const { return type_; } 53 FileSystemType type() const { return type_; }
54 54
55 private: 55 private:
56 friend class base::RefCounted<QuotaReservationBuffer>; 56 friend class base::RefCounted<QuotaReservationBuffer>;
57 virtual ~QuotaReservationBuffer(); 57 virtual ~QuotaReservationBuffer();
58 58
59 static bool DecrementDirtyCount( 59 static bool DecrementDirtyCount(
60 base::WeakPtr<QuotaReservationManager> reservation_manager, 60 base::WeakPtr<QuotaReservationManager> reservation_manager,
61 const GURL& origin, 61 const GURL& origin,
62 FileSystemType type, 62 FileSystemType type,
63 base::PlatformFileError error); 63 base::File::Error error);
64 64
65 typedef std::map<base::FilePath, OpenFileHandleContext*> 65 typedef std::map<base::FilePath, OpenFileHandleContext*>
66 OpenFileHandleContextByPath; 66 OpenFileHandleContextByPath;
67 67
68 // Not owned. The destructor of OpenFileHandler should erase itself from 68 // Not owned. The destructor of OpenFileHandler should erase itself from
69 // |open_files_|. 69 // |open_files_|.
70 OpenFileHandleContextByPath open_files_; 70 OpenFileHandleContextByPath open_files_;
71 71
72 base::WeakPtr<QuotaReservationManager> reservation_manager_; 72 base::WeakPtr<QuotaReservationManager> reservation_manager_;
73 73
74 GURL origin_; 74 GURL origin_;
75 fileapi::FileSystemType type_; 75 fileapi::FileSystemType type_;
76 76
77 int64 reserved_quota_; 77 int64 reserved_quota_;
78 78
79 base::SequenceChecker sequence_checker_; 79 base::SequenceChecker sequence_checker_;
80 80
81 DISALLOW_COPY_AND_ASSIGN(QuotaReservationBuffer); 81 DISALLOW_COPY_AND_ASSIGN(QuotaReservationBuffer);
82 }; 82 };
83 83
84 } // namespace fileapi 84 } // namespace fileapi
85 85
86 #endif // WEBKIT_BROWSER_FILEAPI_QUOTA_QUOTA_RESERVATION_BUFFER_H_ 86 #endif // WEBKIT_BROWSER_FILEAPI_QUOTA_QUOTA_RESERVATION_BUFFER_H_
OLDNEW
« no previous file with comments | « webkit/browser/fileapi/quota/quota_reservation.cc ('k') | webkit/browser/fileapi/quota/quota_reservation_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698