diff options
27 files changed, 172 insertions, 172 deletions
diff --git a/chrome/browser/chromeos/extensions/external_filesystem_apitest.cc b/chrome/browser/chromeos/extensions/external_filesystem_apitest.cc index 1131090..166cc4c 100644 --- a/chrome/browser/chromeos/extensions/external_filesystem_apitest.cc +++ b/chrome/browser/chromeos/extensions/external_filesystem_apitest.cc @@ -13,7 +13,7 @@ #include "base/threading/worker_pool.h" #include "base/values.h" #include "chrome/browser/chromeos/gdata/drive_file_system.h" -#include "chrome/browser/chromeos/gdata/gdata_system_service.h" +#include "chrome/browser/chromeos/gdata/drive_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/mock_drive_service.h" @@ -200,7 +200,7 @@ class RemoteFileSystemExtensionApiTest : public ExtensionApiTest { FilePath tmp_dir_path; PathService::Get(base::DIR_TEMP, &tmp_dir_path); ASSERT_TRUE(test_cache_root_.CreateUniqueTempDirUnderPath(tmp_dir_path)); - gdata::GDataSystemServiceFactory::set_cache_root_for_test( + gdata::DriveSystemServiceFactory::set_cache_root_for_test( test_cache_root_.path().value()); mock_drive_service_ = new gdata::MockDriveService(); @@ -212,7 +212,7 @@ class RemoteFileSystemExtensionApiTest : public ExtensionApiTest { WillRepeatedly(Return(operation_registry_.get())); // |mock_drive_service_| will eventually get owned by a system service. - gdata::GDataSystemServiceFactory::set_drive_service_for_test( + gdata::DriveSystemServiceFactory::set_drive_service_for_test( mock_drive_service_); ExtensionApiTest::SetUp(); @@ -220,8 +220,8 @@ class RemoteFileSystemExtensionApiTest : public ExtensionApiTest { virtual void TearDown() OVERRIDE { // Let's make sure we don't leak documents service. - gdata::GDataSystemServiceFactory::set_drive_service_for_test(NULL); - gdata::GDataSystemServiceFactory::set_cache_root_for_test(std::string()); + gdata::DriveSystemServiceFactory::set_drive_service_for_test(NULL); + gdata::DriveSystemServiceFactory::set_cache_root_for_test(std::string()); ExtensionApiTest::TearDown(); } diff --git a/chrome/browser/chromeos/extensions/file_browser_event_router.cc b/chrome/browser/chromeos/extensions/file_browser_event_router.cc index 738a7a1..e65b4a2 100644 --- a/chrome/browser/chromeos/extensions/file_browser_event_router.cc +++ b/chrome/browser/chromeos/extensions/file_browser_event_router.cc @@ -14,7 +14,7 @@ #include "chrome/browser/chromeos/extensions/file_browser_notifications.h" #include "chrome/browser/chromeos/extensions/file_manager_util.h" #include "chrome/browser/chromeos/gdata/drive_service_interface.h" -#include "chrome/browser/chromeos/gdata/gdata_system_service.h" +#include "chrome/browser/chromeos/gdata/drive_system_service.h" #include "chrome/browser/chromeos/gdata/gdata_util.h" #include "chrome/browser/chromeos/login/base_login_display_host.h" #include "chrome/browser/chromeos/login/screen_locker.h" @@ -36,8 +36,8 @@ using chromeos::disks::DiskMountManager; using chromeos::disks::DiskMountManagerEventType; using content::BrowserThread; -using gdata::GDataSystemService; -using gdata::GDataSystemServiceFactory; +using gdata::DriveSystemService; +using gdata::DriveSystemServiceFactory; namespace { const char kDiskAddedEventType[] = "added"; @@ -109,8 +109,8 @@ void FileBrowserEventRouter::ShutdownOnUIThread() { } DiskMountManager::GetInstance()->RemoveObserver(this); - GDataSystemService* system_service = - GDataSystemServiceFactory::FindForProfile(profile_); + DriveSystemService* system_service = + DriveSystemServiceFactory::FindForProfile(profile_); if (system_service) { system_service->file_system()->RemoveObserver(this); system_service->drive_service()->operation_registry()->RemoveObserver(this); @@ -137,8 +137,8 @@ void FileBrowserEventRouter::ObserveFileSystemEvents() { disk_mount_manager->AddObserver(this); disk_mount_manager->RequestMountInfoRefresh(); - GDataSystemService* system_service = - GDataSystemServiceFactory::GetForProfile(profile_); + DriveSystemService* system_service = + DriveSystemServiceFactory::GetForProfile(profile_); if (!system_service) { NOTREACHED(); return; @@ -229,8 +229,8 @@ void FileBrowserEventRouter::MountDrive( const base::Closure& callback) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - gdata::GDataSystemService* system_service = - gdata::GDataSystemServiceFactory::GetForProfile(profile_); + DriveSystemService* system_service = + DriveSystemServiceFactory::GetForProfile(profile_); if (system_service) { system_service->drive_service()->Authenticate( base::Bind(&FileBrowserEventRouter::OnAuthenticated, @@ -354,8 +354,8 @@ void FileBrowserEventRouter::MountCompleted( if ((event_type == DiskMountManager::MOUNTING) != (error_code == chromeos::MOUNT_ERROR_NONE)) { FilePath source_path(mount_info.source_path); - gdata::GDataSystemService* system_service = - gdata::GDataSystemServiceFactory::GetForProfile(profile_); + DriveSystemService* system_service = + DriveSystemServiceFactory::GetForProfile(profile_); gdata::DriveCache* cache = system_service ? system_service->cache() : NULL; if (cache) { @@ -820,8 +820,8 @@ FileBrowserEventRouter::FileWatcherExtensions::GetVirtualPath() const { gdata::DriveFileSystemInterface* FileBrowserEventRouter::GetRemoteFileSystem() const { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - gdata::GDataSystemService* system_service = - gdata::GDataSystemServiceFactory::GetForProfile(profile_); + DriveSystemService* system_service = + DriveSystemServiceFactory::GetForProfile(profile_); return (system_service ? system_service->file_system() : NULL); } @@ -849,7 +849,7 @@ FileBrowserEventRouterFactory::GetInstance() { FileBrowserEventRouterFactory::FileBrowserEventRouterFactory() : RefcountedProfileKeyedServiceFactory("FileBrowserEventRouter", ProfileDependencyManager::GetInstance()) { - DependsOn(GDataSystemServiceFactory::GetInstance()); + DependsOn(DriveSystemServiceFactory::GetInstance()); } FileBrowserEventRouterFactory::~FileBrowserEventRouterFactory() { diff --git a/chrome/browser/chromeos/extensions/file_browser_private_api.cc b/chrome/browser/chromeos/extensions/file_browser_private_api.cc index 4bab431..1762a73 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" @@ -200,8 +200,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; @@ -613,8 +613,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. @@ -1117,8 +1117,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( @@ -1247,8 +1247,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(); @@ -1788,8 +1788,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, @@ -1853,8 +1853,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; @@ -1937,8 +1937,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. @@ -2063,8 +2063,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. @@ -2109,8 +2109,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; @@ -2164,8 +2164,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; @@ -2227,8 +2227,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; @@ -2349,8 +2349,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; @@ -2393,8 +2393,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; @@ -2437,8 +2437,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; diff --git a/chrome/browser/chromeos/extensions/file_manager_util.cc b/chrome/browser/chromeos/extensions/file_manager_util.cc index 12d3c9e..b03db90 100644 --- a/chrome/browser/chromeos/extensions/file_manager_util.cc +++ b/chrome/browser/chromeos/extensions/file_manager_util.cc @@ -17,7 +17,7 @@ #include "chrome/browser/chromeos/gdata/drive.pb.h" #include "chrome/browser/chromeos/gdata/drive_file_system.h" #include "chrome/browser/chromeos/gdata/drive_files.h" -#include "chrome/browser/chromeos/gdata/gdata_system_service.h" +#include "chrome/browser/chromeos/gdata/drive_system_service.h" #include "chrome/browser/chromeos/gdata/gdata_util.h" #include "chrome/browser/chromeos/gdata/operation_registry.h" #include "chrome/browser/chromeos/media/media_player.h" @@ -625,8 +625,8 @@ bool ExecuteBuiltinHandler(Browser* browser, const FilePath& path, // Override gdata resource to point to internal handler instead of file: // URL. if (gdata::util::GetSpecialRemoteRootPath().IsParent(path)) { - gdata::GDataSystemService* system_service = - gdata::GDataSystemServiceFactory::GetForProfile(profile); + gdata::DriveSystemService* system_service = + gdata::DriveSystemServiceFactory::GetForProfile(profile); if (!system_service) return false; @@ -643,8 +643,8 @@ bool ExecuteBuiltinHandler(Browser* browser, const FilePath& path, if (IsSupportedGDocsExtension(file_extension.data())) { if (gdata::util::GetSpecialRemoteRootPath().IsParent(path)) { // The file is on Google Docs. Get the Docs from the GData service. - gdata::GDataSystemService* system_service = - gdata::GDataSystemServiceFactory::GetForProfile(profile); + gdata::DriveSystemService* system_service = + gdata::DriveSystemServiceFactory::GetForProfile(profile); if (!system_service) return false; diff --git a/chrome/browser/chromeos/gdata/drive_api_service.h b/chrome/browser/chromeos/gdata/drive_api_service.h index edddcdf..2273c0b 100644 --- a/chrome/browser/chromeos/gdata/drive_api_service.h +++ b/chrome/browser/chromeos/gdata/drive_api_service.h @@ -26,7 +26,7 @@ class OperationRunner; // works as a thin wrapper for the API. class DriveAPIService : public DriveServiceInterface { public: - // Instance is usually created by GDataSystemServiceFactory and owned by + // Instance is usually created by DriveSystemServiceFactory and owned by // DriveFileSystem. DriveAPIService(); virtual ~DriveAPIService(); diff --git a/chrome/browser/chromeos/gdata/drive_file_system.cc b/chrome/browser/chromeos/gdata/drive_file_system.cc index b769bcd..b159ba5 100644 --- a/chrome/browser/chromeos/gdata/drive_file_system.cc +++ b/chrome/browser/chromeos/gdata/drive_file_system.cc @@ -20,10 +20,10 @@ #include "chrome/browser/chromeos/gdata/drive_api_parser.h" #include "chrome/browser/chromeos/gdata/drive_files.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_download_observer.h" #include "chrome/browser/chromeos/gdata/gdata_protocol_handler.h" -#include "chrome/browser/chromeos/gdata/gdata_system_service.h" #include "chrome/browser/chromeos/gdata/gdata_uploader.h" #include "chrome/browser/chromeos/gdata/gdata_util.h" #include "chrome/browser/chromeos/gdata/task_util.h" @@ -474,7 +474,7 @@ void DriveFileSystem::OnUpdateChecked(ContentOrigin initial_origin, } DriveFileSystem::~DriveFileSystem() { - // This should be called from UI thread, from GDataSystemService shutdown. + // This should be called from UI thread, from DriveSystemService shutdown. DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); feed_loader_->RemoveObserver(this); @@ -511,7 +511,7 @@ void DriveFileSystem::StopUpdates() { // If unmount request comes from filesystem side, this method may be called // twice. First is just after unmounting on filesystem, second is after // unmounting on filemanager on JS. In other words, if this is called from - // GDataSystemService::RemoveDriveMountPoint(), this will be called again from + // DriveSystemService::RemoveDriveMountPoint(), this will be called again from // FileBrowserEventRouter::HandleRemoteUpdateRequestOnUIThread(). // We choose to stopping updates asynchronous without waiting for filemanager, // rather than waiting for completion of unmounting on filemanager. diff --git a/chrome/browser/chromeos/gdata/drive_file_system.h b/chrome/browser/chromeos/gdata/drive_file_system.h index 87d88eb..4179dff 100644 --- a/chrome/browser/chromeos/gdata/drive_file_system.h +++ b/chrome/browser/chromeos/gdata/drive_file_system.h @@ -820,19 +820,19 @@ class DriveFileSystem : public DriveFileSystemInterface, // other threads with base::Unretained(this). scoped_ptr<DriveResourceMetadata> resource_metadata_; - // The profile hosts the DriveFileSystem via GDataSystemService. + // The profile hosts the DriveFileSystem via DriveSystemService. Profile* profile_; - // The cache owned by GDataSystemService. + // The cache owned by DriveSystemService. DriveCache* cache_; - // The uploader owned by GDataSystemService. + // The uploader owned by DriveSystemService. GDataUploaderInterface* uploader_; - // The document service owned by GDataSystemService. + // The document service owned by DriveSystemService. DriveServiceInterface* drive_service_; - // The webapps registry owned by GDataSystemService. + // The webapps registry owned by DriveSystemService. DriveWebAppsRegistryInterface* webapps_registry_; // Periodic timer for checking updates. diff --git a/chrome/browser/chromeos/gdata/drive_file_system_proxy.cc b/chrome/browser/chromeos/gdata/drive_file_system_proxy.cc index 9e52999..5314d3c 100644 --- a/chrome/browser/chromeos/gdata/drive_file_system_proxy.cc +++ b/chrome/browser/chromeos/gdata/drive_file_system_proxy.cc @@ -14,7 +14,7 @@ #include "chrome/browser/chromeos/gdata/drive.pb.h" #include "chrome/browser/chromeos/gdata/drive_file_system_interface.h" #include "chrome/browser/chromeos/gdata/drive_files.h" -#include "chrome/browser/chromeos/gdata/gdata_system_service.h" +#include "chrome/browser/chromeos/gdata/drive_system_service.h" #include "chrome/browser/chromeos/gdata/gdata_util.h" #include "content/public/browser/browser_thread.h" #include "webkit/blob/shareable_file_reference.h" diff --git a/chrome/browser/chromeos/gdata/drive_file_system_proxy.h b/chrome/browser/chromeos/gdata/drive_file_system_proxy.h index e1fd9fc..0c63eb0 100644 --- a/chrome/browser/chromeos/gdata/drive_file_system_proxy.h +++ b/chrome/browser/chromeos/gdata/drive_file_system_proxy.h @@ -23,7 +23,7 @@ typedef std::vector<DriveEntryProto> DriveEntryProtoVector; // Implementation of File API's remote file system proxy for Drive file system. class DriveFileSystemProxy : public fileapi::RemoteFileSystemProxyInterface { public: - // |file_system| is the DriveFileSystem instance owned by GDataSystemService. + // |file_system| is the DriveFileSystem instance owned by DriveSystemService. explicit DriveFileSystemProxy(DriveFileSystemInterface* file_system); // fileapi::RemoteFileSystemProxyInterface overrides. diff --git a/chrome/browser/chromeos/gdata/gdata_system_service.cc b/chrome/browser/chromeos/gdata/drive_system_service.cc index 6560338..3099728 100644 --- a/chrome/browser/chromeos/gdata/gdata_system_service.cc +++ b/chrome/browser/chromeos/gdata/drive_system_service.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/chromeos/gdata/gdata_system_service.h" +#include "chrome/browser/chromeos/gdata/drive_system_service.h" #include "base/bind.h" #include "base/bind_helpers.h" @@ -38,7 +38,7 @@ const std::string* g_test_cache_root = NULL; } // namespace -GDataSystemService::GDataSystemService(Profile* profile) +DriveSystemService::DriveSystemService(Profile* profile) : profile_(profile), cache_(NULL), ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)) { @@ -48,12 +48,12 @@ GDataSystemService::GDataSystemService(Profile* profile) blocking_pool->GetSequenceToken()); } -GDataSystemService::~GDataSystemService() { +DriveSystemService::~DriveSystemService() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); cache_->DestroyOnUIThread(); } -void GDataSystemService::Initialize( +void DriveSystemService::Initialize( DriveServiceInterface* drive_service, const FilePath& cache_root) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); @@ -90,7 +90,7 @@ void GDataSystemService::Initialize( AddDriveMountPoint(); } -void GDataSystemService::Shutdown() { +void DriveSystemService::Shutdown() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); RemoveDriveMountPoint(); @@ -104,19 +104,19 @@ void GDataSystemService::Shutdown() { drive_service_.reset(); } -void GDataSystemService::ClearCacheAndRemountFileSystem( +void DriveSystemService::ClearCacheAndRemountFileSystem( const base::Callback<void(bool)>& callback) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); RemoveDriveMountPoint(); drive_service()->CancelAll(); cache_->ClearAllOnUIThread( - base::Bind(&GDataSystemService::AddBackDriveMountPoint, + base::Bind(&DriveSystemService::AddBackDriveMountPoint, weak_ptr_factory_.GetWeakPtr(), callback)); } -void GDataSystemService::AddBackDriveMountPoint( +void DriveSystemService::AddBackDriveMountPoint( const base::Callback<void(bool)>& callback, DriveFileError error, const FilePath& file_path) { @@ -128,7 +128,7 @@ void GDataSystemService::AddBackDriveMountPoint( callback.Run(error == DRIVE_FILE_OK); } -void GDataSystemService::AddDriveMountPoint() { +void DriveSystemService::AddDriveMountPoint() { if (!gdata::util::IsGDataAvailable(profile_)) return; @@ -145,7 +145,7 @@ void GDataSystemService::AddDriveMountPoint() { file_system_->NotifyFileSystemMounted(); } -void GDataSystemService::RemoveDriveMountPoint() { +void DriveSystemService::RemoveDriveMountPoint() { file_system_->NotifyFileSystemToBeUnmounted(); file_system_->StopUpdates(); @@ -156,38 +156,38 @@ void GDataSystemService::RemoveDriveMountPoint() { provider->RemoveMountPoint(mount_point); } -//===================== GDataSystemServiceFactory ============================= +//===================== DriveSystemServiceFactory ============================= // static -GDataSystemService* GDataSystemServiceFactory::GetForProfile( +DriveSystemService* DriveSystemServiceFactory::GetForProfile( Profile* profile) { - return static_cast<GDataSystemService*>( + return static_cast<DriveSystemService*>( GetInstance()->GetServiceForProfile(profile, true)); } // static -GDataSystemService* GDataSystemServiceFactory::FindForProfile( +DriveSystemService* DriveSystemServiceFactory::FindForProfile( Profile* profile) { - return static_cast<GDataSystemService*>( + return static_cast<DriveSystemService*>( GetInstance()->GetServiceForProfile(profile, false)); } // static -GDataSystemServiceFactory* GDataSystemServiceFactory::GetInstance() { - return Singleton<GDataSystemServiceFactory>::get(); +DriveSystemServiceFactory* DriveSystemServiceFactory::GetInstance() { + return Singleton<DriveSystemServiceFactory>::get(); } -GDataSystemServiceFactory::GDataSystemServiceFactory() - : ProfileKeyedServiceFactory("GDataSystemService", +DriveSystemServiceFactory::DriveSystemServiceFactory() + : ProfileKeyedServiceFactory("DriveSystemService", ProfileDependencyManager::GetInstance()) { DependsOn(DownloadServiceFactory::GetInstance()); } -GDataSystemServiceFactory::~GDataSystemServiceFactory() { +DriveSystemServiceFactory::~DriveSystemServiceFactory() { } // static -void GDataSystemServiceFactory::set_drive_service_for_test( +void DriveSystemServiceFactory::set_drive_service_for_test( DriveServiceInterface* drive_service) { if (g_test_drive_service) delete g_test_drive_service; @@ -195,16 +195,16 @@ void GDataSystemServiceFactory::set_drive_service_for_test( } // static -void GDataSystemServiceFactory::set_cache_root_for_test( +void DriveSystemServiceFactory::set_cache_root_for_test( const std::string& cache_root) { if (g_test_cache_root) delete g_test_cache_root; g_test_cache_root = !cache_root.empty() ? new std::string(cache_root) : NULL; } -ProfileKeyedService* GDataSystemServiceFactory::BuildServiceInstanceFor( +ProfileKeyedService* DriveSystemServiceFactory::BuildServiceInstanceFor( Profile* profile) const { - GDataSystemService* service = new GDataSystemService(profile); + DriveSystemService* service = new DriveSystemService(profile); DriveServiceInterface* drive_service = g_test_drive_service; g_test_drive_service = NULL; diff --git a/chrome/browser/chromeos/gdata/gdata_system_service.h b/chrome/browser/chromeos/gdata/drive_system_service.h index 5c15e1f..3f8814f 100644 --- a/chrome/browser/chromeos/gdata/gdata_system_service.h +++ b/chrome/browser/chromeos/gdata/drive_system_service.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_SYSTEM_SERVICE_H_ -#define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_SYSTEM_SERVICE_H_ +#ifndef CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_SYSTEM_SERVICE_H_ +#define CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_SYSTEM_SERVICE_H_ #include <string> @@ -28,13 +28,13 @@ class GDataDownloadObserver; class GDataSyncClient; class GDataUploader; -// GDataSystemService runs the GData system, including the Drive file system +// DriveSystemService runs the Drive system, including the Drive file system // implementation for the file manager, and some other sub systems. // // The class is essentially a container that manages lifetime of the objects -// that are used to run the GData system. The GDataSystemService object is +// that are used to run the Drive system. The DriveSystemService object is // created per-profile. -class GDataSystemService : public ProfileKeyedService { +class DriveSystemService : public ProfileKeyedService { public: DriveServiceInterface* drive_service() { return drive_service_.get(); } DriveCache* cache() { return cache_; } @@ -52,8 +52,8 @@ class GDataSystemService : public ProfileKeyedService { virtual void Shutdown() OVERRIDE; private: - explicit GDataSystemService(Profile* profile); - virtual ~GDataSystemService(); + explicit DriveSystemService(Profile* profile); + virtual ~DriveSystemService(); // Initializes the object. This function should be called before any // other functions. @@ -70,7 +70,7 @@ class GDataSystemService : public ProfileKeyedService { DriveFileError error, const FilePath& file_path); - friend class GDataSystemServiceFactory; + friend class DriveSystemServiceFactory; Profile* profile_; scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; @@ -82,24 +82,24 @@ class GDataSystemService : public ProfileKeyedService { scoped_ptr<FileWriteHelper> file_write_helper_; scoped_ptr<GDataDownloadObserver> download_observer_; scoped_ptr<GDataSyncClient> sync_client_; - base::WeakPtrFactory<GDataSystemService> weak_ptr_factory_; + base::WeakPtrFactory<DriveSystemService> weak_ptr_factory_; - DISALLOW_COPY_AND_ASSIGN(GDataSystemService); + DISALLOW_COPY_AND_ASSIGN(DriveSystemService); }; -// Singleton that owns all GDataSystemServices and associates them with +// Singleton that owns all DriveSystemServices and associates them with // Profiles. -class GDataSystemServiceFactory : public ProfileKeyedServiceFactory { +class DriveSystemServiceFactory : public ProfileKeyedServiceFactory { public: - // Returns the GDataSystemService for |profile|, creating it if it is not + // Returns the DriveSystemService for |profile|, creating it if it is not // yet created. - static GDataSystemService* GetForProfile(Profile* profile); - // Returns the GDataSystemService that is already associated with |profile|, + static DriveSystemService* GetForProfile(Profile* profile); + // Returns the DriveSystemService that is already associated with |profile|, // if it is not yet created it will return NULL. - static GDataSystemService* FindForProfile(Profile* profile); + static DriveSystemService* FindForProfile(Profile* profile); - // Returns the GDataSystemServiceFactory instance. - static GDataSystemServiceFactory* GetInstance(); + // Returns the DriveSystemServiceFactory instance. + static DriveSystemServiceFactory* GetInstance(); // Sets drive service that should be used to initialize file system in test. // Should be called before the service is created. @@ -115,10 +115,10 @@ class GDataSystemServiceFactory : public ProfileKeyedServiceFactory { static void set_cache_root_for_test(const std::string& cache_root); private: - friend struct DefaultSingletonTraits<GDataSystemServiceFactory>; + friend struct DefaultSingletonTraits<DriveSystemServiceFactory>; - GDataSystemServiceFactory(); - virtual ~GDataSystemServiceFactory(); + DriveSystemServiceFactory(); + virtual ~DriveSystemServiceFactory(); // ProfileKeyedServiceFactory: virtual ProfileKeyedService* BuildServiceInstanceFor( @@ -127,4 +127,4 @@ class GDataSystemServiceFactory : public ProfileKeyedServiceFactory { } // namespace gdata -#endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_SYSTEM_SERVICE_H_ +#endif // CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_SYSTEM_SERVICE_H_ diff --git a/chrome/browser/chromeos/gdata/drive_task_executor.cc b/chrome/browser/chromeos/gdata/drive_task_executor.cc index 9d98cff..312f73d 100644 --- a/chrome/browser/chromeos/gdata/drive_task_executor.cc +++ b/chrome/browser/chromeos/gdata/drive_task_executor.cc @@ -12,7 +12,7 @@ #include "chrome/browser/chromeos/extensions/file_browser_private_api.h" #include "chrome/browser/chromeos/gdata/drive.pb.h" #include "chrome/browser/chromeos/gdata/drive_service_interface.h" -#include "chrome/browser/chromeos/gdata/gdata_system_service.h" +#include "chrome/browser/chromeos/gdata/drive_system_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/ui/browser.h" @@ -59,8 +59,8 @@ bool DriveTaskExecutor::ExecuteAndNotify( raw_paths.push_back(url.virtual_path()); } - GDataSystemService* system_service = - GDataSystemServiceFactory::GetForProfile(profile()); + DriveSystemService* system_service = + DriveSystemServiceFactory::GetForProfile(profile()); DCHECK(current_index_ == 0); if (!system_service || !system_service->file_system()) return false; @@ -85,8 +85,8 @@ void DriveTaskExecutor::OnFileEntryFetched( if (!current_index_) return; - GDataSystemService* system_service = - GDataSystemServiceFactory::GetForProfile(profile()); + DriveSystemService* system_service = + DriveSystemServiceFactory::GetForProfile(profile()); // Here, we are only insterested in files. if (entry_proto.get() && !entry_proto->has_file_specific_info()) @@ -121,8 +121,8 @@ void DriveTaskExecutor::OnAppAuthorized( if (!current_index_) return; - GDataSystemService* system_service = - GDataSystemServiceFactory::GetForProfile(profile()); + DriveSystemService* system_service = + DriveSystemServiceFactory::GetForProfile(profile()); if (!system_service || error != HTTP_SUCCESS) { Done(false); diff --git a/chrome/browser/chromeos/gdata/file_write_helper.cc b/chrome/browser/chromeos/gdata/file_write_helper.cc index b64733a..e437e8c 100644 --- a/chrome/browser/chromeos/gdata/file_write_helper.cc +++ b/chrome/browser/chromeos/gdata/file_write_helper.cc @@ -14,12 +14,12 @@ namespace gdata { FileWriteHelper::FileWriteHelper(DriveFileSystemInterface* file_system) : file_system_(file_system), weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { - // Must be created in GDataSystemService. + // Must be created in DriveSystemService. DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); } FileWriteHelper::~FileWriteHelper() { - // Must be destroyed in GDataSystemService. + // Must be destroyed in DriveSystemService. DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); } diff --git a/chrome/browser/chromeos/gdata/file_write_helper.h b/chrome/browser/chromeos/gdata/file_write_helper.h index 09e11f4..71a877a 100644 --- a/chrome/browser/chromeos/gdata/file_write_helper.h +++ b/chrome/browser/chromeos/gdata/file_write_helper.h @@ -44,7 +44,7 @@ class FileWriteHelper { const FilePath& local_cache_path); void PrepareWritableFileAndRunAfterCallback(const FilePath& file_path); - // File system owned by GDataSystemService. + // File system owned by DriveSystemService. DriveFileSystemInterface* file_system_; // WeakPtrFactory bound to the UI thread. diff --git a/chrome/browser/chromeos/gdata/gdata_download_observer.cc b/chrome/browser/chromeos/gdata/gdata_download_observer.cc index bf165f8..f42118e 100644 --- a/chrome/browser/chromeos/gdata/gdata_download_observer.cc +++ b/chrome/browser/chromeos/gdata/gdata_download_observer.cc @@ -12,7 +12,7 @@ #include "chrome/browser/chromeos/gdata/drive.pb.h" #include "chrome/browser/chromeos/gdata/drive_file_system_interface.h" #include "chrome/browser/chromeos/gdata/drive_service_interface.h" -#include "chrome/browser/chromeos/gdata/gdata_system_service.h" +#include "chrome/browser/chromeos/gdata/drive_system_service.h" #include "chrome/browser/chromeos/gdata/gdata_upload_file_info.h" #include "chrome/browser/chromeos/gdata/gdata_uploader.h" #include "chrome/browser/chromeos/gdata/gdata_util.h" @@ -103,9 +103,9 @@ void RunSubstituteGDataDownloadCallback( callback.Run(*file_path); } -GDataSystemService* GetSystemService(Profile* profile) { - GDataSystemService* system_service = - GDataSystemServiceFactory::GetForProfile( +DriveSystemService* GetSystemService(Profile* profile) { + DriveSystemService* system_service = + DriveSystemServiceFactory::GetForProfile( profile ? profile : ProfileManager::GetDefaultProfile()); DCHECK(system_service); return system_service; diff --git a/chrome/browser/chromeos/gdata/gdata_download_observer.h b/chrome/browser/chromeos/gdata/gdata_download_observer.h index ad12a20..050ec6e 100644 --- a/chrome/browser/chromeos/gdata/gdata_download_observer.h +++ b/chrome/browser/chromeos/gdata/gdata_download_observer.h @@ -150,9 +150,9 @@ class GDataDownloadObserver : public content::DownloadManager::Observer, void MoveFileToDriveCache(content::DownloadItem* download); // Private data. - // The uploader owned by GDataSystemService. Used to trigger file uploads. + // The uploader owned by DriveSystemService. Used to trigger file uploads. GDataUploader* gdata_uploader_; - // The file system owned by GDataSystemService. + // The file system owned by DriveSystemService. DriveFileSystemInterface* file_system_; // Observe the DownloadManager for new downloads. content::DownloadManager* download_manager_; diff --git a/chrome/browser/chromeos/gdata/gdata_protocol_handler.cc b/chrome/browser/chromeos/gdata/gdata_protocol_handler.cc index 079b111..6b3c81d 100644 --- a/chrome/browser/chromeos/gdata/gdata_protocol_handler.cc +++ b/chrome/browser/chromeos/gdata/gdata_protocol_handler.cc @@ -20,8 +20,8 @@ #include "chrome/browser/chromeos/gdata/drive.pb.h" #include "chrome/browser/chromeos/gdata/drive_file_system_interface.h" #include "chrome/browser/chromeos/gdata/drive_service_interface.h" +#include "chrome/browser/chromeos/gdata/drive_system_service.h" #include "chrome/browser/chromeos/gdata/gdata_errorcode.h" -#include "chrome/browser/chromeos/gdata/gdata_system_service.h" #include "chrome/browser/chromeos/gdata/gdata_util.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile_manager.h" @@ -104,21 +104,21 @@ bool ParseDriveUrl(const std::string& path, std::string* resource_id) { return resource_id->size(); } -// Helper function to get GDataSystemService from Profile. -GDataSystemService* GetSystemService() { - return GDataSystemServiceFactory::GetForProfile( +// Helper function to get DriveSystemService from Profile. +DriveSystemService* GetSystemService() { + return DriveSystemServiceFactory::GetForProfile( ProfileManager::GetDefaultProfile()); } // Helper function to get DriveFileSystem from Profile on UI thread. void GetFileSystemOnUIThread(DriveFileSystemInterface** file_system) { - GDataSystemService* system_service = GetSystemService(); + DriveSystemService* system_service = GetSystemService(); *file_system = system_service ? system_service->file_system() : NULL; } // Helper function to cancel GData download operation on UI thread. void CancelGDataDownloadOnUIThread(const FilePath& gdata_file_path) { - GDataSystemService* system_service = GetSystemService(); + DriveSystemService* system_service = GetSystemService(); if (system_service) system_service->drive_service()->operation_registry()->CancelForFilePath( gdata_file_path); diff --git a/chrome/browser/chromeos/gdata/gdata_sync_client.h b/chrome/browser/chromeos/gdata/gdata_sync_client.h index 91aede1..95e4d2b 100644 --- a/chrome/browser/chromeos/gdata/gdata_sync_client.h +++ b/chrome/browser/chromeos/gdata/gdata_sync_client.h @@ -183,8 +183,8 @@ class GDataSyncClient : public DriveFileSystemInterface::Observer, const content::NotificationSource& source, const content::NotificationDetails& details) OVERRIDE; Profile* profile_; - DriveFileSystemInterface* file_system_; // Owned by GDataSystemService. - DriveCache* cache_; // Owned by GDataSystemService. + DriveFileSystemInterface* file_system_; // Owned by DriveSystemService. + DriveCache* cache_; // Owned by DriveSystemService. scoped_ptr<PrefChangeRegistrar> registrar_; // The queue of tasks used to fetch/upload files in the background diff --git a/chrome/browser/chromeos/gdata/gdata_uploader.h b/chrome/browser/chromeos/gdata/gdata_uploader.h index f7e1d10..3d853ff 100644 --- a/chrome/browser/chromeos/gdata/gdata_uploader.h +++ b/chrome/browser/chromeos/gdata/gdata_uploader.h @@ -132,7 +132,7 @@ class GDataUploader : public GDataUploaderInterface { // ID assigned to |upload_file_info|. int StartUploadFile(scoped_ptr<UploadFileInfo> upload_file_info); - // Pointers to DriveServiceInterface object owned by GDataSystemService. + // Pointers to DriveServiceInterface object owned by DriveSystemService. // The lifetime of this object is guaranteed to exceed that of the // GDataUploader instance. DriveServiceInterface* drive_service_; diff --git a/chrome/browser/chromeos/gdata/gdata_util.cc b/chrome/browser/chromeos/gdata/gdata_util.cc index f99c72f..128f1ea 100644 --- a/chrome/browser/chromeos/gdata/gdata_util.cc +++ b/chrome/browser/chromeos/gdata/gdata_util.cc @@ -24,8 +24,8 @@ #include "base/tracked_objects.h" #include "chrome/browser/chromeos/gdata/drive.pb.h" #include "chrome/browser/chromeos/gdata/drive_file_system_interface.h" +#include "chrome/browser/chromeos/gdata/drive_system_service.h" #include "chrome/browser/chromeos/gdata/file_write_helper.h" -#include "chrome/browser/chromeos/gdata/gdata_system_service.h" #include "chrome/browser/chromeos/login/user.h" #include "chrome/browser/chromeos/login/user_manager.h" #include "chrome/browser/prefs/pref_service.h" @@ -62,20 +62,20 @@ const int kReadOnlyFilePermissions = base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_ASYNC; DriveFileSystemInterface* GetDriveFileSystem(Profile* profile) { - GDataSystemService* system_service = - GDataSystemServiceFactory::GetForProfile(profile); + DriveSystemService* system_service = + DriveSystemServiceFactory::GetForProfile(profile); return system_service ? system_service->file_system() : NULL; } DriveCache* GetDriveCache(Profile* profile) { - GDataSystemService* system_service = - GDataSystemServiceFactory::GetForProfile(profile); + DriveSystemService* system_service = + DriveSystemServiceFactory::GetForProfile(profile); return system_service ? system_service->cache() : NULL; } FileWriteHelper* GetFileWriteHelper(Profile* profile) { - GDataSystemService* system_service = - GDataSystemServiceFactory::GetForProfile(profile); + DriveSystemService* system_service = + DriveSystemServiceFactory::GetForProfile(profile); return system_service ? system_service->file_write_helper() : NULL; } diff --git a/chrome/browser/chromeos/gdata/gdata_wapi_service.h b/chrome/browser/chromeos/gdata/gdata_wapi_service.h index 6b2b9b3..b2fb964 100644 --- a/chrome/browser/chromeos/gdata/gdata_wapi_service.h +++ b/chrome/browser/chromeos/gdata/gdata_wapi_service.h @@ -27,7 +27,7 @@ class OperationRunner; // works as a thin wrapper for the API. class GDataWapiService : public DriveServiceInterface { public: - // Instance is usually created by GDataSystemServiceFactory and owned by + // Instance is usually created by DriveSystemServiceFactory and owned by // DriveFileSystem. GDataWapiService(); virtual ~GDataWapiService(); diff --git a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc index e48109e..bae34d5 100644 --- a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc +++ b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc @@ -36,7 +36,7 @@ #include "chrome/browser/chromeos/cros/cros_library.h" #include "chrome/browser/chromeos/cros/network_library.h" #include "chrome/browser/chromeos/gdata/drive_service_interface.h" -#include "chrome/browser/chromeos/gdata/gdata_system_service.h" +#include "chrome/browser/chromeos/gdata/drive_system_service.h" #include "chrome/browser/chromeos/gdata/gdata_util.h" #include "chrome/browser/chromeos/gdata/operation_registry.h" #include "chrome/browser/chromeos/input_method/input_method_manager.h" @@ -76,8 +76,8 @@ #include "grit/generated_resources.h" #include "ui/base/l10n/l10n_util.h" -using gdata::GDataSystemService; -using gdata::GDataSystemServiceFactory; +using gdata::DriveSystemService; +using gdata::DriveSystemServiceFactory; using gdata::OperationRegistry; namespace chromeos { @@ -239,8 +239,8 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate, // Stop observing gdata operations. Profile* profile = ProfileManager::GetDefaultProfile(); if (gdata::util::IsGDataAvailable(profile)) { - GDataSystemService* system_service = - GDataSystemServiceFactory::FindForProfile(profile); + DriveSystemService* system_service = + DriveSystemServiceFactory::FindForProfile(profile); if (system_service) { system_service->drive_service()->operation_registry()-> RemoveObserver(this); @@ -457,8 +457,8 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate, if (!gdata::util::IsGDataAvailable(profile)) return; - GDataSystemService* system_service = - GDataSystemServiceFactory::FindForProfile(profile); + DriveSystemService* system_service = + DriveSystemServiceFactory::FindForProfile(profile); if (!system_service) return; @@ -472,8 +472,8 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate, if (!gdata::util::IsGDataAvailable(profile)) return; - GDataSystemService* system_service = - GDataSystemServiceFactory::FindForProfile(profile); + DriveSystemService* system_service = + DriveSystemServiceFactory::FindForProfile(profile); if (!system_service) return; @@ -738,8 +738,8 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate, profile->GetPrefs()->GetInteger(prefs::kLanguageXkbRemapSearchKeyTo); if (gdata::util::IsGDataAvailable(profile)) { - GDataSystemService* system_service = - GDataSystemServiceFactory::FindForProfile(profile); + DriveSystemService* system_service = + DriveSystemServiceFactory::FindForProfile(profile); if (!system_service) return; @@ -1134,8 +1134,8 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate, if (!gdata::util::IsGDataAvailable(profile)) return; - GDataSystemService* system_service = - GDataSystemServiceFactory::FindForProfile(profile); + DriveSystemService* system_service = + DriveSystemServiceFactory::FindForProfile(profile); if (!system_service) return; diff --git a/chrome/browser/download/download_prefs.cc b/chrome/browser/download/download_prefs.cc index 6bf07ff..daa3ef7 100644 --- a/chrome/browser/download/download_prefs.cc +++ b/chrome/browser/download/download_prefs.cc @@ -29,7 +29,7 @@ #include "content/public/browser/save_page_type.h" #if defined(OS_CHROMEOS) -#include "chrome/browser/chromeos/gdata/gdata_system_service.h" +#include "chrome/browser/chromeos/gdata/drive_system_service.h" #include "chrome/browser/chromeos/gdata/gdata_util.h" #endif @@ -127,11 +127,11 @@ DownloadPrefs* DownloadPrefs::FromBrowserContext( FilePath DownloadPrefs::DownloadPath() const { #if defined(OS_CHROMEOS) - // If the download path is under /drive, and GDataSystemService isn't + // If the download path is under /drive, and DriveSystemService isn't // available (which it isn't for incognito mode, for instance), use the // default download directory (/Downloads). if (gdata::util::IsUnderGDataMountPoint(*download_path_) && - !gdata::GDataSystemServiceFactory::GetForProfile(profile_)) + !gdata::DriveSystemServiceFactory::GetForProfile(profile_)) return download_util::GetDefaultDownloadDirectory(); #endif return *download_path_; diff --git a/chrome/browser/ui/webui/chromeos/drive_internals_ui.cc b/chrome/browser/ui/webui/chromeos/drive_internals_ui.cc index 762afb1..f6ab1f7 100644 --- a/chrome/browser/ui/webui/chromeos/drive_internals_ui.cc +++ b/chrome/browser/ui/webui/chromeos/drive_internals_ui.cc @@ -16,7 +16,7 @@ #include "chrome/browser/chromeos/gdata/drive_cache.h" #include "chrome/browser/chromeos/gdata/drive_file_system_interface.h" #include "chrome/browser/chromeos/gdata/drive_service_interface.h" -#include "chrome/browser/chromeos/gdata/gdata_system_service.h" +#include "chrome/browser/chromeos/gdata/drive_system_service.h" #include "chrome/browser/chromeos/gdata/gdata_util.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/webui/chrome_web_ui_data_source.h" @@ -168,8 +168,8 @@ class DriveInternalsWebUIHandler : public content::WebUIMessageHandler { // WebUIMessageHandler override. virtual void RegisterMessages() OVERRIDE; - // Returns a GDataSystemService. - gdata::GDataSystemService* GetSystemService(); + // Returns a DriveSystemService. + gdata::DriveSystemService* GetSystemService(); // Called when the page is first loaded. void OnPageLoaded(const base::ListValue* args); @@ -209,15 +209,15 @@ void DriveInternalsWebUIHandler::RegisterMessages() { weak_ptr_factory_.GetWeakPtr())); } -gdata::GDataSystemService* DriveInternalsWebUIHandler::GetSystemService() { +gdata::DriveSystemService* DriveInternalsWebUIHandler::GetSystemService() { Profile* profile = Profile::FromWebUI(web_ui()); - return gdata::GDataSystemServiceFactory::GetForProfile(profile); + return gdata::DriveSystemServiceFactory::GetForProfile(profile); } void DriveInternalsWebUIHandler::OnPageLoaded(const base::ListValue* args) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - gdata::GDataSystemService* system_service = GetSystemService(); + gdata::DriveSystemService* system_service = GetSystemService(); // |system_service| may be NULL in the guest/incognito mode. if (!system_service) return; @@ -275,7 +275,7 @@ void DriveInternalsWebUIHandler::OnGetGCacheContents( *gcache_summary); // Start updating the file system tree section, if we have access token. - gdata::GDataSystemService* system_service = GetSystemService(); + gdata::DriveSystemService* system_service = GetSystemService(); if (!system_service->drive_service()->HasAccessToken()) return; diff --git a/chrome/browser/ui/webui/feedback_ui.cc b/chrome/browser/ui/webui/feedback_ui.cc index 8489197..1284d03 100644 --- a/chrome/browser/ui/webui/feedback_ui.cc +++ b/chrome/browser/ui/webui/feedback_ui.cc @@ -61,7 +61,7 @@ #include "chrome/browser/chromeos/cros/cros_library.h" #include "chrome/browser/chromeos/gdata/drive.pb.h" #include "chrome/browser/chromeos/gdata/drive_file_system_interface.h" -#include "chrome/browser/chromeos/gdata/gdata_system_service.h" +#include "chrome/browser/chromeos/gdata/drive_system_service.h" #include "chrome/browser/chromeos/gdata/gdata_util.h" #include "chrome/browser/chromeos/login/user_manager.h" #include "chrome/browser/chromeos/system/syslogs_provider.h" @@ -585,7 +585,7 @@ void FeedbackHandler::GetMostRecentScreenshotsGData( const FilePath& filepath, std::vector<std::string>* saved_screenshots, size_t max_saved, base::Closure callback) { gdata::DriveFileSystemInterface* file_system = - gdata::GDataSystemServiceFactory::GetForProfile( + gdata::DriveSystemServiceFactory::GetForProfile( Profile::FromWebUI(web_ui()))->file_system(); file_system->ReadDirectoryByPath( gdata::util::ExtractGDataPath(filepath), diff --git a/chrome/browser/ui/webui/screenshot_source.cc b/chrome/browser/ui/webui/screenshot_source.cc index 4597a1a..b95ecd0 100644 --- a/chrome/browser/ui/webui/screenshot_source.cc +++ b/chrome/browser/ui/webui/screenshot_source.cc @@ -22,7 +22,7 @@ #include "ash/shell.h" #include "ash/shell_delegate.h" #include "chrome/browser/chromeos/gdata/drive_file_system_interface.h" -#include "chrome/browser/chromeos/gdata/gdata_system_service.h" +#include "chrome/browser/chromeos/gdata/drive_system_service.h" #include "chrome/browser/chromeos/gdata/gdata_util.h" #include "content/public/browser/browser_thread.h" #endif @@ -96,7 +96,7 @@ void ScreenshotSource::SendScreenshot(const std::string& screenshot_path, FilePath download_path = download_prefs->DownloadPath(); if (gdata::util::IsUnderGDataMountPoint(download_path)) { gdata::DriveFileSystemInterface* file_system = - gdata::GDataSystemServiceFactory::GetForProfile( + gdata::DriveSystemServiceFactory::GetForProfile( profile_)->file_system(); file_system->GetFileByResourceId( decoded_filename, diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index 59c6253..cbb1fd9 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -584,6 +584,8 @@ 'browser/chromeos/gdata/drive_resource_metadata.cc', 'browser/chromeos/gdata/drive_resource_metadata.h', 'browser/chromeos/gdata/drive_service_interface.h', + 'browser/chromeos/gdata/drive_system_service.cc', + 'browser/chromeos/gdata/drive_system_service.h', 'browser/chromeos/gdata/drive_task_executor.cc', 'browser/chromeos/gdata/drive_task_executor.h', 'browser/chromeos/gdata/drive_webapps_registry.cc', @@ -601,8 +603,6 @@ 'browser/chromeos/gdata/gdata_protocol_handler.h', 'browser/chromeos/gdata/gdata_sync_client.cc', 'browser/chromeos/gdata/gdata_sync_client.h', - 'browser/chromeos/gdata/gdata_system_service.cc', - 'browser/chromeos/gdata/gdata_system_service.h', 'browser/chromeos/gdata/gdata_upload_file_info.cc', 'browser/chromeos/gdata/gdata_upload_file_info.h', 'browser/chromeos/gdata/gdata_uploader.cc', |