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

Side by Side Diff: chrome/browser/chromeos/drive/file_system.h

Issue 16628003: drive: Remove FileCacheObserver::OnCacheCommitted (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
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 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_H_
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_H_ 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 const FileOperationCallback& callback) OVERRIDE; 156 const FileOperationCallback& callback) OVERRIDE;
157 virtual void GetCacheEntryByResourceId( 157 virtual void GetCacheEntryByResourceId(
158 const std::string& resource_id, 158 const std::string& resource_id,
159 const std::string& md5, 159 const std::string& md5,
160 const GetCacheEntryCallback& callback) OVERRIDE; 160 const GetCacheEntryCallback& callback) OVERRIDE;
161 virtual void Reload() OVERRIDE; 161 virtual void Reload() OVERRIDE;
162 162
163 // file_system::OperationObserver overrides. 163 // file_system::OperationObserver overrides.
164 virtual void OnDirectoryChangedByOperation( 164 virtual void OnDirectoryChangedByOperation(
165 const base::FilePath& directory_path) OVERRIDE; 165 const base::FilePath& directory_path) OVERRIDE;
166 virtual void OnCacheFileUploadNeededByOperation(
167 const std::string& resource_id) OVERRIDE;
166 168
167 // ChangeListLoader::Observer overrides. 169 // ChangeListLoader::Observer overrides.
168 // Used to propagate events from ChangeListLoader. 170 // Used to propagate events from ChangeListLoader.
169 virtual void OnDirectoryChanged( 171 virtual void OnDirectoryChanged(
170 const base::FilePath& directory_path) OVERRIDE; 172 const base::FilePath& directory_path) OVERRIDE;
171 virtual void OnLoadFromServerComplete() OVERRIDE; 173 virtual void OnLoadFromServerComplete() OVERRIDE;
172 virtual void OnInitialLoadComplete() OVERRIDE; 174 virtual void OnInitialLoadComplete() OVERRIDE;
173 175
174 // Used in tests to update the file system using the change list loader. 176 // Used in tests to update the file system using the change list loader.
175 internal::ChangeListLoader* change_list_loader() { 177 internal::ChangeListLoader* change_list_loader() {
176 return change_list_loader_.get(); 178 return change_list_loader_.get();
177 } 179 }
178 180
179 private: 181 private:
180 friend class DriveFileSystemTest; 182 friend class FileSystemTest;
kinaba 2013/06/11 07:08:37 Good catch. Do we need this friend declaration at
hashimoto 2013/06/11 07:37:57 Sounds good, done. Maybe we should make a patch to
181 183
182 // Used to implement Reload(). 184 // Used to implement Reload().
183 void ReloadAfterReset(FileError error); 185 void ReloadAfterReset(FileError error);
184 186
185 // Sets up ChangeListLoader. 187 // Sets up ChangeListLoader.
186 void SetupChangeListLoader(); 188 void SetupChangeListLoader();
187 189
188 // Called on preference change. 190 // Called on preference change.
189 void OnDisableDriveHostedFilesChanged(); 191 void OnDisableDriveHostedFilesChanged();
190 192
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 // Invoked during the process of CloseFile. What is done here is as follows: 234 // Invoked during the process of CloseFile. What is done here is as follows:
233 // 1) Gets resource_id and md5 of the entry at |file_path|. 235 // 1) Gets resource_id and md5 of the entry at |file_path|.
234 // 2) Commits the modification to the cache system. 236 // 2) Commits the modification to the cache system.
235 // 3) Removes the |file_path| from the remembered set of opened files. 237 // 3) Removes the |file_path| from the remembered set of opened files.
236 // 4) Invokes the user-supplied |callback|. 238 // 4) Invokes the user-supplied |callback|.
237 // |callback| must not be null. 239 // |callback| must not be null.
238 void CloseFileAfterGetResourceEntry(const base::FilePath& file_path, 240 void CloseFileAfterGetResourceEntry(const base::FilePath& file_path,
239 const FileOperationCallback& callback, 241 const FileOperationCallback& callback,
240 FileError error, 242 FileError error,
241 scoped_ptr<ResourceEntry> entry); 243 scoped_ptr<ResourceEntry> entry);
242 void CloseFileFinalize(const base::FilePath& file_path,
243 const FileOperationCallback& callback,
244 FileError result);
245 244
246 // Callback for handling about resource fetch. 245 // Callback for handling about resource fetch.
247 void OnGetAboutResource( 246 void OnGetAboutResource(
248 const GetAvailableSpaceCallback& callback, 247 const GetAvailableSpaceCallback& callback,
249 google_apis::GDataErrorCode status, 248 google_apis::GDataErrorCode status,
250 scoped_ptr<google_apis::AboutResource> about_resource); 249 scoped_ptr<google_apis::AboutResource> about_resource);
251 250
252 // Part of CheckForUpdates(). Called when 251 // Part of CheckForUpdates(). Called when
253 // ChangeListLoader::CheckForUpdates() is complete. 252 // ChangeListLoader::CheckForUpdates() is complete.
254 void OnUpdateChecked(FileError error); 253 void OnUpdateChecked(FileError error);
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 // Note: This should remain the last member so it'll be destroyed and 394 // Note: This should remain the last member so it'll be destroyed and
396 // invalidate the weak pointers before any other members are destroyed. 395 // invalidate the weak pointers before any other members are destroyed.
397 base::WeakPtrFactory<FileSystem> weak_ptr_factory_; 396 base::WeakPtrFactory<FileSystem> weak_ptr_factory_;
398 397
399 DISALLOW_COPY_AND_ASSIGN(FileSystem); 398 DISALLOW_COPY_AND_ASSIGN(FileSystem);
400 }; 399 };
401 400
402 } // namespace drive 401 } // namespace drive
403 402
404 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_H_ 403 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698