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

Unified Diff: chrome/browser/chromeos/gdata/gdata_operations.cc

Issue 10634020: [FileManager] Do drive search incrementally (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 4 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/chromeos/gdata/gdata_operations.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_operations.cc b/chrome/browser/chromeos/gdata/gdata_operations.cc
index 627e73fb1737bcee4a5ad44af1856f6da934ec1e..6b717eea32dc5ebc403004ec020ab7df1c4d146d 100644
--- a/chrome/browser/chromeos/gdata/gdata_operations.cc
+++ b/chrome/browser/chromeos/gdata/gdata_operations.cc
@@ -70,8 +70,10 @@ const char kUploadContentLength[] = "X-Upload-Content-Length: ";
// almost always. Be careful not to use something too small on account that
// have many items because server side 503 error might kick in.
const int kMaxDocumentsPerFeed = 500;
+const int kMaxDocumentsPerSearchFeed = 50;
#else
const int kMaxDocumentsPerFeed = 500;
+const int kMaxDocumentsPerSearchFeed = 50;
#endif
const char kFeedField[] = "feed";
@@ -171,15 +173,18 @@ void GetDocumentsOperation::SetUrl(const GURL& url) {
}
GURL GetDocumentsOperation::GetURL() const {
+ int max_docs = search_string_.empty() ? kMaxDocumentsPerFeed :
+ kMaxDocumentsPerSearchFeed;
+
if (!override_url_.is_empty())
return AddFeedUrlParams(override_url_,
- kMaxDocumentsPerFeed,
+ max_docs,
0,
- std::string());
+ search_string_);
if (start_changestamp_ == 0) {
return AddFeedUrlParams(FormatDocumentListURL(directory_resource_id_),
- kMaxDocumentsPerFeed,
+ max_docs,
0,
search_string_);
}
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc ('k') | chrome/browser/chromeos/gdata/mock_gdata_file_system.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698