OLD | NEW |
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_GDATA_DRIVE_FILE_SYSTEM_INTERFACE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_FILE_SYSTEM_INTERFACE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_FILE_SYSTEM_INTERFACE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_FILE_SYSTEM_INTERFACE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 // | 328 // |
329 // Can be called from UI/IO thread. |callback| is run on the calling thread. | 329 // Can be called from UI/IO thread. |callback| is run on the calling thread. |
330 virtual void Search(const std::string& search_query, | 330 virtual void Search(const std::string& search_query, |
331 const GURL& next_feed, | 331 const GURL& next_feed, |
332 const SearchCallback& callback) = 0; | 332 const SearchCallback& callback) = 0; |
333 | 333 |
334 // Fetches the user's Account Metadata to find out current quota information | 334 // Fetches the user's Account Metadata to find out current quota information |
335 // and returns it to the callback. | 335 // and returns it to the callback. |
336 virtual void GetAvailableSpace(const GetAvailableSpaceCallback& callback) = 0; | 336 virtual void GetAvailableSpace(const GetAvailableSpaceCallback& callback) = 0; |
337 | 337 |
338 // Adds a file entry from |entry| under |virtual_dir_path|, and modifies | 338 // Adds a file entry from |doc_entry| under |directory_path|, and modifies |
339 // the cache state. | 339 // the cache state. |
340 // | 340 // |
341 // When uploading a new file, adds a new file entry, and store its content | 341 // When uploading a new file, adds a new file entry, and store its content |
342 // from |file_content_path| into the cache. | 342 // from |file_content_path| into the cache. |
343 // | 343 // |
344 // When uploading an existing file, replaces the file entry with a new one, | 344 // When uploading an existing file, replaces the file entry with a new one, |
345 // and clears the dirty bit in the cache. | 345 // and clears the dirty bit in the cache. |
346 // | 346 // |
347 // |callback| will be called on the UI thread upon completion of operation. | 347 // |callback| will be called on the UI thread upon completion of operation. |
348 virtual void AddUploadedFile(UploadMode upload_mode, | 348 virtual void AddUploadedFile(UploadMode upload_mode, |
349 const FilePath& virtual_dir_path, | 349 const FilePath& directory_path, |
350 scoped_ptr<DocumentEntry> entry, | 350 scoped_ptr<DocumentEntry> doc_entry, |
351 const FilePath& file_content_path, | 351 const FilePath& file_content_path, |
352 DriveCache::FileOperationType cache_operation, | 352 DriveCache::FileOperationType cache_operation, |
353 const base::Closure& callback) = 0; | 353 const base::Closure& callback) = 0; |
354 | 354 |
355 // Updates the data associated with the file referenced by |resource_id| and | 355 // Updates the data associated with the file referenced by |resource_id| and |
356 // |md5|. The data is copied from |file_content_path|. | 356 // |md5|. The data is copied from |file_content_path|. |
357 // | 357 // |
358 // |callback| will be called on the UI thread upon completion of operation. | 358 // |callback| will be called on the UI thread upon completion of operation. |
359 virtual void UpdateEntryData(const std::string& resource_id, | 359 virtual void UpdateEntryData(const std::string& resource_id, |
360 const std::string& md5, | 360 const std::string& md5, |
361 scoped_ptr<DocumentEntry> entry, | 361 scoped_ptr<DocumentEntry> entry, |
362 const FilePath& file_content_path, | 362 const FilePath& file_content_path, |
363 const base::Closure& callback) = 0; | 363 const base::Closure& callback) = 0; |
364 }; | 364 }; |
365 | 365 |
366 } // namespace gdata | 366 } // namespace gdata |
367 | 367 |
368 #endif // CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_FILE_SYSTEM_INTERFACE_H_ | 368 #endif // CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_FILE_SYSTEM_INTERFACE_H_ |
OLD | NEW |