diff options
author | satorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-22 23:17:15 +0000 |
---|---|---|
committer | satorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-22 23:17:15 +0000 |
commit | bf57c87e958b6473f147938d4b21bf68ff9e7dd3 (patch) | |
tree | d129f6e0b2cac738a24aaa54eabf232274b08fbb /chrome/browser/download | |
parent | 688a01818d5b23710798ec762044c9d2138e459d (diff) | |
download | chromium_src-bf57c87e958b6473f147938d4b21bf68ff9e7dd3.zip chromium_src-bf57c87e958b6473f147938d4b21bf68ff9e7dd3.tar.gz chromium_src-bf57c87e958b6473f147938d4b21bf68ff9e7dd3.tar.bz2 |
gdata: Remove parasites from GDataFileSystem.
GDataUploader, GDataDownloadObserver, and GDataSyncClient, were owned by
GDataFileSystem, just because there was no better owner.
Introduce GDataSystemService, a profile-keyed service, to be the new owner
of these objects. GDataFileSystem is also owned by the new owner, and
becomes a nomral object than a profile-keyed-service.
The motivation of this change is to make GDataFileSystem, which is already
overly complex, a little bit simpler, and make it easier to write tests.
BUG=chromium-os:28238
TEST=run tests, the file manager works as before
Review URL: https://chromiumcodereview.appspot.com/9808033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128334 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download')
-rw-r--r-- | chrome/browser/download/download_file_picker_chromeos.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/chrome/browser/download/download_file_picker_chromeos.cc b/chrome/browser/download/download_file_picker_chromeos.cc index 560b2b5..a538301 100644 --- a/chrome/browser/download/download_file_picker_chromeos.cc +++ b/chrome/browser/download/download_file_picker_chromeos.cc @@ -13,6 +13,7 @@ #include "content/public/browser/download_manager.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_system_service.h" #include "chrome/browser/chromeos/gdata/gdata_util.h" #include "chrome/browser/profiles/profile_manager.h" @@ -68,10 +69,10 @@ void DownloadFilePickerChromeOS::FileSelected(const FilePath& path, RecordFileSelected(path); if (download_manager_) { - gdata::GDataFileSystem* file_system = - gdata::GDataFileSystemFactory::GetForProfile( + gdata::GDataSystemService* system_service = + gdata::GDataSystemServiceFactory::GetForProfile( ProfileManager::GetDefaultProfile()); - if (file_system && gdata::util::IsUnderGDataMountPoint(path)) { + if (system_service && gdata::util::IsUnderGDataMountPoint(path)) { // If we're trying to download a file into gdata, save path in external // data. content::DownloadItem* download = @@ -81,7 +82,7 @@ void DownloadFilePickerChromeOS::FileSelected(const FilePath& path, download->SetDisplayName(path.BaseName()); const FilePath download_cache_path = - file_system->GetGDataTempDownloadFolderPath(); + system_service->file_system()->GetGDataTempDownloadFolderPath(); // Swap the gdata path with a local path. Local path must be created // on the IO thread pool. |