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

Side by Side Diff: content/browser/renderer_host/pepper/quota_reservation.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 CONTENT_BROWSER_RENDERER_HOST_PEPPER_QUOTA_RESERVATION_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_QUOTA_RESERVATION_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_QUOTA_RESERVATION_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_QUOTA_RESERVATION_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // For unit testing only. A QuotaReservation intended for unit testing will 73 // For unit testing only. A QuotaReservation intended for unit testing will
74 // have file_system_context_ == NULL. 74 // have file_system_context_ == NULL.
75 QuotaReservation( 75 QuotaReservation(
76 scoped_refptr<fileapi::QuotaReservation> quota_reservation, 76 scoped_refptr<fileapi::QuotaReservation> quota_reservation,
77 const GURL& origin_url, 77 const GURL& origin_url,
78 fileapi::FileSystemType file_system_type); 78 fileapi::FileSystemType file_system_type);
79 79
80 ~QuotaReservation(); 80 ~QuotaReservation();
81 81
82 void GotReservedQuota(const ReserveQuotaCallback& callback, 82 void GotReservedQuota(const ReserveQuotaCallback& callback,
83 base::PlatformFileError error); 83 base::File::Error error);
84 84
85 void DeleteOnCorrectThread() const; 85 void DeleteOnCorrectThread() const;
86 86
87 scoped_refptr<fileapi::FileSystemContext> file_system_context_; 87 scoped_refptr<fileapi::FileSystemContext> file_system_context_;
88 scoped_refptr<fileapi::QuotaReservation> quota_reservation_; 88 scoped_refptr<fileapi::QuotaReservation> quota_reservation_;
89 typedef std::map<int32_t, fileapi::OpenFileHandle*> FileMap; 89 typedef std::map<int32_t, fileapi::OpenFileHandle*> FileMap;
90 FileMap files_; 90 FileMap files_;
91 91
92 DISALLOW_COPY_AND_ASSIGN(QuotaReservation); 92 DISALLOW_COPY_AND_ASSIGN(QuotaReservation);
93 }; 93 };
94 94
95 struct QuotaReservationDeleter { 95 struct QuotaReservationDeleter {
96 static void Destruct(const QuotaReservation* quota_reservation) { 96 static void Destruct(const QuotaReservation* quota_reservation) {
97 quota_reservation->DeleteOnCorrectThread(); 97 quota_reservation->DeleteOnCorrectThread();
98 } 98 }
99 }; 99 };
100 100
101 } // namespace content 101 } // namespace content
102 102
103 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_QUOTA_RESERVATION_H_ 103 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_QUOTA_RESERVATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698