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

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

Powered by Google App Engine
This is Rietveld 408576698