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

Unified Diff: chrome/browser/chromeos/gdata/gdata_system_service.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_system_service.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_system_service.cc b/chrome/browser/chromeos/gdata/gdata_system_service.cc
index d9835a6bfb629dc385556164b27a5b7ba44e15ba..65bcc9ab42031f3b99db107237ac1eef15d2f03c 100644
--- a/chrome/browser/chromeos/gdata/gdata_system_service.cc
+++ b/chrome/browser/chromeos/gdata/gdata_system_service.cc
@@ -7,16 +7,17 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "chrome/browser/browser_process.h"
+#include "chrome/browser/chromeos/gdata/drive_api_service.h"
#include "chrome/browser/chromeos/gdata/drive_webapps_registry.h"
#include "chrome/browser/chromeos/gdata/file_write_helper.h"
#include "chrome/browser/chromeos/gdata/gdata_contacts_service.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_file_system.h"
#include "chrome/browser/chromeos/gdata/gdata_file_system_proxy.h"
#include "chrome/browser/chromeos/gdata/gdata_sync_client.h"
#include "chrome/browser/chromeos/gdata/gdata_uploader.h"
#include "chrome/browser/chromeos/gdata/gdata_util.h"
+#include "chrome/browser/chromeos/gdata/gdata_wapi_service.h"
#include "chrome/browser/download/download_service.h"
#include "chrome/browser/download/download_service_factory.h"
#include "chrome/browser/profiles/profile.h"
@@ -209,10 +210,14 @@ ProfileKeyedService* GDataSystemServiceFactory::BuildServiceInstanceFor(
Profile* profile) const {
GDataSystemService* service = new GDataSystemService(profile);
- DocumentsServiceInterface* documents_service =
- g_test_documents_service ? g_test_documents_service :
- new DocumentsService();
+ DocumentsServiceInterface* documents_service = g_test_documents_service;
g_test_documents_service = NULL;
+ if (!documents_service) {
+ if (util::IsDriveV2ApiEnabled())
+ documents_service = new DriveAPIService();
+ else
+ documents_service = new GDataWapiService();
+ }
FilePath cache_root =
g_test_cache_root ? FilePath(*g_test_cache_root) :
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_protocol_handler.cc ('k') | chrome/browser/chromeos/gdata/gdata_uploader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698