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

Unified Diff: chrome/browser/google_apis/drive_api_util.h

Issue 14341002: Implement query translation from GData WAPI to Drive API v2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Refine query parsing. Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/google_apis/drive_api_service.cc ('k') | chrome/browser/google_apis/drive_api_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/google_apis/drive_api_util.h
diff --git a/chrome/browser/google_apis/drive_api_util.h b/chrome/browser/google_apis/drive_api_util.h
index 2ff8b33ca9d91cf994331ca686c2ecd7c4432f0c..4206106ba2d9140e7ef36d900f33f55ac3f5a414 100644
--- a/chrome/browser/google_apis/drive_api_util.h
+++ b/chrome/browser/google_apis/drive_api_util.h
@@ -23,6 +23,16 @@ namespace util {
// See also: https://developers.google.com/drive/search-parameters
std::string EscapeQueryStringValue(const std::string& str);
+// Parses the query, and builds a search query for Drive API v2.
+// This only supports:
+// Regular query (e.g. dog => fullText contains 'dog')
+// Conjunctions
+// (e.g. dog cat => fullText contains 'dog' and fullText contains 'cat')
+// Exclusion query (e.g. -cat => not fullText contains 'cat').
+// Quoted query (e.g. "dog cat" => fullText contains 'dog cat').
+// See also: https://developers.google.com/drive/search-parameters
+std::string TranslateQuery(const std::string& original_query);
+
} // namespace util
} // namespace drive
} // namespace google_apis
« no previous file with comments | « chrome/browser/google_apis/drive_api_service.cc ('k') | chrome/browser/google_apis/drive_api_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698