Chromium Code Reviews| Index: chrome/browser/chromeos/gdata/gdata_util.h |
| diff --git a/chrome/browser/chromeos/gdata/gdata_util.h b/chrome/browser/chromeos/gdata/gdata_util.h |
| index 19674442e58988f2e94a2ceb2ac0438e74a5b2bc..7f93496d17c5dece3652d8c9f11ba08786a82704 100644 |
| --- a/chrome/browser/chromeos/gdata/gdata_util.h |
| +++ b/chrome/browser/chromeos/gdata/gdata_util.h |
| @@ -17,6 +17,20 @@ class Profile; |
| namespace gdata { |
| namespace util { |
| +enum GDataSearchPathType { |
|
satorux1
2012/05/03 17:58:34
Please add some comment about what is a search pat
tbarzic
2012/05/03 23:56:17
Done.
|
| + // Not a search path. |
| + GDATA_SEARCH_PATH_INVALID, |
| + // gdata/.search. |
| + GDATA_SEARCH_PATH_ROOT, |
| + // Path that defines search query (gdata/.search/foo). |
| + GDATA_SEARCH_PATH_QUERY, |
| + // Path given to a search result (gdata/.search/foo/foo_found). |
| + // The file name will be formatted: "resource_id.file_name". |
| + GDATA_SEARCH_PATH_RESULT, |
| + // If search result is directory, it may contain some children. |
| + GDATA_SEARCH_PATH_RESULT_CHILD |
| +}; |
| + |
| const char kGDataViewFileHostnameUrl[] = "viewfile"; |
| // Returns the GData mount point path, which looks like "/special/gdata". |
| @@ -41,6 +55,22 @@ void ModifyGDataFileResourceUrl(Profile* profile, |
| // Returns true if the given path is under the GData mount point. |
| bool IsUnderGDataMountPoint(const FilePath& path); |
| +// Checks if the path is under (virtual) gdata earch directory, and returns its |
|
satorux1
2012/05/03 17:58:34
earch -> search
tbarzic
2012/05/03 23:56:17
Done.
|
| +// search status. |
| +GDataSearchPathType GetSearchPathStatus(const FilePath& path); |
| + |
| +// Checks if the path is under (virtual) gdata earch directory, and returns its |
| +// search status. |
| +GDataSearchPathType GetSearchPathStatusForPathComponents( |
| + const std::vector<std::string>& path_components); |
| + |
| +// Gets resource id and original file name from the search file name. |
| +// Search file name is formatted as: <resource_id>.<original_file_name>. |
| +// If the path is not search path, the behaviour is not defined. |
| +void CrackSearchFileName(const std::string& search_file_name, |
|
satorux1
2012/05/03 17:58:34
Crack -> Parse? Crack sounds rather uncivilized. :
tbarzic
2012/05/03 23:56:17
Well, am I from Balkans or not :)
(Balkan people a
|
| + std::string* resource_id, |
| + std::string* original_file_name); |
| + |
| // Extracts the GData path from the given path located under the GData mount |
| // point. Returns an empty path if |path| is not under the GData mount point. |
| // Examples: ExtractGDatPath("/special/gdata/foo.txt") => "gdata/foo.txt" |