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

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

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
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 #ifndef COMPONENTS_DRIVE_CHROMEOS_FAKE_FILE_SYSTEM_H_ 5 #ifndef COMPONENTS_DRIVE_CHROMEOS_FAKE_FILE_SYSTEM_H_
6 #define COMPONENTS_DRIVE_CHROMEOS_FAKE_FILE_SYSTEM_H_ 6 #define COMPONENTS_DRIVE_CHROMEOS_FAKE_FILE_SYSTEM_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 void SetProperty(const base::FilePath& drive_file_path, 123 void SetProperty(const base::FilePath& drive_file_path,
124 google_apis::drive::Property::Visibility visibility, 124 google_apis::drive::Property::Visibility visibility,
125 const std::string& key, 125 const std::string& key,
126 const std::string& value, 126 const std::string& value,
127 const FileOperationCallback& callback) override; 127 const FileOperationCallback& callback) override;
128 void Reset(const FileOperationCallback& callback) override; 128 void Reset(const FileOperationCallback& callback) override;
129 void GetPathFromResourceId(const std::string& resource_id, 129 void GetPathFromResourceId(const std::string& resource_id,
130 const GetFilePathCallback& callback) override; 130 const GetFilePathCallback& callback) override;
131 void FreeDiskSpaceIfNeededFor(int64_t num_bytes, 131 void FreeDiskSpaceIfNeededFor(int64_t num_bytes,
132 const FreeDiskSpaceCallback& callback) override; 132 const FreeDiskSpaceCallback& callback) override;
133 void CalculateEvictableCacheSize( 133 void CalculateCacheSize(const CacheSizeCallback& callback) override;
134 const EvictableCacheSizeCallback& callback) override; 134 void CalculateEvictableCacheSize(const CacheSizeCallback& callback) override;
135 135
136 private: 136 private:
137 // Helpers of GetFileContent. 137 // Helpers of GetFileContent.
138 // How the method works: 138 // How the method works:
139 // 1) Gets ResourceEntry of the path. 139 // 1) Gets ResourceEntry of the path.
140 // 2) Look at if there is a cache file or not. If found return it. 140 // 2) Look at if there is a cache file or not. If found return it.
141 // 3) Otherwise start DownloadFile. 141 // 3) Otherwise start DownloadFile.
142 // 4) Runs the |completion_callback| upon the download completion. 142 // 4) Runs the |completion_callback| upon the download completion.
143 void GetFileContentAfterGetResourceEntry( 143 void GetFileContentAfterGetResourceEntry(
144 const GetFileContentInitializedCallback& initialized_callback, 144 const GetFileContentInitializedCallback& initialized_callback,
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 // invalidate the weak pointers before any other members are destroyed. 190 // invalidate the weak pointers before any other members are destroyed.
191 base::WeakPtrFactory<FakeFileSystem> weak_ptr_factory_; 191 base::WeakPtrFactory<FakeFileSystem> weak_ptr_factory_;
192 192
193 DISALLOW_COPY_AND_ASSIGN(FakeFileSystem); 193 DISALLOW_COPY_AND_ASSIGN(FakeFileSystem);
194 }; 194 };
195 195
196 } // namespace test_util 196 } // namespace test_util
197 } // namespace drive 197 } // namespace drive
198 198
199 #endif // COMPONENTS_DRIVE_CHROMEOS_FAKE_FILE_SYSTEM_H_ 199 #endif // COMPONENTS_DRIVE_CHROMEOS_FAKE_FILE_SYSTEM_H_
OLDNEW
« no previous file with comments | « components/drive/chromeos/dummy_file_system.h ('k') | components/drive/chromeos/fake_file_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698