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

Unified Diff: chrome/browser/google_apis/fake_drive_service.cc

Issue 14146006: Refactoring: replace SearchInDirectory by SearchByTitle. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: chrome/browser/google_apis/fake_drive_service.cc
diff --git a/chrome/browser/google_apis/fake_drive_service.cc b/chrome/browser/google_apis/fake_drive_service.cc
index 03ece2cd3075f56f503d6bd325905341e1b36612..32b6569a5251612b6b4c060d98843e692c9cef61 100644
--- a/chrome/browser/google_apis/fake_drive_service.cc
+++ b/chrome/browser/google_apis/fake_drive_service.cc
@@ -262,17 +262,18 @@ void FakeDriveService::Search(const std::string& search_query,
callback);
}
-void FakeDriveService::SearchInDirectory(
- const std::string& search_query,
+void FakeDriveService::SearchByTitle(
+ const std::string& title,
const std::string& directory_resource_id,
const GetResourceListCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- DCHECK(!search_query.empty());
- DCHECK(!directory_resource_id.empty());
+ DCHECK(!title.empty());
DCHECK(!callback.is_null());
+ // Note: the search implementation here doesn't support quotation unescape,
+ // so don't escape here.
GetResourceListInternal(0, // start changestamp
- search_query,
+ base::StringPrintf("title:'%s'", title.c_str()),
directory_resource_id,
0, // start offset
default_max_results_,

Powered by Google App Engine
This is Rietveld 408576698