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

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

Issue 14884015: drive: Remove DriveFileType (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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_INTERFACE_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_INTERFACE_H_
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_INTERFACE_H_ 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_INTERFACE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "chrome/browser/chromeos/drive/drive.pb.h" 12 #include "chrome/browser/chromeos/drive/drive.pb.h"
13 #include "chrome/browser/chromeos/drive/file_cache.h" 13 #include "chrome/browser/chromeos/drive/file_cache.h"
14 #include "chrome/browser/chromeos/drive/file_system_metadata.h" 14 #include "chrome/browser/chromeos/drive/file_system_metadata.h"
15 #include "chrome/browser/chromeos/drive/resource_metadata.h" 15 #include "chrome/browser/chromeos/drive/resource_metadata.h"
16 #include "chrome/browser/google_apis/gdata_wapi_operations.h" 16 #include "chrome/browser/google_apis/gdata_wapi_operations.h"
17 17
18 namespace google_apis { 18 namespace google_apis {
19 class ResourceEntry; 19 class ResourceEntry;
20 } 20 }
21 21
22 namespace drive { 22 namespace drive {
23 23
24 class FileSystemObserver; 24 class FileSystemObserver;
25 25
26 typedef std::vector<ResourceEntry> ResourceEntryVector; 26 typedef std::vector<ResourceEntry> ResourceEntryVector;
27 27
28 // File type on the drive file system can be either a regular file or
29 // a hosted document.
30 enum DriveFileType {
31 REGULAR_FILE,
32 HOSTED_DOCUMENT,
33 };
34
35 // Information about search result returned by Search Async callback. 28 // Information about search result returned by Search Async callback.
36 // This is data needed to create a file system entry that will be used by file 29 // This is data needed to create a file system entry that will be used by file
37 // browser. 30 // browser.
38 struct SearchResultInfo { 31 struct SearchResultInfo {
39 SearchResultInfo(const base::FilePath& path, 32 SearchResultInfo(const base::FilePath& path,
40 const ResourceEntry& entry) 33 const ResourceEntry& entry)
41 : path(path), 34 : path(path),
42 entry(entry) { 35 entry(entry) {
43 } 36 }
44 37
(...skipping 25 matching lines...) Expand all
70 // 63 //
71 // Why <b> instead of <strong>? Because <b> is shorter. 64 // Why <b> instead of <strong>? Because <b> is shorter.
72 std::string highlighted_base_name; 65 std::string highlighted_base_name;
73 }; 66 };
74 67
75 typedef std::vector<MetadataSearchResult> MetadataSearchResultVector; 68 typedef std::vector<MetadataSearchResult> MetadataSearchResultVector;
76 69
77 // Used to get files from the file system. 70 // Used to get files from the file system.
78 typedef base::Callback<void(FileError error, 71 typedef base::Callback<void(FileError error,
79 const base::FilePath& file_path, 72 const base::FilePath& file_path,
80 const std::string& mime_type, 73 scoped_ptr<ResourceEntry> entry)> GetFileCallback;
81 DriveFileType file_type)> GetFileCallback;
82 74
83 // Used to get file content from the file system. 75 // Used to get file content from the file system.
84 // If the file content is available in local cache, |local_file| is filled with 76 // If the file content is available in local cache, |local_file| is filled with
85 // the path to the cache file and |cancel_download_closure| is null. If the file 77 // the path to the cache file and |cancel_download_closure| is null. If the file
86 // content starts to be downloaded from the server, |local_file| is empty and 78 // content starts to be downloaded from the server, |local_file| is empty and
87 // |cancel_download_closure| is filled with a closure by calling which the 79 // |cancel_download_closure| is filled with a closure by calling which the
88 // download job can be cancelled. 80 // download job can be cancelled.
89 // |cancel_download_closure| must be called on the UI thread. 81 // |cancel_download_closure| must be called on the UI thread.
90 typedef base::Callback<void(FileError error, 82 typedef base::Callback<void(FileError error,
91 scoped_ptr<ResourceEntry> entry, 83 scoped_ptr<ResourceEntry> entry,
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 const std::string& md5, 450 const std::string& md5,
459 const GetCacheEntryCallback& callback) = 0; 451 const GetCacheEntryCallback& callback) = 0;
460 452
461 // Reloads the file system feeds from the server. 453 // Reloads the file system feeds from the server.
462 virtual void Reload() = 0; 454 virtual void Reload() = 0;
463 }; 455 };
464 456
465 } // namespace drive 457 } // namespace drive
466 458
467 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_INTERFACE_H_ 459 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_INTERFACE_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/file_system/copy_operation.cc ('k') | chrome/browser/chromeos/drive/file_system_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698