| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser/fileapi/obfuscated_file_util.h" | 5 #include "webkit/browser/fileapi/obfuscated_file_util.h" |
| 6 | 6 |
| 7 #include <queue> | 7 #include <queue> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 } | 268 } |
| 269 | 269 |
| 270 ObfuscatedFileUtil::~ObfuscatedFileUtil() { | 270 ObfuscatedFileUtil::~ObfuscatedFileUtil() { |
| 271 DropDatabases(); | 271 DropDatabases(); |
| 272 } | 272 } |
| 273 | 273 |
| 274 base::File ObfuscatedFileUtil::CreateOrOpen( | 274 base::File ObfuscatedFileUtil::CreateOrOpen( |
| 275 FileSystemOperationContext* context, | 275 FileSystemOperationContext* context, |
| 276 const FileSystemURL& url, int file_flags) { | 276 const FileSystemURL& url, int file_flags) { |
| 277 base::File file = CreateOrOpenInternal(context, url, file_flags); | 277 base::File file = CreateOrOpenInternal(context, url, file_flags); |
| 278 if (file.IsValid() && file_flags & base::PLATFORM_FILE_WRITE && | 278 if (file.IsValid() && file_flags & base::File::FLAG_WRITE && |
| 279 context->quota_limit_type() == quota::kQuotaLimitTypeUnlimited && | 279 context->quota_limit_type() == quota::kQuotaLimitTypeUnlimited && |
| 280 sandbox_delegate_) { | 280 sandbox_delegate_) { |
| 281 sandbox_delegate_->StickyInvalidateUsageCache(url.origin(), url.type()); | 281 sandbox_delegate_->StickyInvalidateUsageCache(url.origin(), url.type()); |
| 282 } | 282 } |
| 283 return file.Pass(); | 283 return file.Pass(); |
| 284 } | 284 } |
| 285 | 285 |
| 286 base::File::Error ObfuscatedFileUtil::EnsureFileExists( | 286 base::File::Error ObfuscatedFileUtil::EnsureFileExists( |
| 287 FileSystemOperationContext* context, | 287 FileSystemOperationContext* context, |
| 288 const FileSystemURL& url, | 288 const FileSystemURL& url, |
| (...skipping 1125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1414 } | 1414 } |
| 1415 return file.Pass(); | 1415 return file.Pass(); |
| 1416 } | 1416 } |
| 1417 | 1417 |
| 1418 bool ObfuscatedFileUtil::HasIsolatedStorage(const GURL& origin) { | 1418 bool ObfuscatedFileUtil::HasIsolatedStorage(const GURL& origin) { |
| 1419 return special_storage_policy_.get() && | 1419 return special_storage_policy_.get() && |
| 1420 special_storage_policy_->HasIsolatedStorage(origin); | 1420 special_storage_policy_->HasIsolatedStorage(origin); |
| 1421 } | 1421 } |
| 1422 | 1422 |
| 1423 } // namespace fileapi | 1423 } // namespace fileapi |
| OLD | NEW |