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

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: . Created 8 years, 5 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 e0057eb392b823f9288ef945bfcda7c37497b55f..6277c4160a5c312a6fa8621c1277e5371de8f4ce 100644
--- a/chrome/browser/chromeos/gdata/gdata_operations.cc
+++ b/chrome/browser/chromeos/gdata/gdata_operations.cc
@@ -57,8 +57,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 = 1000;
+const int kMaxDocumentsPerSearchFeed = 100;
satorux1 2012/07/20 17:13:04 why 100? I think most users only see the first 10
tbarzic 2012/07/20 17:51:43 I'd like to reduce number of server requests; 10 w
satorux1 2012/07/20 17:55:56 oh i see, then 100 is fine.
#else
const int kMaxDocumentsPerFeed = 1000;
+const int kMaxDocumentsPerSearchFeed = 100;
#endif
const char kFeedField[] = "feed";
@@ -159,15 +161,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_);
}

Powered by Google App Engine
This is Rietveld 408576698