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

Side by Side Diff: webkit/browser/fileapi/obfuscated_file_util.cc

Issue 23167002: FileAPI: Rename SandboxContext to SandboxFileSystemBackendDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 4 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/browser/fileapi/file_system_context.cc ('k') | webkit/browser/fileapi/sandbox_context.h » ('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) 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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 PlatformFileError ObfuscatedFileUtil::CreateOrOpen( 269 PlatformFileError ObfuscatedFileUtil::CreateOrOpen(
270 FileSystemOperationContext* context, 270 FileSystemOperationContext* context,
271 const FileSystemURL& url, int file_flags, 271 const FileSystemURL& url, int file_flags,
272 PlatformFile* file_handle, bool* created) { 272 PlatformFile* file_handle, bool* created) {
273 PlatformFileError error = CreateOrOpenInternal(context, url, file_flags, 273 PlatformFileError error = CreateOrOpenInternal(context, url, file_flags,
274 file_handle, created); 274 file_handle, created);
275 if (*file_handle != base::kInvalidPlatformFileValue && 275 if (*file_handle != base::kInvalidPlatformFileValue &&
276 file_flags & base::PLATFORM_FILE_WRITE && 276 file_flags & base::PLATFORM_FILE_WRITE &&
277 context->quota_limit_type() == quota::kQuotaLimitTypeUnlimited) { 277 context->quota_limit_type() == quota::kQuotaLimitTypeUnlimited) {
278 DCHECK_EQ(base::PLATFORM_FILE_OK, error); 278 DCHECK_EQ(base::PLATFORM_FILE_OK, error);
279 context->file_system_context()->sandbox_context()-> 279 context->file_system_context()->sandbox_delegate()->
280 StickyInvalidateUsageCache(url.origin(), url.type()); 280 StickyInvalidateUsageCache(url.origin(), url.type());
281 } 281 }
282 return error; 282 return error;
283 } 283 }
284 284
285 PlatformFileError ObfuscatedFileUtil::Close( 285 PlatformFileError ObfuscatedFileUtil::Close(
286 FileSystemOperationContext* context, 286 FileSystemOperationContext* context,
287 base::PlatformFile file) { 287 base::PlatformFile file) {
288 return NativeFileUtil::Close(file); 288 return NativeFileUtil::Close(file);
289 } 289 }
(...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after
1254 if (error_code) 1254 if (error_code)
1255 *error_code = base::PLATFORM_FILE_OK; 1255 *error_code = base::PLATFORM_FILE_OK;
1256 1256
1257 return path; 1257 return path;
1258 } 1258 }
1259 1259
1260 void ObfuscatedFileUtil::InvalidateUsageCache( 1260 void ObfuscatedFileUtil::InvalidateUsageCache(
1261 FileSystemOperationContext* context, 1261 FileSystemOperationContext* context,
1262 const GURL& origin, 1262 const GURL& origin,
1263 FileSystemType type) { 1263 FileSystemType type) {
1264 context->file_system_context()->sandbox_context()-> 1264 context->file_system_context()->sandbox_delegate()->
1265 InvalidateUsageCache(origin, type); 1265 InvalidateUsageCache(origin, type);
1266 } 1266 }
1267 1267
1268 void ObfuscatedFileUtil::MarkUsed() { 1268 void ObfuscatedFileUtil::MarkUsed() {
1269 if (!timer_) 1269 if (!timer_)
1270 timer_.reset(new TimedTaskHelper(file_task_runner_.get())); 1270 timer_.reset(new TimedTaskHelper(file_task_runner_.get()));
1271 1271
1272 if (timer_->IsRunning()) { 1272 if (timer_->IsRunning()) {
1273 timer_->Reset(); 1273 timer_->Reset();
1274 } else { 1274 } else {
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
1435 if (isolated_origin_.is_empty()) 1435 if (isolated_origin_.is_empty())
1436 isolated_origin_ = origin; 1436 isolated_origin_ = origin;
1437 // Record isolated_origin_, but always disable for now. 1437 // Record isolated_origin_, but always disable for now.
1438 // crbug.com/264429 1438 // crbug.com/264429
1439 return false; 1439 return false;
1440 } 1440 }
1441 return false; 1441 return false;
1442 } 1442 }
1443 1443
1444 } // namespace fileapi 1444 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/browser/fileapi/file_system_context.cc ('k') | webkit/browser/fileapi/sandbox_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698