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

Unified Diff: chrome/browser/chromeos/gdata/gdata_file_system.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: Fix for comments 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_file_system.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_file_system.cc b/chrome/browser/chromeos/gdata/gdata_file_system.cc
index 032394006334c5746bdbe62cf34e4a8b965db9b0..0809dc3dcd25a69f3784ad301e4537e33929888e 100644
--- a/chrome/browser/chromeos/gdata/gdata_file_system.cc
+++ b/chrome/browser/chromeos/gdata/gdata_file_system.cc
@@ -16,10 +16,10 @@
#include "base/platform_file.h"
#include "base/threading/sequenced_worker_pool.h"
#include "base/values.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.pb.h"
-#include "chrome/browser/chromeos/gdata/gdata_documents_service.h"
#include "chrome/browser/chromeos/gdata/gdata_download_observer.h"
#include "chrome/browser/chromeos/gdata/gdata_files.h"
#include "chrome/browser/chromeos/gdata/gdata_protocol_handler.h"
@@ -2106,15 +2106,11 @@ void GDataFileSystem::GetAvailableSpaceOnUIThread(
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!callback.is_null());
- if (gdata::util::IsDriveV2ApiEnabled()) {
- documents_service_->GetAboutResource(
+ documents_service_->GetAccountMetadata(
+ gdata::util::IsDriveV2ApiEnabled() ?
base::Bind(&GDataFileSystem::OnGetAboutResource,
ui_weak_ptr_,
- callback));
- return;
- }
-
- documents_service_->GetAccountMetadata(
+ callback) :
base::Bind(&GDataFileSystem::OnGetAvailableSpace,
ui_weak_ptr_,
callback));
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_download_observer.cc ('k') | chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698