| Index: chrome/browser/chromeos/extensions/file_browser_private_api.cc
|
| diff --git a/chrome/browser/chromeos/extensions/file_browser_private_api.cc b/chrome/browser/chromeos/extensions/file_browser_private_api.cc
|
| index 21bb18a7771a1819c4d1d0cd719d7d41e0c89aa8..f3b10b64dd563a97e739fb2c39359d00aa82ea13 100644
|
| --- a/chrome/browser/chromeos/extensions/file_browser_private_api.cc
|
| +++ b/chrome/browser/chromeos/extensions/file_browser_private_api.cc
|
| @@ -23,8 +23,8 @@
|
| #include "chrome/browser/chromeos/extensions/file_manager_util.h"
|
| #include "chrome/browser/chromeos/gdata/drive.pb.h"
|
| #include "chrome/browser/chromeos/gdata/drive_service_interface.h"
|
| +#include "chrome/browser/chromeos/gdata/drive_system_service.h"
|
| #include "chrome/browser/chromeos/gdata/drive_webapps_registry.h"
|
| -#include "chrome/browser/chromeos/gdata/gdata_system_service.h"
|
| #include "chrome/browser/chromeos/gdata/gdata_util.h"
|
| #include "chrome/browser/chromeos/gdata/gdata_wapi_parser.h"
|
| #include "chrome/browser/chromeos/gdata/operation_registry.h"
|
| @@ -199,8 +199,8 @@ void AddGDataMountPoint(
|
| file_handler_util::GetReadWritePermissions());
|
|
|
| // Grant R/W permission for tmp and pinned cache folder.
|
| - gdata::GDataSystemService* system_service =
|
| - gdata::GDataSystemServiceFactory::GetForProfile(profile);
|
| + gdata::DriveSystemService* system_service =
|
| + gdata::DriveSystemServiceFactory::GetForProfile(profile);
|
| // |system_service| is NULL if incognito window / guest login.
|
| if (!system_service || !system_service->file_system())
|
| return;
|
| @@ -592,8 +592,8 @@ bool GetFileTasksFileBrowserFunction::FindDriveAppTasks(
|
| if (file_info_list.empty())
|
| return true;
|
|
|
| - gdata::GDataSystemService* system_service =
|
| - gdata::GDataSystemServiceFactory::GetForProfile(profile_);
|
| + gdata::DriveSystemService* system_service =
|
| + gdata::DriveSystemServiceFactory::GetForProfile(profile_);
|
| // |system_service| is NULL if incognito window / guest login. We return true
|
| // in this case because there might be other extension tasks, even if we don't
|
| // have any to add.
|
| @@ -1096,8 +1096,8 @@ void AddMountFunction::GetLocalPathsResponseOnUIThread(
|
| const FilePath& source_path = files[0].local_path;
|
| const FilePath::StringType& display_name = files[0].display_name;
|
| // Check if the source path is under GData cache directory.
|
| - gdata::GDataSystemService* system_service =
|
| - gdata::GDataSystemServiceFactory::GetForProfile(profile_);
|
| + gdata::DriveSystemService* system_service =
|
| + gdata::DriveSystemServiceFactory::GetForProfile(profile_);
|
| gdata::DriveCache* cache = system_service ? system_service->cache() : NULL;
|
| if (cache && cache->IsUnderDriveCacheDirectory(source_path)) {
|
| cache->SetMountedStateOnUIThread(
|
| @@ -1226,8 +1226,8 @@ void GetSizeStatsFunction::GetLocalPathsResponseOnUIThread(
|
| }
|
|
|
| if (files[0].file_path == gdata::util::GetGDataMountPointPath()) {
|
| - gdata::GDataSystemService* system_service =
|
| - gdata::GDataSystemServiceFactory::GetForProfile(profile_);
|
| + gdata::DriveSystemService* system_service =
|
| + gdata::DriveSystemServiceFactory::GetForProfile(profile_);
|
|
|
| gdata::DriveFileSystemInterface* file_system =
|
| system_service->file_system();
|
| @@ -1768,8 +1768,8 @@ void GetGDataFilePropertiesFunction::GetNextFileProperties() {
|
| file_properties_->Append(property_dict);
|
|
|
| // Start getting the file info.
|
| - gdata::GDataSystemService* system_service =
|
| - gdata::GDataSystemServiceFactory::GetForProfile(profile_);
|
| + gdata::DriveSystemService* system_service =
|
| + gdata::DriveSystemServiceFactory::GetForProfile(profile_);
|
| system_service->file_system()->GetEntryInfoByPath(
|
| file_path,
|
| base::Bind(&GetGDataFilePropertiesFunction::OnGetFileInfo,
|
| @@ -1833,8 +1833,8 @@ void GetGDataFilePropertiesFunction::OnOperationComplete(
|
| property_dict->SetString("contentMimeType",
|
| file_specific_info.content_mime_type());
|
|
|
| - gdata::GDataSystemService* system_service =
|
| - gdata::GDataSystemServiceFactory::GetForProfile(profile_);
|
| + gdata::DriveSystemService* system_service =
|
| + gdata::DriveSystemServiceFactory::GetForProfile(profile_);
|
|
|
| // Get drive WebApps that can accept this file.
|
| ScopedVector<gdata::DriveWebAppInfo> web_apps;
|
| @@ -1917,8 +1917,8 @@ void PinGDataFileFunction::DoOperation(
|
| scoped_ptr<gdata::DriveEntryProto> entry_proto) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
|
|
| - gdata::GDataSystemService* system_service =
|
| - gdata::GDataSystemServiceFactory::GetForProfile(profile_);
|
| + gdata::DriveSystemService* system_service =
|
| + gdata::DriveSystemServiceFactory::GetForProfile(profile_);
|
| // This is subtle but we should take references of resource_id and md5
|
| // before |file_info| is passed to |callback| by base::Passed(). Otherwise,
|
| // file_info->whatever() crashes.
|
| @@ -2043,8 +2043,8 @@ void GetGDataFilesFunction::GetFileOrSendResponse() {
|
| return;
|
| }
|
|
|
| - gdata::GDataSystemService* system_service =
|
| - gdata::GDataSystemServiceFactory::GetForProfile(profile_);
|
| + gdata::DriveSystemService* system_service =
|
| + gdata::DriveSystemServiceFactory::GetForProfile(profile_);
|
| DCHECK(system_service);
|
|
|
| // Get the file on the top of the queue.
|
| @@ -2089,8 +2089,8 @@ GetFileTransfersFunction::GetFileTransfersFunction() {}
|
| GetFileTransfersFunction::~GetFileTransfersFunction() {}
|
|
|
| ListValue* GetFileTransfersFunction::GetFileTransfersList() {
|
| - gdata::GDataSystemService* system_service =
|
| - gdata::GDataSystemServiceFactory::GetForProfile(profile_);
|
| + gdata::DriveSystemService* system_service =
|
| + gdata::DriveSystemServiceFactory::GetForProfile(profile_);
|
| if (!system_service)
|
| return NULL;
|
|
|
| @@ -2144,8 +2144,8 @@ bool CancelFileTransfersFunction::RunImpl() {
|
| void CancelFileTransfersFunction::GetLocalPathsResponseOnUIThread(
|
| const SelectedFileInfoList& files) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| - gdata::GDataSystemService* system_service =
|
| - gdata::GDataSystemServiceFactory::GetForProfile(profile_);
|
| + gdata::DriveSystemService* system_service =
|
| + gdata::DriveSystemServiceFactory::GetForProfile(profile_);
|
| if (!system_service) {
|
| SendResponse(false);
|
| return;
|
| @@ -2207,8 +2207,8 @@ void TransferFileFunction::GetLocalPathsResponseOnUIThread(
|
| return;
|
| }
|
|
|
| - gdata::GDataSystemService* system_service =
|
| - gdata::GDataSystemServiceFactory::GetForProfile(profile_);
|
| + gdata::DriveSystemService* system_service =
|
| + gdata::DriveSystemServiceFactory::GetForProfile(profile_);
|
| if (!system_service) {
|
| SendResponse(false);
|
| return;
|
| @@ -2329,8 +2329,8 @@ void SearchDriveFunction::OnFileSystemOpened(
|
| file_system_name_ = file_system_name;
|
| file_system_url_ = file_system_url;
|
|
|
| - gdata::GDataSystemService* system_service =
|
| - gdata::GDataSystemServiceFactory::GetForProfile(profile_);
|
| + gdata::DriveSystemService* system_service =
|
| + gdata::DriveSystemServiceFactory::GetForProfile(profile_);
|
| if (!system_service || !system_service->file_system()) {
|
| SendResponse(false);
|
| return;
|
| @@ -2373,8 +2373,8 @@ void SearchDriveFunction::OnSearch(
|
| }
|
|
|
| bool ClearDriveCacheFunction::RunImpl() {
|
| - gdata::GDataSystemService* system_service =
|
| - gdata::GDataSystemServiceFactory::GetForProfile(profile_);
|
| + gdata::DriveSystemService* system_service =
|
| + gdata::DriveSystemServiceFactory::GetForProfile(profile_);
|
| // |system_service| is NULL if incognito window / guest login.
|
| if (!system_service || !system_service->file_system())
|
| return false;
|
| @@ -2417,8 +2417,8 @@ bool RequestDirectoryRefreshFunction::RunImpl() {
|
| if (!args_->GetString(0, &file_url_as_string))
|
| return false;
|
|
|
| - gdata::GDataSystemService* system_service =
|
| - gdata::GDataSystemServiceFactory::GetForProfile(profile_);
|
| + gdata::DriveSystemService* system_service =
|
| + gdata::DriveSystemServiceFactory::GetForProfile(profile_);
|
| if (!system_service || !system_service->file_system())
|
| return false;
|
|
|
|
|