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

Side by Side Diff: webkit/fileapi/file_system_quota.cc

Issue 3806005: FBTF: More ctor/dtor cleanup. (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: Created 10 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/fileapi/file_system_quota.h ('k') | webkit/glue/plugins/plugin_group_unittest.cc » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include "webkit/fileapi/file_system_quota.h" 5 #include "webkit/fileapi/file_system_quota.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util_proxy.h" 8 #include "base/file_util_proxy.h"
9 #include "base/ref_counted.h" 9 #include "base/ref_counted.h"
10 #include "base/scoped_callback_factory.h" 10 #include "base/scoped_callback_factory.h"
11 11
12 namespace fileapi { 12 namespace fileapi {
13 13
14 const int64 FileSystemQuota::kUnknownSize = -1; 14 const int64 FileSystemQuota::kUnknownSize = -1;
15 15
16 FileSystemQuota::FileSystemQuota() {}
17
18 FileSystemQuota::~FileSystemQuota() {}
19
16 bool FileSystemQuota::CheckOriginQuota(const GURL& origin, int64) { 20 bool FileSystemQuota::CheckOriginQuota(const GURL& origin, int64) {
17 return CheckIfOriginGrantedUnlimitedQuota(origin); 21 return CheckIfOriginGrantedUnlimitedQuota(origin);
18 } 22 }
19 23
20 void FileSystemQuota::SetOriginQuotaUnlimited(const GURL& origin) { 24 void FileSystemQuota::SetOriginQuotaUnlimited(const GURL& origin) {
21 DCHECK(origin == origin.GetOrigin()); 25 DCHECK(origin == origin.GetOrigin());
22 unlimited_quota_origins_.insert(origin); 26 unlimited_quota_origins_.insert(origin);
23 } 27 }
24 28
25 void FileSystemQuota::ResetOriginQuotaUnlimited(const GURL& origin) { 29 void FileSystemQuota::ResetOriginQuotaUnlimited(const GURL& origin) {
26 DCHECK(origin == origin.GetOrigin()); 30 DCHECK(origin == origin.GetOrigin());
27 unlimited_quota_origins_.erase(origin); 31 unlimited_quota_origins_.erase(origin);
28 } 32 }
29 33
30 bool FileSystemQuota::CheckIfOriginGrantedUnlimitedQuota(const GURL& origin) { 34 bool FileSystemQuota::CheckIfOriginGrantedUnlimitedQuota(const GURL& origin) {
31 std::set<GURL>::const_iterator found = unlimited_quota_origins_.find(origin); 35 std::set<GURL>::const_iterator found = unlimited_quota_origins_.find(origin);
32 return (found != unlimited_quota_origins_.end()); 36 return (found != unlimited_quota_origins_.end());
33 } 37 }
34 38
35 } // namespace fileapi 39 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_quota.h ('k') | webkit/glue/plugins/plugin_group_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698