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..cccb9e589698cc260de56ef3066e4d94d6088e6c 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,15 @@ 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) { |
+ documents_service = util::IsDriveV2ApiEnabled() ? |
+ reinterpret_cast<DocumentsServiceInterface*>( |
satorux1
2012/08/20 16:52:30
I guess the reinterpret_cast is unnecessary.
satorux1
2012/08/20 17:01:29
Maybe reinterpret_cast is needed because of the te
kochi
2012/08/21 01:42:45
Yes, it was necessary for ternary operator.
Change
|
+ new DriveAPIService()) : |
+ reinterpret_cast<DocumentsServiceInterface*>( |
+ new GDataWapiService()); |
+ } |
FilePath cache_root = |
g_test_cache_root ? FilePath(*g_test_cache_root) : |