| 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_DRIVE_DRIVE_FILE_SYSTEM_INTERFACE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_INTERFACE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_INTERFACE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_INTERFACE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 119 |
| 120 struct DriveClientContext { | 120 struct DriveClientContext { |
| 121 explicit DriveClientContext(ContextType in_type) : type(in_type) {} | 121 explicit DriveClientContext(ContextType in_type) : type(in_type) {} |
| 122 ContextType type; | 122 ContextType type; |
| 123 }; | 123 }; |
| 124 | 124 |
| 125 // Option enum to control eligible entries for searchMetadata(). | 125 // Option enum to control eligible entries for searchMetadata(). |
| 126 // SEARCH_METADATA_ALL is the default to investigate all the entries. | 126 // SEARCH_METADATA_ALL is the default to investigate all the entries. |
| 127 // SEARCH_METADATA_EXCLUDE_HOSTED_DOCUMENTS excludes the hosted documents. | 127 // SEARCH_METADATA_EXCLUDE_HOSTED_DOCUMENTS excludes the hosted documents. |
| 128 // SEARCH_METADATA_EXCLUDE_DIRECTORIES excludes the directories from the result. | 128 // SEARCH_METADATA_EXCLUDE_DIRECTORIES excludes the directories from the result. |
| 129 // TODO(haruki): Add option for shared_with_me and offline. | 129 // SEARCH_METADATA_SHARED_WITH_ME targets only "shared-with-me" entries. |
| 130 // TODO(haruki): Add option for offline. |
| 130 enum SearchMetadataOptions { | 131 enum SearchMetadataOptions { |
| 131 SEARCH_METADATA_ALL = 0, | 132 SEARCH_METADATA_ALL = 0, |
| 132 SEARCH_METADATA_EXCLUDE_HOSTED_DOCUMENTS = 1, | 133 SEARCH_METADATA_EXCLUDE_HOSTED_DOCUMENTS = 1, |
| 133 SEARCH_METADATA_EXCLUDE_DIRECTORIES = 1 << 1, | 134 SEARCH_METADATA_EXCLUDE_DIRECTORIES = 1 << 1, |
| 135 SEARCH_METADATA_SHARED_WITH_ME = 1 << 2, |
| 134 }; | 136 }; |
| 135 | 137 |
| 136 // Drive file system abstraction layer. | 138 // Drive file system abstraction layer. |
| 137 // The interface is defined to make DriveFileSystem mockable. | 139 // The interface is defined to make DriveFileSystem mockable. |
| 138 class DriveFileSystemInterface { | 140 class DriveFileSystemInterface { |
| 139 public: | 141 public: |
| 140 virtual ~DriveFileSystemInterface() {} | 142 virtual ~DriveFileSystemInterface() {} |
| 141 | 143 |
| 142 // Initializes the object. This function should be called before any | 144 // Initializes the object. This function should be called before any |
| 143 // other functions. | 145 // other functions. |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 virtual void GetMetadata( | 413 virtual void GetMetadata( |
| 412 const GetFilesystemMetadataCallback& callback) = 0; | 414 const GetFilesystemMetadataCallback& callback) = 0; |
| 413 | 415 |
| 414 // Reloads the file system feeds from the server. | 416 // Reloads the file system feeds from the server. |
| 415 virtual void Reload() = 0; | 417 virtual void Reload() = 0; |
| 416 }; | 418 }; |
| 417 | 419 |
| 418 } // namespace drive | 420 } // namespace drive |
| 419 | 421 |
| 420 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_INTERFACE_H_ | 422 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_INTERFACE_H_ |
| OLD | NEW |