summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/gdata/gdata_util.cc
diff options
context:
space:
mode:
authortbarzic@chromium.org <tbarzic@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-19 02:55:44 +0000
committertbarzic@chromium.org <tbarzic@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-19 02:55:44 +0000
commitf98ac64588453aec3fc63070c5d3a4d96662221a (patch)
tree4ed89c558ca6b7707fa0e2296827f74494e499b1 /chrome/browser/chromeos/gdata/gdata_util.cc
parent146be2e5165365b500fd573769c4fb53343d6276 (diff)
downloadchromium_src-f98ac64588453aec3fc63070c5d3a4d96662221a.zip
chromium_src-f98ac64588453aec3fc63070c5d3a4d96662221a.tar.gz
chromium_src-f98ac64588453aec3fc63070c5d3a4d96662221a.tar.bz2
Remove (hacky) handling for drive/.search paths from gdata file system.
We don't need this anymore. NOTE: this shouldn't go in before: http://codereview.chromium.org/10539165/ TEST=existing tests. (manual: confirmed drive search still works in file browser) BUG=129068 Review URL: https://chromiumcodereview.appspot.com/10562016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142906 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/gdata/gdata_util.cc')
-rw-r--r--chrome/browser/chromeos/gdata/gdata_util.cc51
1 files changed, 0 insertions, 51 deletions
diff --git a/chrome/browser/chromeos/gdata/gdata_util.cc b/chrome/browser/chromeos/gdata/gdata_util.cc
index fe24e5d..8309f90 100644
--- a/chrome/browser/chromeos/gdata/gdata_util.cc
+++ b/chrome/browser/chromeos/gdata/gdata_util.cc
@@ -50,10 +50,6 @@ const FilePath::CharType* kGDataMountPointPathComponents[] = {
"/", "special", "drive"
};
-const FilePath::CharType* kGDataSearchPathComponents[] = {
- "drive", ".search"
-};
-
const int kReadOnlyFilePermissions = base::PLATFORM_FILE_OPEN |
base::PLATFORM_FILE_READ |
base::PLATFORM_FILE_EXCLUSIVE_READ |
@@ -244,53 +240,6 @@ bool IsUnderGDataMountPoint(const FilePath& path) {
GetGDataMountPointPath().IsParent(path);
}
-GDataSearchPathType GetSearchPathStatus(const FilePath& path) {
- std::vector<std::string> components;
- path.GetComponents(&components);
- return GetSearchPathStatusForPathComponents(components);
-}
-
-GDataSearchPathType GetSearchPathStatusForPathComponents(
- const std::vector<std::string>& path_components) {
- if (path_components.size() < arraysize(kGDataSearchPathComponents))
- return GDATA_SEARCH_PATH_INVALID;
-
- for (size_t i = 0; i < arraysize(kGDataSearchPathComponents); i++) {
- if (path_components[i] != kGDataSearchPathComponents[i])
- return GDATA_SEARCH_PATH_INVALID;
- }
-
- switch (path_components.size()) {
- case 2:
- return GDATA_SEARCH_PATH_ROOT;
- case 3:
- return GDATA_SEARCH_PATH_QUERY;
- case 4:
- return GDATA_SEARCH_PATH_RESULT;
- default:
- return GDATA_SEARCH_PATH_RESULT_CHILD;
- }
-}
-
-bool ParseSearchFileName(const std::string& search_file_name,
- std::string* resource_id,
- std::string* original_file_name) {
- DCHECK(resource_id);
- DCHECK(original_file_name);
-
- *resource_id = "";
- *original_file_name = "";
-
- size_t dot_index = search_file_name.find('.');
- if (dot_index == std::string::npos)
- return false;
-
- *resource_id = search_file_name.substr(0, dot_index);
- if (search_file_name.length() - 1 > dot_index)
- *original_file_name = search_file_name.substr(dot_index + 1);
- return (!resource_id->empty() && !original_file_name->empty());
-}
-
FilePath ExtractGDataPath(const FilePath& path) {
if (!IsUnderGDataMountPoint(path))
return FilePath();