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

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

Issue 6609009: Remove FileSystemQuotaManager class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test fix Created 9 years, 9 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "webkit/fileapi/file_system_quota_manager.h"
6
7 #include "base/file_path.h"
8 #include "base/file_util_proxy.h"
9 #include "base/ref_counted.h"
10 #include "base/scoped_callback_factory.h"
11 #include "webkit/quota/special_storage_policy.h"
12
13 namespace fileapi {
14
15 const int64 FileSystemQuotaManager::kUnknownSize = -1;
16
17 FileSystemQuotaManager::FileSystemQuotaManager(
18 bool allow_file_access_from_files,
19 bool unlimited_quota,
20 quota::SpecialStoragePolicy* special_storage_policy)
21 : allow_file_access_from_files_(allow_file_access_from_files),
22 unlimited_quota_(unlimited_quota),
23 special_storage_policy_(special_storage_policy) {
24 }
25
26 FileSystemQuotaManager::~FileSystemQuotaManager() {}
27
28 bool FileSystemQuotaManager::CheckOriginQuota(const GURL& origin, int64) {
29 // If allow-file-access-from-files flag is explicitly given and the scheme
30 // is file, or if unlimited quota for this process was explicitly requested,
31 // return true.
32 return unlimited_quota_ ||
33 (allow_file_access_from_files_ && origin.SchemeIsFile()) ||
34 (special_storage_policy_.get() &&
35 special_storage_policy_->IsStorageUnlimited(origin));
36 }
37
38 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_quota_manager.h ('k') | webkit/fileapi/file_system_quota_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698