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

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

Issue 10407115: Always pass FileSystemContext to ObfuscatedFileUtil operations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: build fix Created 8 years, 7 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_util.h ('k') | webkit/fileapi/sandbox_mount_point_provider.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/fileapi/file_system_test_helper.h" 5 #include "webkit/fileapi/file_system_test_helper.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/message_loop_proxy.h" 9 #include "base/message_loop_proxy.h"
10 #include "googleurl/src/gurl.h" 10 #include "googleurl/src/gurl.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 152
153 base::PlatformFileError FileSystemTestOriginHelper::SameFileUtilMove( 153 base::PlatformFileError FileSystemTestOriginHelper::SameFileUtilMove(
154 FileSystemOperationContext* context, 154 FileSystemOperationContext* context,
155 const FileSystemPath& src, 155 const FileSystemPath& src,
156 const FileSystemPath& dest) const { 156 const FileSystemPath& dest) const {
157 return FileUtilHelper::Move(context, file_util(), file_util(), src, dest); 157 return FileUtilHelper::Move(context, file_util(), file_util(), src, dest);
158 } 158 }
159 159
160 int64 FileSystemTestOriginHelper::GetCachedOriginUsage() const { 160 int64 FileSystemTestOriginHelper::GetCachedOriginUsage() const {
161 return file_system_context_->GetQuotaUtil(type_)->GetOriginUsageOnFileThread( 161 return file_system_context_->GetQuotaUtil(type_)->GetOriginUsageOnFileThread(
162 origin_, type_); 162 file_system_context_, origin_, type_);
163 } 163 }
164 164
165 int64 FileSystemTestOriginHelper::ComputeCurrentOriginUsage() const { 165 int64 FileSystemTestOriginHelper::ComputeCurrentOriginUsage() const {
166 int64 size = file_util::ComputeDirectorySize(GetOriginRootPath()); 166 int64 size = file_util::ComputeDirectorySize(GetOriginRootPath());
167 if (file_util::PathExists(GetUsageCachePath())) 167 if (file_util::PathExists(GetUsageCachePath()))
168 size -= FileSystemUsageCache::kUsageFileSize; 168 size -= FileSystemUsageCache::kUsageFileSize;
169 return size; 169 return size;
170 } 170 }
171 171
172 int64 FileSystemTestOriginHelper::ComputeCurrentDirectoryDatabaseUsage() const { 172 int64 FileSystemTestOriginHelper::ComputeCurrentDirectoryDatabaseUsage() const {
(...skipping 11 matching lines...) Expand all
184 } 184 }
185 185
186 FileSystemOperationContext* FileSystemTestOriginHelper::NewOperationContext() { 186 FileSystemOperationContext* FileSystemTestOriginHelper::NewOperationContext() {
187 DCHECK(file_system_context_.get()); 187 DCHECK(file_system_context_.get());
188 FileSystemOperationContext* context = 188 FileSystemOperationContext* context =
189 new FileSystemOperationContext(file_system_context_.get()); 189 new FileSystemOperationContext(file_system_context_.get());
190 return context; 190 return context;
191 } 191 }
192 192
193 } // namespace fileapi 193 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_quota_util.h ('k') | webkit/fileapi/sandbox_mount_point_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698