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

Side by Side Diff: chrome/browser/chromeos/gdata/gdata_file_system_interface.h

Issue 10634020: [FileManager] Do drive search incrementally (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: todo Created 8 years, 5 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_GDATA_GDATA_FILE_SYSTEM_INTERFACE_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_INTERFACE_H_
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_INTERFACE_H_ 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_INTERFACE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // If |error| is not PLATFORM_FILE_OK, |directory_info| is set to NULL. 71 // If |error| is not PLATFORM_FILE_OK, |directory_info| is set to NULL.
72 typedef base::Callback<void(GDataFileError error, 72 typedef base::Callback<void(GDataFileError error,
73 bool hide_hosted_documents, 73 bool hide_hosted_documents,
74 scoped_ptr<GDataDirectoryProto> directory_proto)> 74 scoped_ptr<GDataDirectoryProto> directory_proto)>
75 ReadDirectoryCallback; 75 ReadDirectoryCallback;
76 76
77 // Used to get drive content search results. 77 // Used to get drive content search results.
78 // If |error| is not PLATFORM_FILE_OK, |result_paths| is empty. 78 // If |error| is not PLATFORM_FILE_OK, |result_paths| is empty.
79 typedef base::Callback<void( 79 typedef base::Callback<void(
80 GDataFileError error, 80 GDataFileError error,
81 const GURL& next_feed,
81 scoped_ptr<std::vector<SearchResultInfo> > result_paths)> SearchCallback; 82 scoped_ptr<std::vector<SearchResultInfo> > result_paths)> SearchCallback;
82 83
83 // Used to open files from the file system. |file_path| is the path on the local 84 // Used to open files from the file system. |file_path| is the path on the local
84 // file system for the opened file. 85 // file system for the opened file.
85 typedef base::Callback<void(GDataFileError error, 86 typedef base::Callback<void(GDataFileError error,
86 const FilePath& file_path)> OpenFileCallback; 87 const FilePath& file_path)> OpenFileCallback;
87 88
88 // Used to get available space for the account from GData. 89 // Used to get available space for the account from GData.
89 typedef base::Callback<void(GDataFileError error, 90 typedef base::Callback<void(GDataFileError error,
90 int64 bytes_total, 91 int64 bytes_total,
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 // 326 //
326 // Upon success, the metadata of files in the target directory is updated, 327 // Upon success, the metadata of files in the target directory is updated,
327 // and the change is notified via Observer::OnDirectoryChanged(). Note that 328 // and the change is notified via Observer::OnDirectoryChanged(). Note that
328 // this function ignores changes in directories in the target 329 // this function ignores changes in directories in the target
329 // directory. Changes in directories are handled via the delta feeds. 330 // directory. Changes in directories are handled via the delta feeds.
330 // 331 //
331 // Can be called from UI/IO thread. 332 // Can be called from UI/IO thread.
332 virtual void RequestDirectoryRefresh(const FilePath& file_path) = 0; 333 virtual void RequestDirectoryRefresh(const FilePath& file_path) = 0;
333 334
334 // Does server side content search for |search_query|. 335 // Does server side content search for |search_query|.
336 // If |next_feed| is set, this is the feed url that will be fetched.
335 // Search results will be returned as a list of results' |SearchResultInfo| 337 // Search results will be returned as a list of results' |SearchResultInfo|
336 // structs, which contains file's path and is_directory flag. 338 // structs, which contains file's path and is_directory flag.
337 // 339 //
338 // Can be called from UI/IO thread. |callback| is run on the calling thread. 340 // Can be called from UI/IO thread. |callback| is run on the calling thread.
339 virtual void Search(const std::string& search_query, 341 virtual void Search(const std::string& search_query,
342 const GURL& next_feed,
340 const SearchCallback& callback) = 0; 343 const SearchCallback& callback) = 0;
341 344
342 // Fetches the user's Account Metadata to find out current quota information 345 // Fetches the user's Account Metadata to find out current quota information
343 // and returns it to the callback. 346 // and returns it to the callback.
344 virtual void GetAvailableSpace(const GetAvailableSpaceCallback& callback) = 0; 347 virtual void GetAvailableSpace(const GetAvailableSpaceCallback& callback) = 0;
345 348
346 // Adds a file entry from |entry| under |virtual_dir_path|, and modifies 349 // Adds a file entry from |entry| under |virtual_dir_path|, and modifies
347 // the cache state. 350 // the cache state.
348 // 351 //
349 // When uploading a new file, adds a new file entry, and store its content 352 // When uploading a new file, adds a new file entry, and store its content
350 // from |file_content_path| into the cache. 353 // from |file_content_path| into the cache.
351 // 354 //
352 // When uploading an existing file, replaces the file entry with a new one, 355 // When uploading an existing file, replaces the file entry with a new one,
353 // and clears the dirty bit in the cache. 356 // and clears the dirty bit in the cache.
354 // 357 //
355 // |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.
356 virtual void AddUploadedFile(UploadMode upload_mode, 359 virtual void AddUploadedFile(UploadMode upload_mode,
357 const FilePath& virtual_dir_path, 360 const FilePath& virtual_dir_path,
358 scoped_ptr<DocumentEntry> entry, 361 scoped_ptr<DocumentEntry> entry,
359 const FilePath& file_content_path, 362 const FilePath& file_content_path,
360 GDataCache::FileOperationType cache_operation, 363 GDataCache::FileOperationType cache_operation,
361 const base::Closure& callback) = 0; 364 const base::Closure& callback) = 0;
362 }; 365 };
363 366
364 } // namespace gdata 367 } // namespace gdata
365 368
366 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_INTERFACE_H_ 369 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_INTERFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698