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

Side by Side Diff: components/drive/chromeos/fake_file_system.cc

Issue 2048993002: Add an API to get total size of Drive cache including non-evictable ones. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove an unnecessary parameter. Created 4 years, 6 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
« no previous file with comments | « components/drive/chromeos/fake_file_system.h ('k') | components/drive/chromeos/file_cache.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "components/drive/chromeos/fake_file_system.h" 5 #include "components/drive/chromeos/fake_file_system.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 const GetFilePathCallback& callback) { 246 const GetFilePathCallback& callback) {
247 DCHECK_CURRENTLY_ON(BrowserThread::UI); 247 DCHECK_CURRENTLY_ON(BrowserThread::UI);
248 } 248 }
249 249
250 void FakeFileSystem::FreeDiskSpaceIfNeededFor( 250 void FakeFileSystem::FreeDiskSpaceIfNeededFor(
251 int64_t num_bytes, 251 int64_t num_bytes,
252 const FreeDiskSpaceCallback& callback) { 252 const FreeDiskSpaceCallback& callback) {
253 DCHECK_CURRENTLY_ON(BrowserThread::UI); 253 DCHECK_CURRENTLY_ON(BrowserThread::UI);
254 } 254 }
255 255
256 void FakeFileSystem::CalculateCacheSize(const CacheSizeCallback& callback) {
257 DCHECK_CURRENTLY_ON(BrowserThread::UI);
258 }
259
256 void FakeFileSystem::CalculateEvictableCacheSize( 260 void FakeFileSystem::CalculateEvictableCacheSize(
257 const EvictableCacheSizeCallback& callback) { 261 const CacheSizeCallback& callback) {
258 DCHECK_CURRENTLY_ON(BrowserThread::UI); 262 DCHECK_CURRENTLY_ON(BrowserThread::UI);
259 } 263 }
260 264
261 // Implementation of GetFileContent. 265 // Implementation of GetFileContent.
262 void FakeFileSystem::GetFileContentAfterGetResourceEntry( 266 void FakeFileSystem::GetFileContentAfterGetResourceEntry(
263 const GetFileContentInitializedCallback& initialized_callback, 267 const GetFileContentInitializedCallback& initialized_callback,
264 const google_apis::GetContentCallback& get_content_callback, 268 const google_apis::GetContentCallback& get_content_callback,
265 const FileOperationCallback& completion_callback, 269 const FileOperationCallback& completion_callback,
266 FileError error, 270 FileError error,
267 std::unique_ptr<ResourceEntry> entry) { 271 std::unique_ptr<ResourceEntry> entry) {
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 callback.Run(FILE_ERROR_OK, std::move(entry)); 418 callback.Run(FILE_ERROR_OK, std::move(entry));
415 return; 419 return;
416 } 420 }
417 } 421 }
418 422
419 callback.Run(FILE_ERROR_NOT_FOUND, std::unique_ptr<ResourceEntry>()); 423 callback.Run(FILE_ERROR_NOT_FOUND, std::unique_ptr<ResourceEntry>());
420 } 424 }
421 425
422 } // namespace test_util 426 } // namespace test_util
423 } // namespace drive 427 } // namespace drive
OLDNEW
« no previous file with comments | « components/drive/chromeos/fake_file_system.h ('k') | components/drive/chromeos/file_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698