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

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

Issue 10829375: Cleanup: separate WAPI and Drive API code in gdata_documents_service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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_wapi_feed_loader.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_wapi_feed_loader.cc b/chrome/browser/chromeos/gdata/gdata_wapi_feed_loader.cc
index 313b6c11780d67cf3012e0ed55565f7446718a29..0f18631e4d8f6bddef66fb90b5fb677f4e2d55bc 100644
--- a/chrome/browser/chromeos/gdata/gdata_wapi_feed_loader.cc
+++ b/chrome/browser/chromeos/gdata/gdata_wapi_feed_loader.cc
@@ -14,10 +14,10 @@
#include "base/stringprintf.h"
#include "base/threading/sequenced_worker_pool.h"
#include "base/values.h"
-#include "chrome/browser/chromeos/gdata/drive_webapps_registry.h"
+#include "chrome/browser/chromeos/gdata/documents_service_interface.h"
#include "chrome/browser/chromeos/gdata/drive_api_parser.h"
+#include "chrome/browser/chromeos/gdata/drive_webapps_registry.h"
#include "chrome/browser/chromeos/gdata/gdata_cache.h"
-#include "chrome/browser/chromeos/gdata/gdata_documents_service.h"
#include "chrome/browser/chromeos/gdata/gdata_util.h"
#include "chrome/browser/chromeos/gdata/gdata_wapi_feed_processor.h"
#include "chrome/common/chrome_switches.h"
@@ -242,7 +242,7 @@ void GDataWapiFeedLoader::ReloadFromServerIfNeeded(
// First fetch the latest changestamp to see if there were any new changes
// there at all.
if (gdata::util::IsDriveV2ApiEnabled()) {
- documents_service_->GetAboutResource(
+ documents_service_->GetAccountMetadata(
base::Bind(&GDataWapiFeedLoader::OnGetAboutResource,
weak_ptr_factory_.GetWeakPtr(),
initial_origin,
@@ -251,7 +251,7 @@ void GDataWapiFeedLoader::ReloadFromServerIfNeeded(
// Drive v2 needs a separate application list fetch operation.
// TODO(kochi): Application list rarely changes and do not necessarily
// refresed as often as files.
- documents_service_->GetApplicationList(
+ documents_service_->GetApplicationInfo(
base::Bind(&GDataWapiFeedLoader::OnGetApplicationList,
weak_ptr_factory_.GetWeakPtr()));
return;
@@ -471,9 +471,11 @@ void GDataWapiFeedLoader::LoadFromServer(
const base::TimeTicks start_time = base::TimeTicks::Now();
if (gdata::util::IsDriveV2ApiEnabled()) {
- documents_service_->GetChangelist(
+ documents_service_->GetDocuments(
feed_to_load,
start_changestamp,
+ std::string(),
+ std::string(),
base::Bind(&GDataWapiFeedLoader::OnGetChangelist,
weak_ptr_factory_.GetWeakPtr(),
initial_origin,
@@ -741,9 +743,11 @@ void GDataWapiFeedLoader::OnGetChangelist(
ui_state->feed_fetching_elapsed_time = base::TimeTicks::Now() - start_time;
// Kick off the remaining part of the feeds.
- documents_service_->GetChangelist(
+ documents_service_->GetDocuments(
current_feed->next_link(),
params->start_changestamp,
+ std::string(),
+ std::string(),
base::Bind(&GDataWapiFeedLoader::OnGetChangelist,
weak_ptr_factory_.GetWeakPtr(),
initial_origin,

Powered by Google App Engine
This is Rietveld 408576698