Rename GDataFileSystem* to DriveFileSystem*
In this CL,
* gdata_file_system_interface.h has been renamed to drive_file_system_interface.{h,cc}
* gdata_file_system.{h,cc} have been renamed to drive_file_system.{h,cc}
* same for gdata_file_system_unittest.cc, gdata_file_system_proxy.{h,cc}, mock_gdata_file_system.{h,cc}
* class GDataFileSystemInterface has been renamed to DriveFileSystemInterface.
* class DriveFileSystem has been renamed to DriveFileSystem.
This change applies on top of
https://chromiumcodereview.appspot.com/10878023/
BUG=137151
TEST=pass all existing tests.
[email protected], [email protected], [email protected], [email protected]
Review URL: https://chromiumcodereview.appspot.com/10874028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153044 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/chromeos/extensions/external_filesystem_apitest.cc b/chrome/browser/chromeos/extensions/external_filesystem_apitest.cc
index 875d6071..1131090e 100644
--- a/chrome/browser/chromeos/extensions/external_filesystem_apitest.cc
+++ b/chrome/browser/chromeos/extensions/external_filesystem_apitest.cc
@@ -12,7 +12,7 @@
#include "base/scoped_temp_dir.h"
#include "base/threading/worker_pool.h"
#include "base/values.h"
-#include "chrome/browser/chromeos/gdata/gdata_file_system.h"
+#include "chrome/browser/chromeos/gdata/drive_file_system.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"
@@ -88,7 +88,7 @@
};
// TODO(tbarzic): We should probably share GetTestFilePath and LoadJSONFile
-// with gdata_file_system_unittest.
+// with drive_file_system_unittest.
// Generates file path in gdata test directory for a file with name |filename|.
FilePath GetTestFilePath(const FilePath::StringType& filename) {
FilePath path;
diff --git a/chrome/browser/chromeos/extensions/file_browser_event_router.cc b/chrome/browser/chromeos/extensions/file_browser_event_router.cc
index c6f716e..738a7a12d 100644
--- a/chrome/browser/chromeos/extensions/file_browser_event_router.cc
+++ b/chrome/browser/chromeos/extensions/file_browser_event_router.cc
@@ -36,7 +36,6 @@
using chromeos::disks::DiskMountManager;
using chromeos::disks::DiskMountManagerEventType;
using content::BrowserThread;
-using gdata::GDataFileSystemInterface;
using gdata::GDataSystemService;
using gdata::GDataSystemServiceFactory;
@@ -271,7 +270,7 @@
void FileBrowserEventRouter::HandleRemoteUpdateRequestOnUIThread(bool start) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- gdata::GDataFileSystemInterface* file_system = GetRemoteFileSystem();
+ gdata::DriveFileSystemInterface* file_system = GetRemoteFileSystem();
DCHECK(file_system);
if (start) {
@@ -818,7 +817,7 @@
return virtual_path_;
}
-gdata::GDataFileSystemInterface*
+gdata::DriveFileSystemInterface*
FileBrowserEventRouter::GetRemoteFileSystem() const {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
gdata::GDataSystemService* system_service =
diff --git a/chrome/browser/chromeos/extensions/file_browser_event_router.h b/chrome/browser/chromeos/extensions/file_browser_event_router.h
index bcd509376..4cf30db 100644
--- a/chrome/browser/chromeos/extensions/file_browser_event_router.h
+++ b/chrome/browser/chromeos/extensions/file_browser_event_router.h
@@ -16,7 +16,7 @@
#include "base/synchronization/lock.h"
#include "chrome/browser/chromeos/cros/network_library.h"
#include "chrome/browser/chromeos/disks/disk_mount_manager.h"
-#include "chrome/browser/chromeos/gdata/gdata_file_system_interface.h"
+#include "chrome/browser/chromeos/gdata/drive_file_system_interface.h"
#include "chrome/browser/chromeos/gdata/operation_registry.h"
#include "chrome/browser/profiles/refcounted_profile_keyed_service.h"
#include "chrome/browser/profiles/refcounted_profile_keyed_service_factory.h"
@@ -36,7 +36,7 @@
public chromeos::NetworkLibrary::NetworkManagerObserver,
public content::NotificationObserver,
public gdata::OperationRegistry::Observer,
- public gdata::GDataFileSystemInterface::Observer {
+ public gdata::DriveFileSystemInterface::Observer {
public:
// RefcountedProfileKeyedService overrides.
virtual void ShutdownOnUIThread() OVERRIDE;
@@ -83,7 +83,7 @@
OVERRIDE;
virtual void OnAuthenticationFailed() OVERRIDE;
- // gdata::GDataFileSystemInterface::Observer overrides.
+ // gdata::DriveFileSystemInterface::Observer overrides.
virtual void OnDirectoryChanged(const FilePath& directory_path) OVERRIDE;
virtual void OnDocumentFeedFetched(int num_accumulated_entries) OVERRIDE;
virtual void OnFileSystemMounted() OVERRIDE;
@@ -182,8 +182,8 @@
const std::string& device_path,
bool small);
- // Returns the GDataFileSystem for the current profile.
- gdata::GDataFileSystemInterface* GetRemoteFileSystem() const;
+ // Returns the DriveFileSystem for the current profile.
+ gdata::DriveFileSystemInterface* GetRemoteFileSystem() const;
// Handles requests to start and stop periodic updates on remote file system.
// When |start| is set to true, this function starts periodic updates only if
diff --git a/chrome/browser/chromeos/extensions/file_browser_private_api.cc b/chrome/browser/chromeos/extensions/file_browser_private_api.cc
index 7f9229c..21bb18a7 100644
--- a/chrome/browser/chromeos/extensions/file_browser_private_api.cc
+++ b/chrome/browser/chromeos/extensions/file_browser_private_api.cc
@@ -853,7 +853,7 @@
// If "localPath" parameter is set, use it as the real path.
// TODO(satorux): Eventually, we should be able to get the real path
- // from GDataFileSystem instead of passing through with filesystem
+ // from DriveFileSystem instead of passing through with filesystem
// URLs. crosbug.com/27510.
//
// TODO(satorux): GURL::query() is not yet supported for filesystem:
@@ -1229,7 +1229,7 @@
gdata::GDataSystemService* system_service =
gdata::GDataSystemServiceFactory::GetForProfile(profile_);
- gdata::GDataFileSystemInterface* file_system =
+ gdata::DriveFileSystemInterface* file_system =
system_service->file_system();
file_system->GetAvailableSpace(
@@ -2230,14 +2230,14 @@
destination_file,
base::Bind(&TransferFileFunction::OnTransferCompleted, this));
} else if (!source_file_under_gdata && destination_file_under_gdata) {
- // Transfer a file from local to gdata file system
+ // Transfer a file from local to Drive file system
destination_file = gdata::util::ExtractGDataPath(destination_file);
system_service->file_system()->TransferFileFromLocalToRemote(
source_file,
destination_file,
base::Bind(&TransferFileFunction::OnTransferCompleted, this));
} else {
- // Local-to-local or gdata-to-gdata file transfers should be done via
+ // Local-to-local or Drive-to-Drive file transfers should be done via
// FileEntry.copyTo in the File API and are thus not supported here.
NOTREACHED();
SendResponse(false);
@@ -2353,7 +2353,7 @@
DCHECK(results.get());
base::ListValue* entries = new ListValue();
- // Convert gdata files to something File API stack can understand.
+ // Convert Drive files to something File API stack can understand.
for (size_t i = 0; i < results->size(); ++i) {
DictionaryValue* entry = new DictionaryValue();
entry->SetString("fileSystemName", file_system_name_);
diff --git a/chrome/browser/chromeos/extensions/file_browser_private_api.h b/chrome/browser/chromeos/extensions/file_browser_private_api.h
index 343e82e7..eb953e8e 100644
--- a/chrome/browser/chromeos/extensions/file_browser_private_api.h
+++ b/chrome/browser/chromeos/extensions/file_browser_private_api.h
@@ -589,7 +589,7 @@
// response if the queue is empty.
void GetFileOrSendResponse();
- // Called by GDataFileSystem::GetFile(). Pops the file from
+ // Called by DriveFileSystem::GetFile(). Pops the file from
// |remaining_gdata_paths_|, and calls GetFileOrSendResponse().
void OnFileReady(gdata::DriveFileError error,
const FilePath& local_path,
@@ -651,7 +651,7 @@
// GetLocalPathsOnFileThreadAndRunCallbackOnUIThread()
void GetLocalPathsResponseOnUIThread(const SelectedFileInfoList& files);
- // Helper callback for handling response from GDataFileSystem::TransferFile().
+ // Helper callback for handling response from DriveFileSystem::TransferFile().
void OnTransferCompleted(gdata::DriveFileError error);
};
diff --git a/chrome/browser/chromeos/extensions/file_manager_util.cc b/chrome/browser/chromeos/extensions/file_manager_util.cc
index 8899891..12d3c9ed 100644
--- a/chrome/browser/chromeos/extensions/file_manager_util.cc
+++ b/chrome/browser/chromeos/extensions/file_manager_util.cc
@@ -15,8 +15,8 @@
#include "base/values.h"
#include "chrome/browser/chromeos/extensions/file_handler_util.h"
#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_file_system.h"
#include "chrome/browser/chromeos/gdata/gdata_system_service.h"
#include "chrome/browser/chromeos/gdata/gdata_util.h"
#include "chrome/browser/chromeos/gdata/operation_registry.h"
diff --git a/chrome/browser/chromeos/gdata/drive_api_service.h b/chrome/browser/chromeos/gdata/drive_api_service.h
index bcc7ea72..edddcdf 100644
--- a/chrome/browser/chromeos/gdata/drive_api_service.h
+++ b/chrome/browser/chromeos/gdata/drive_api_service.h
@@ -27,7 +27,7 @@
class DriveAPIService : public DriveServiceInterface {
public:
// Instance is usually created by GDataSystemServiceFactory and owned by
- // GDataFileSystem.
+ // DriveFileSystem.
DriveAPIService();
virtual ~DriveAPIService();
diff --git a/chrome/browser/chromeos/gdata/drive_cache.h b/chrome/browser/chromeos/gdata/drive_cache.h
index 2b43e6e..735021b 100644
--- a/chrome/browser/chromeos/gdata/drive_cache.h
+++ b/chrome/browser/chromeos/gdata/drive_cache.h
@@ -65,7 +65,7 @@
typedef base::Callback<void(bool success, const DriveCacheEntry& cache_entry)>
GetCacheEntryCallback;
-// DriveCache is used to maintain cache states of GDataFileSystem.
+// DriveCache is used to maintain cache states of DriveFileSystem.
//
// All non-static public member functions, unless mentioned otherwise (see
// GetCacheFilePath() for example), should be called from the sequenced
@@ -456,7 +456,7 @@
};
-// The minimum free space to keep. GDataFileSystem::GetFileByPath() returns
+// The minimum free space to keep. DriveFileSystem::GetFileByPath() returns
// GDATA_FILE_ERROR_NO_SPACE if the available space is smaller than
// this value.
//
diff --git a/chrome/browser/chromeos/gdata/drive_cache_unittest.cc b/chrome/browser/chromeos/gdata/drive_cache_unittest.cc
index 9431bb3..a2832f0 100644
--- a/chrome/browser/chromeos/gdata/drive_cache_unittest.cc
+++ b/chrome/browser/chromeos/gdata/drive_cache_unittest.cc
@@ -11,7 +11,7 @@
#include "base/threading/sequenced_worker_pool.h"
#include "chrome/browser/chromeos/gdata/drive.pb.h"
#include "chrome/browser/chromeos/gdata/drive_cache.h"
-#include "chrome/browser/chromeos/gdata/gdata_file_system.h"
+#include "chrome/browser/chromeos/gdata/drive_file_system.h"
#include "chrome/browser/chromeos/gdata/gdata_test_util.h"
#include "chrome/browser/chromeos/gdata/gdata_util.h"
#include "chrome/browser/chromeos/gdata/mock_drive_cache_observer.h"
@@ -184,7 +184,7 @@
cache_->GetCacheDirectoryPath(DriveCache::CACHE_TYPE_OUTGOING)));
// Dump some files into cache dirs so that
- // GDataFileSystem::InitializeCacheOnBlockingPool would scan through them
+ // DriveFileSystem::InitializeCacheOnBlockingPool would scan through them
// and populate cache map accordingly.
// Copy files from data dir to cache dir to act as cached files.
diff --git a/chrome/browser/chromeos/gdata/gdata_file_system.cc b/chrome/browser/chromeos/gdata/drive_file_system.cc
similarity index 87%
rename from chrome/browser/chromeos/gdata/gdata_file_system.cc
rename to chrome/browser/chromeos/gdata/drive_file_system.cc
index 88cde5e3..e736925 100644
--- a/chrome/browser/chromeos/gdata/gdata_file_system.cc
+++ b/chrome/browser/chromeos/gdata/drive_file_system.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_file_system.h"
+#include "chrome/browser/chromeos/gdata/drive_file_system.h"
#include <set>
#include <utility>
@@ -103,9 +103,9 @@
// The class to wait for the initial load of root feed and runs the callback
// after the initialization.
-class InitialLoadObserver : public GDataFileSystemInterface::Observer {
+class InitialLoadObserver : public DriveFileSystemInterface::Observer {
public:
- InitialLoadObserver(GDataFileSystemInterface* file_system,
+ InitialLoadObserver(DriveFileSystemInterface* file_system,
const base::Closure& callback)
: file_system_(file_system), callback_(callback) {}
@@ -117,7 +117,7 @@
}
private:
- GDataFileSystemInterface* file_system_;
+ DriveFileSystemInterface* file_system_;
base::Closure callback_;
};
@@ -272,8 +272,8 @@
} // namespace
-// GDataFileSystem::CreateDirectoryParams struct implementation.
-struct GDataFileSystem::CreateDirectoryParams {
+// DriveFileSystem::CreateDirectoryParams struct implementation.
+struct DriveFileSystem::CreateDirectoryParams {
CreateDirectoryParams(const FilePath& created_directory_path,
const FilePath& target_directory_path,
bool is_exclusive,
@@ -288,7 +288,7 @@
FileOperationCallback callback;
};
-GDataFileSystem::CreateDirectoryParams::CreateDirectoryParams(
+DriveFileSystem::CreateDirectoryParams::CreateDirectoryParams(
const FilePath& created_directory_path,
const FilePath& target_directory_path,
bool is_exclusive,
@@ -301,11 +301,11 @@
callback(callback) {
}
-GDataFileSystem::CreateDirectoryParams::~CreateDirectoryParams() {
+DriveFileSystem::CreateDirectoryParams::~CreateDirectoryParams() {
}
-// GDataFileSystem::GetFileCompleteForOpenParams struct implementation.
-struct GDataFileSystem::GetFileCompleteForOpenParams {
+// DriveFileSystem::GetFileCompleteForOpenParams struct implementation.
+struct DriveFileSystem::GetFileCompleteForOpenParams {
GetFileCompleteForOpenParams(const std::string& resource_id,
const std::string& md5);
~GetFileCompleteForOpenParams();
@@ -313,18 +313,18 @@
std::string md5;
};
-GDataFileSystem::GetFileCompleteForOpenParams::GetFileCompleteForOpenParams(
+DriveFileSystem::GetFileCompleteForOpenParams::GetFileCompleteForOpenParams(
const std::string& resource_id,
const std::string& md5)
: resource_id(resource_id),
md5(md5) {
}
-GDataFileSystem::GetFileCompleteForOpenParams::~GetFileCompleteForOpenParams() {
+DriveFileSystem::GetFileCompleteForOpenParams::~GetFileCompleteForOpenParams() {
}
-// GDataFileSystem::GetFileFromCacheParams struct implementation.
-struct GDataFileSystem::GetFileFromCacheParams {
+// DriveFileSystem::GetFileFromCacheParams struct implementation.
+struct DriveFileSystem::GetFileFromCacheParams {
GetFileFromCacheParams(
const FilePath& virtual_file_path,
const FilePath& local_tmp_path,
@@ -346,7 +346,7 @@
const GetContentCallback get_content_callback;
};
-GDataFileSystem::GetFileFromCacheParams::GetFileFromCacheParams(
+DriveFileSystem::GetFileFromCacheParams::GetFileFromCacheParams(
const FilePath& virtual_file_path,
const FilePath& local_tmp_path,
const GURL& content_url,
@@ -365,11 +365,11 @@
get_content_callback(get_content_callback) {
}
-GDataFileSystem::GetFileFromCacheParams::~GetFileFromCacheParams() {
+DriveFileSystem::GetFileFromCacheParams::~GetFileFromCacheParams() {
}
-// GDataFileSystem::StartFileUploadParams implementation.
-struct GDataFileSystem::StartFileUploadParams {
+// DriveFileSystem::StartFileUploadParams implementation.
+struct DriveFileSystem::StartFileUploadParams {
StartFileUploadParams(const FilePath& in_local_file_path,
const FilePath& in_remote_file_path,
const FileOperationCallback& in_callback)
@@ -382,8 +382,8 @@
const FileOperationCallback callback;
};
-// GDataFileSystem::AddUploadedFileParams implementation.
-struct GDataFileSystem::AddUploadedFileParams {
+// DriveFileSystem::AddUploadedFileParams implementation.
+struct DriveFileSystem::AddUploadedFileParams {
AddUploadedFileParams(UploadMode upload_mode,
DriveDirectory* parent_dir,
scoped_ptr<DriveEntry> new_entry,
@@ -409,9 +409,9 @@
};
-// GDataFileSystem class implementation.
+// DriveFileSystem class implementation.
-GDataFileSystem::GDataFileSystem(
+DriveFileSystem::DriveFileSystem(
Profile* profile,
DriveCache* cache,
DriveServiceInterface* drive_service,
@@ -432,7 +432,7 @@
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
}
-void GDataFileSystem::Initialize() {
+void DriveFileSystem::Initialize() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
drive_service_->Initialize(profile_);
@@ -451,7 +451,7 @@
InitializePreferenceObserver();
}
-void GDataFileSystem::CheckForUpdates() {
+void DriveFileSystem::CheckForUpdates() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
ContentOrigin initial_origin = resource_metadata_->origin();
if (initial_origin == FROM_SERVER) {
@@ -459,13 +459,13 @@
feed_loader_->ReloadFromServerIfNeeded(
initial_origin,
resource_metadata_->largest_changestamp(),
- base::Bind(&GDataFileSystem::OnUpdateChecked,
+ base::Bind(&DriveFileSystem::OnUpdateChecked,
ui_weak_ptr_,
initial_origin));
}
}
-void GDataFileSystem::OnUpdateChecked(ContentOrigin initial_origin,
+void DriveFileSystem::OnUpdateChecked(ContentOrigin initial_origin,
DriveFileError error) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -473,7 +473,7 @@
resource_metadata_->set_origin(initial_origin);
}
-GDataFileSystem::~GDataFileSystem() {
+DriveFileSystem::~DriveFileSystem() {
// This should be called from UI thread, from GDataSystemService shutdown.
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -484,30 +484,30 @@
drive_service_->CancelAll();
}
-void GDataFileSystem::AddObserver(
- GDataFileSystemInterface::Observer* observer) {
+void DriveFileSystem::AddObserver(
+ DriveFileSystemInterface::Observer* observer) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
observers_.AddObserver(observer);
}
-void GDataFileSystem::RemoveObserver(
- GDataFileSystemInterface::Observer* observer) {
+void DriveFileSystem::RemoveObserver(
+ DriveFileSystemInterface::Observer* observer) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
observers_.RemoveObserver(observer);
}
-void GDataFileSystem::StartUpdates() {
+void DriveFileSystem::StartUpdates() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!update_timer_.IsRunning());
update_timer_.Start(FROM_HERE,
base::TimeDelta::FromSeconds(
kGDataUpdateCheckIntervalInSec),
- base::Bind(&GDataFileSystem::CheckForUpdates,
+ base::Bind(&DriveFileSystem::CheckForUpdates,
ui_weak_ptr_));
}
-void GDataFileSystem::StopUpdates() {
+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
@@ -520,7 +520,7 @@
update_timer_.Stop();
}
-void GDataFileSystem::GetEntryInfoByResourceId(
+void DriveFileSystem::GetEntryInfoByResourceId(
const std::string& resource_id,
const GetEntryInfoWithFilePathCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) ||
@@ -528,25 +528,25 @@
DCHECK(!callback.is_null());
RunTaskOnUIThread(
- base::Bind(&GDataFileSystem::GetEntryInfoByResourceIdOnUIThread,
+ base::Bind(&DriveFileSystem::GetEntryInfoByResourceIdOnUIThread,
ui_weak_ptr_,
resource_id,
CreateRelayCallback(callback)));
}
-void GDataFileSystem::GetEntryInfoByResourceIdOnUIThread(
+void DriveFileSystem::GetEntryInfoByResourceIdOnUIThread(
const std::string& resource_id,
const GetEntryInfoWithFilePathCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!callback.is_null());
resource_metadata_->GetEntryByResourceIdAsync(resource_id,
- base::Bind(&GDataFileSystem::GetEntryInfoByEntryOnUIThread,
+ base::Bind(&DriveFileSystem::GetEntryInfoByEntryOnUIThread,
ui_weak_ptr_,
callback));
}
-void GDataFileSystem::GetEntryInfoByEntryOnUIThread(
+void DriveFileSystem::GetEntryInfoByEntryOnUIThread(
const GetEntryInfoWithFilePathCallback& callback,
DriveEntry* entry) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -566,7 +566,7 @@
}
}
-void GDataFileSystem::LoadFeedIfNeeded(const FileOperationCallback& callback) {
+void DriveFileSystem::LoadFeedIfNeeded(const FileOperationCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!callback.is_null());
@@ -583,7 +583,7 @@
resource_metadata_->set_origin(INITIALIZING);
feed_loader_->LoadFromCache(
true, // should_load_from_server
- base::Bind(&GDataFileSystem::NotifyInitialLoadFinishedAndRun,
+ base::Bind(&DriveFileSystem::NotifyInitialLoadFinishedAndRun,
ui_weak_ptr_,
callback));
return;
@@ -597,7 +597,7 @@
base::Bind(callback, DRIVE_FILE_OK));
}
-void GDataFileSystem::TransferFileFromRemoteToLocal(
+void DriveFileSystem::TransferFileFromRemoteToLocal(
const FilePath& remote_src_file_path,
const FilePath& local_dest_file_path,
const FileOperationCallback& callback) {
@@ -605,14 +605,14 @@
DCHECK(!callback.is_null());
GetFileByPath(remote_src_file_path,
- base::Bind(&GDataFileSystem::OnGetFileCompleteForTransferFile,
+ base::Bind(&DriveFileSystem::OnGetFileCompleteForTransferFile,
ui_weak_ptr_,
local_dest_file_path,
callback),
GetContentCallback());
}
-void GDataFileSystem::TransferFileFromLocalToRemote(
+void DriveFileSystem::TransferFileFromLocalToRemote(
const FilePath& local_src_file_path,
const FilePath& remote_dest_file_path,
const FileOperationCallback& callback) {
@@ -623,14 +623,14 @@
resource_metadata_->GetEntryInfoByPath(
remote_dest_file_path.DirName(),
base::Bind(
- &GDataFileSystem::TransferFileFromLocalToRemoteAfterGetEntryInfo,
+ &DriveFileSystem::TransferFileFromLocalToRemoteAfterGetEntryInfo,
ui_weak_ptr_,
local_src_file_path,
remote_dest_file_path,
callback));
}
-void GDataFileSystem::TransferFileFromLocalToRemoteAfterGetEntryInfo(
+void DriveFileSystem::TransferFileFromLocalToRemoteAfterGetEntryInfo(
const FilePath& local_src_file_path,
const FilePath& remote_dest_file_path,
const FileOperationCallback& callback,
@@ -658,7 +658,7 @@
base::Bind(&GetDocumentResourceIdOnBlockingPool,
local_src_file_path,
resource_id),
- base::Bind(&GDataFileSystem::TransferFileForResourceId,
+ base::Bind(&DriveFileSystem::TransferFileForResourceId,
ui_weak_ptr_,
local_src_file_path,
remote_dest_file_path,
@@ -666,7 +666,7 @@
base::Owned(resource_id)));
}
-void GDataFileSystem::TransferFileForResourceId(
+void DriveFileSystem::TransferFileForResourceId(
const FilePath& local_file_path,
const FilePath& remote_dest_file_path,
const FileOperationCallback& callback,
@@ -692,7 +692,7 @@
callback);
}
-void GDataFileSystem::TransferRegularFile(
+void DriveFileSystem::TransferRegularFile(
const FilePath& local_file_path,
const FilePath& remote_dest_file_path,
const FileOperationCallback& callback) {
@@ -710,7 +710,7 @@
error,
file_size,
content_type),
- base::Bind(&GDataFileSystem::StartFileUploadOnUIThread,
+ base::Bind(&DriveFileSystem::StartFileUploadOnUIThread,
ui_weak_ptr_,
StartFileUploadParams(local_file_path,
remote_dest_file_path,
@@ -720,7 +720,7 @@
base::Owned(content_type)));
}
-void GDataFileSystem::StartFileUploadOnUIThread(
+void DriveFileSystem::StartFileUploadOnUIThread(
const StartFileUploadParams& params,
DriveFileError* error,
int64* file_size,
@@ -743,14 +743,14 @@
resource_metadata_->GetEntryInfoByPath(
params.remote_file_path.DirName(),
base::Bind(
- &GDataFileSystem::StartFileUploadOnUIThreadAfterGetEntryInfo,
+ &DriveFileSystem::StartFileUploadOnUIThreadAfterGetEntryInfo,
ui_weak_ptr_,
params,
*file_size,
*content_type));
}
-void GDataFileSystem::StartFileUploadOnUIThreadAfterGetEntryInfo(
+void DriveFileSystem::StartFileUploadOnUIThreadAfterGetEntryInfo(
const StartFileUploadParams& params,
int64 file_size,
std::string content_type,
@@ -781,14 +781,14 @@
upload_file_info->initial_upload_location = GURL(entry_proto->upload_url());
upload_file_info->completion_callback =
- base::Bind(&GDataFileSystem::OnTransferCompleted,
+ base::Bind(&DriveFileSystem::OnTransferCompleted,
ui_weak_ptr_,
params.callback);
uploader_->UploadNewFile(upload_file_info.Pass());
}
-void GDataFileSystem::OnTransferCompleted(
+void DriveFileSystem::OnTransferCompleted(
const FileOperationCallback& callback,
DriveFileError error,
scoped_ptr<UploadFileInfo> upload_file_info) {
@@ -807,21 +807,21 @@
}
}
-void GDataFileSystem::Copy(const FilePath& src_file_path,
+void DriveFileSystem::Copy(const FilePath& src_file_path,
const FilePath& dest_file_path,
const FileOperationCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) ||
BrowserThread::CurrentlyOn(BrowserThread::IO));
DCHECK(!callback.is_null());
- RunTaskOnUIThread(base::Bind(&GDataFileSystem::CopyOnUIThread,
+ RunTaskOnUIThread(base::Bind(&DriveFileSystem::CopyOnUIThread,
ui_weak_ptr_,
src_file_path,
dest_file_path,
CreateRelayCallback(callback)));
}
-void GDataFileSystem::CopyOnUIThread(const FilePath& src_file_path,
+void DriveFileSystem::CopyOnUIThread(const FilePath& src_file_path,
const FilePath& dest_file_path,
const FileOperationCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -830,13 +830,13 @@
resource_metadata_->GetEntryInfoPairByPaths(
src_file_path,
dest_file_path.DirName(),
- base::Bind(&GDataFileSystem::CopyOnUIThreadAfterGetEntryInfoPair,
+ base::Bind(&DriveFileSystem::CopyOnUIThreadAfterGetEntryInfoPair,
ui_weak_ptr_,
dest_file_path,
callback));
}
-void GDataFileSystem::CopyOnUIThreadAfterGetEntryInfoPair(
+void DriveFileSystem::CopyOnUIThreadAfterGetEntryInfoPair(
const FilePath& dest_file_path,
const FileOperationCallback& callback,
scoped_ptr<EntryInfoPairResult> result) {
@@ -880,14 +880,14 @@
// copying of regular files directly on the server side. crbug.com/138273
const FilePath& src_file_path = result->first.path;
GetFileByPath(src_file_path,
- base::Bind(&GDataFileSystem::OnGetFileCompleteForCopy,
+ base::Bind(&DriveFileSystem::OnGetFileCompleteForCopy,
ui_weak_ptr_,
dest_file_path,
callback),
GetContentCallback());
}
-void GDataFileSystem::OnGetFileCompleteForCopy(
+void DriveFileSystem::OnGetFileCompleteForCopy(
const FilePath& remote_dest_file_path,
const FileOperationCallback& callback,
DriveFileError error,
@@ -907,7 +907,7 @@
TransferRegularFile(local_file_path, remote_dest_file_path, callback);
}
-void GDataFileSystem::OnGetFileCompleteForTransferFile(
+void DriveFileSystem::OnGetFileCompleteForTransferFile(
const FilePath& local_dest_file_path,
const FileOperationCallback& callback,
DriveFileError error,
@@ -939,7 +939,7 @@
base::Owned(copy_file_error)));
}
-void GDataFileSystem::CopyDocumentToDirectory(
+void DriveFileSystem::CopyDocumentToDirectory(
const FilePath& dir_path,
const std::string& resource_id,
const FilePath::StringType& new_name,
@@ -948,13 +948,13 @@
DCHECK(!callback.is_null());
drive_service_->CopyDocument(resource_id, new_name,
- base::Bind(&GDataFileSystem::OnCopyDocumentCompleted,
+ base::Bind(&DriveFileSystem::OnCopyDocumentCompleted,
ui_weak_ptr_,
dir_path,
callback));
}
-void GDataFileSystem::Rename(const FilePath& file_path,
+void DriveFileSystem::Rename(const FilePath& file_path,
const FilePath::StringType& new_name,
const FileMoveCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -970,14 +970,14 @@
resource_metadata_->GetEntryInfoByPath(
file_path,
base::Bind(
- &GDataFileSystem::RenameAfterGetEntryInfo,
+ &DriveFileSystem::RenameAfterGetEntryInfo,
ui_weak_ptr_,
file_path,
new_name,
callback));
}
-void GDataFileSystem::RenameAfterGetEntryInfo(
+void DriveFileSystem::RenameAfterGetEntryInfo(
const FilePath& file_path,
const FilePath::StringType& new_name,
const FileMoveCallback& callback,
@@ -1008,28 +1008,28 @@
drive_service_->RenameResource(
GURL(entry_proto->edit_url()),
file_name,
- base::Bind(&GDataFileSystem::RenameEntryLocally,
+ base::Bind(&DriveFileSystem::RenameEntryLocally,
ui_weak_ptr_,
file_path,
file_name,
callback));
}
-void GDataFileSystem::Move(const FilePath& src_file_path,
+void DriveFileSystem::Move(const FilePath& src_file_path,
const FilePath& dest_file_path,
const FileOperationCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) ||
BrowserThread::CurrentlyOn(BrowserThread::IO));
DCHECK(!callback.is_null());
- RunTaskOnUIThread(base::Bind(&GDataFileSystem::MoveOnUIThread,
+ RunTaskOnUIThread(base::Bind(&DriveFileSystem::MoveOnUIThread,
ui_weak_ptr_,
src_file_path,
dest_file_path,
CreateRelayCallback(callback)));
}
-void GDataFileSystem::MoveOnUIThread(const FilePath& src_file_path,
+void DriveFileSystem::MoveOnUIThread(const FilePath& src_file_path,
const FilePath& dest_file_path,
const FileOperationCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -1038,13 +1038,13 @@
resource_metadata_->GetEntryInfoPairByPaths(
src_file_path,
dest_file_path.DirName(),
- base::Bind(&GDataFileSystem::MoveOnUIThreadAfterGetEntryInfoPair,
+ base::Bind(&DriveFileSystem::MoveOnUIThreadAfterGetEntryInfoPair,
ui_weak_ptr_,
dest_file_path,
callback));
}
-void GDataFileSystem::MoveOnUIThreadAfterGetEntryInfoPair(
+void DriveFileSystem::MoveOnUIThreadAfterGetEntryInfoPair(
const FilePath& dest_file_path,
const FileOperationCallback& callback,
scoped_ptr<EntryInfoPairResult> result) {
@@ -1071,7 +1071,7 @@
const FilePath& dest_parent_path = result->second.path;
if (src_file_path.DirName() == dest_parent_path) {
FileMoveCallback final_file_path_update_callback =
- base::Bind(&GDataFileSystem::OnFilePathUpdated,
+ base::Bind(&DriveFileSystem::OnFilePathUpdated,
ui_weak_ptr_,
callback);
@@ -1090,13 +1090,13 @@
// effectively moves the file from the root directory to the parent
// directory of |dest_file_path|.
const FileMoveCallback add_file_to_directory_callback =
- base::Bind(&GDataFileSystem::MoveEntryFromRootDirectory,
+ base::Bind(&DriveFileSystem::MoveEntryFromRootDirectory,
ui_weak_ptr_,
dest_file_path.DirName(),
callback);
const FileMoveCallback remove_file_from_directory_callback =
- base::Bind(&GDataFileSystem::RemoveEntryFromNonRootDirectory,
+ base::Bind(&DriveFileSystem::RemoveEntryFromNonRootDirectory,
ui_weak_ptr_,
add_file_to_directory_callback);
@@ -1104,7 +1104,7 @@
remove_file_from_directory_callback);
}
-void GDataFileSystem::MoveEntryFromRootDirectory(
+void DriveFileSystem::MoveEntryFromRootDirectory(
const FilePath& dir_path,
const FileOperationCallback& callback,
DriveFileError error,
@@ -1123,12 +1123,12 @@
file_path,
dir_path,
base::Bind(
- &GDataFileSystem::MoveEntryFromRootDirectoryAfterGetEntryInfoPair,
+ &DriveFileSystem::MoveEntryFromRootDirectoryAfterGetEntryInfoPair,
ui_weak_ptr_,
callback));
}
-void GDataFileSystem::MoveEntryFromRootDirectoryAfterGetEntryInfoPair(
+void DriveFileSystem::MoveEntryFromRootDirectoryAfterGetEntryInfoPair(
const FileOperationCallback& callback,
scoped_ptr<EntryInfoPairResult> result) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -1156,14 +1156,14 @@
drive_service_->AddResourceToDirectory(
GURL(dir_proto->content_url()),
GURL(src_proto->edit_url()),
- base::Bind(&GDataFileSystem::OnMoveEntryFromRootDirectoryCompleted,
+ base::Bind(&DriveFileSystem::OnMoveEntryFromRootDirectoryCompleted,
ui_weak_ptr_,
callback,
file_path,
dir_path));
}
-void GDataFileSystem::RemoveEntryFromNonRootDirectory(
+void DriveFileSystem::RemoveEntryFromNonRootDirectory(
const FileMoveCallback& callback,
DriveFileError error,
const FilePath& file_path) {
@@ -1181,12 +1181,12 @@
file_path,
dir_path,
base::Bind(
- &GDataFileSystem::RemoveEntryFromNonRootDirectoryAfterEntryInfoPair,
+ &DriveFileSystem::RemoveEntryFromNonRootDirectoryAfterEntryInfoPair,
ui_weak_ptr_,
callback));
}
-void GDataFileSystem::RemoveEntryFromNonRootDirectoryAfterEntryInfoPair(
+void DriveFileSystem::RemoveEntryFromNonRootDirectoryAfterEntryInfoPair(
const FileMoveCallback& callback,
scoped_ptr<EntryInfoPairResult> result) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -1215,26 +1215,26 @@
GURL(dir_proto->content_url()),
GURL(entry_proto->edit_url()),
entry_proto->resource_id(),
- base::Bind(&GDataFileSystem::MoveEntryToRootDirectoryLocally,
+ base::Bind(&DriveFileSystem::MoveEntryToRootDirectoryLocally,
ui_weak_ptr_,
callback,
file_path,
dir_path));
}
-void GDataFileSystem::Remove(const FilePath& file_path,
+void DriveFileSystem::Remove(const FilePath& file_path,
bool is_recursive,
const FileOperationCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) ||
BrowserThread::CurrentlyOn(BrowserThread::IO));
- RunTaskOnUIThread(base::Bind(&GDataFileSystem::RemoveOnUIThread,
+ RunTaskOnUIThread(base::Bind(&DriveFileSystem::RemoveOnUIThread,
ui_weak_ptr_,
file_path,
is_recursive,
CreateRelayCallback(callback)));
}
-void GDataFileSystem::RemoveOnUIThread(
+void DriveFileSystem::RemoveOnUIThread(
const FilePath& file_path,
bool is_recursive,
const FileOperationCallback& callback) {
@@ -1244,14 +1244,14 @@
resource_metadata_->GetEntryInfoByPath(
file_path,
base::Bind(
- &GDataFileSystem::RemoveOnUIThreadAfterGetEntryInfo,
+ &DriveFileSystem::RemoveOnUIThreadAfterGetEntryInfo,
ui_weak_ptr_,
file_path,
is_recursive,
callback));
}
-void GDataFileSystem::RemoveOnUIThreadAfterGetEntryInfo(
+void DriveFileSystem::RemoveOnUIThreadAfterGetEntryInfo(
const FilePath& file_path,
bool /* is_recursive */,
const FileOperationCallback& callback,
@@ -1270,20 +1270,20 @@
DCHECK(entry_proto.get());
drive_service_->DeleteDocument(
GURL(entry_proto->edit_url()),
- base::Bind(&GDataFileSystem::OnRemovedDocument,
+ base::Bind(&DriveFileSystem::OnRemovedDocument,
ui_weak_ptr_,
callback,
file_path));
}
-void GDataFileSystem::CreateDirectory(
+void DriveFileSystem::CreateDirectory(
const FilePath& directory_path,
bool is_exclusive,
bool is_recursive,
const FileOperationCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) ||
BrowserThread::CurrentlyOn(BrowserThread::IO));
- RunTaskOnUIThread(base::Bind(&GDataFileSystem::CreateDirectoryOnUIThread,
+ RunTaskOnUIThread(base::Bind(&DriveFileSystem::CreateDirectoryOnUIThread,
ui_weak_ptr_,
directory_path,
is_exclusive,
@@ -1291,7 +1291,7 @@
CreateRelayCallback(callback)));
}
-void GDataFileSystem::CreateDirectoryOnUIThread(
+void DriveFileSystem::CreateDirectoryOnUIThread(
const FilePath& directory_path,
bool is_exclusive,
bool is_recursive,
@@ -1348,7 +1348,7 @@
drive_service_->CreateDirectory(
last_parent_dir_url,
first_missing_path.BaseName().value(),
- base::Bind(&GDataFileSystem::OnCreateDirectoryCompleted,
+ base::Bind(&DriveFileSystem::OnCreateDirectoryCompleted,
ui_weak_ptr_,
CreateDirectoryParams(
first_missing_path,
@@ -1358,21 +1358,21 @@
callback)));
}
-void GDataFileSystem::CreateFile(const FilePath& file_path,
+void DriveFileSystem::CreateFile(const FilePath& file_path,
bool is_exclusive,
const FileOperationCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) ||
BrowserThread::CurrentlyOn(BrowserThread::IO));
DCHECK(!callback.is_null());
- RunTaskOnUIThread(base::Bind(&GDataFileSystem::CreateFileOnUIThread,
+ RunTaskOnUIThread(base::Bind(&DriveFileSystem::CreateFileOnUIThread,
ui_weak_ptr_,
file_path,
is_exclusive,
CreateRelayCallback(callback)));
}
-void GDataFileSystem::CreateFileOnUIThread(
+void DriveFileSystem::CreateFileOnUIThread(
const FilePath& file_path,
bool is_exclusive,
const FileOperationCallback& callback) {
@@ -1382,14 +1382,14 @@
// First, checks the existence of a file at |file_path|.
resource_metadata_->GetEntryInfoByPath(
file_path,
- base::Bind(&GDataFileSystem::OnGetEntryInfoForCreateFile,
+ base::Bind(&DriveFileSystem::OnGetEntryInfoForCreateFile,
ui_weak_ptr_,
file_path,
is_exclusive,
callback));
}
-void GDataFileSystem::OnGetEntryInfoForCreateFile(
+void DriveFileSystem::OnGetEntryInfoForCreateFile(
const FilePath& file_path,
bool is_exclusive,
const FileOperationCallback& callback,
@@ -1428,21 +1428,21 @@
TransferRegularFile(FilePath(kEmptyFilePath), file_path, callback);
}
-void GDataFileSystem::GetFileByPath(
+void DriveFileSystem::GetFileByPath(
const FilePath& file_path,
const GetFileCallback& get_file_callback,
const GetContentCallback& get_content_callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) ||
BrowserThread::CurrentlyOn(BrowserThread::IO));
RunTaskOnUIThread(
- base::Bind(&GDataFileSystem::GetFileByPathOnUIThread,
+ base::Bind(&DriveFileSystem::GetFileByPathOnUIThread,
ui_weak_ptr_,
file_path,
CreateRelayCallback(get_file_callback),
CreateRelayCallback(get_content_callback)));
}
-void GDataFileSystem::GetFileByPathOnUIThread(
+void DriveFileSystem::GetFileByPathOnUIThread(
const FilePath& file_path,
const GetFileCallback& get_file_callback,
const GetContentCallback& get_content_callback) {
@@ -1450,14 +1450,14 @@
resource_metadata_->GetEntryInfoByPath(
file_path,
- base::Bind(&GDataFileSystem::OnGetEntryInfoCompleteForGetFileByPath,
+ base::Bind(&DriveFileSystem::OnGetEntryInfoCompleteForGetFileByPath,
ui_weak_ptr_,
file_path,
CreateRelayCallback(get_file_callback),
CreateRelayCallback(get_content_callback)));
}
-void GDataFileSystem::OnGetEntryInfoCompleteForGetFileByPath(
+void DriveFileSystem::OnGetEntryInfoCompleteForGetFileByPath(
const FilePath& file_path,
const GetFileCallback& get_file_callback,
const GetContentCallback& get_content_callback,
@@ -1475,7 +1475,7 @@
entry_proto.get());
}
-void GDataFileSystem::GetResolvedFileByPath(
+void DriveFileSystem::GetResolvedFileByPath(
const FilePath& file_path,
const GetFileCallback& get_file_callback,
const GetContentCallback& get_content_callback,
@@ -1540,7 +1540,7 @@
entry_proto->resource_id(),
entry_proto->file_specific_info().file_md5(),
base::Bind(
- &GDataFileSystem::OnGetFileFromCache,
+ &DriveFileSystem::OnGetFileFromCache,
ui_weak_ptr_,
GetFileFromCacheParams(
file_path,
@@ -1553,34 +1553,34 @@
get_content_callback)));
}
-void GDataFileSystem::GetFileByResourceId(
+void DriveFileSystem::GetFileByResourceId(
const std::string& resource_id,
const GetFileCallback& get_file_callback,
const GetContentCallback& get_content_callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) ||
BrowserThread::CurrentlyOn(BrowserThread::IO));
RunTaskOnUIThread(
- base::Bind(&GDataFileSystem::GetFileByResourceIdOnUIThread,
+ base::Bind(&DriveFileSystem::GetFileByResourceIdOnUIThread,
ui_weak_ptr_,
resource_id,
CreateRelayCallback(get_file_callback),
CreateRelayCallback(get_content_callback)));
}
-void GDataFileSystem::GetFileByResourceIdOnUIThread(
+void DriveFileSystem::GetFileByResourceIdOnUIThread(
const std::string& resource_id,
const GetFileCallback& get_file_callback,
const GetContentCallback& get_content_callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
resource_metadata_->GetEntryByResourceIdAsync(resource_id,
- base::Bind(&GDataFileSystem::GetFileByEntryOnUIThread,
+ base::Bind(&DriveFileSystem::GetFileByEntryOnUIThread,
ui_weak_ptr_,
get_file_callback,
get_content_callback));
}
-void GDataFileSystem::GetFileByEntryOnUIThread(
+void DriveFileSystem::GetFileByEntryOnUIThread(
const GetFileCallback& get_file_callback,
const GetContentCallback& get_content_callback,
DriveEntry* entry) {
@@ -1611,7 +1611,7 @@
GetFileByPath(file_path, get_file_callback, get_content_callback);
}
-void GDataFileSystem::OnGetFileFromCache(const GetFileFromCacheParams& params,
+void DriveFileSystem::OnGetFileFromCache(const GetFileFromCacheParams& params,
DriveFileError error,
const std::string& resource_id,
const std::string& md5,
@@ -1642,7 +1642,7 @@
// - if we have enough space, start downloading the file from the server
drive_service_->GetDocumentEntry(
resource_id,
- base::Bind(&GDataFileSystem::OnGetDocumentEntry,
+ base::Bind(&DriveFileSystem::OnGetDocumentEntry,
ui_weak_ptr_,
cache_file_path,
GetFileFromCacheParams(params.virtual_file_path,
@@ -1655,7 +1655,7 @@
params.get_content_callback)));
}
-void GDataFileSystem::OnGetDocumentEntry(const FilePath& cache_file_path,
+void DriveFileSystem::OnGetDocumentEntry(const FilePath& cache_file_path,
const GetFileFromCacheParams& params,
GDataErrorCode status,
scoped_ptr<base::Value> data) {
@@ -1700,7 +1700,7 @@
base::Unretained(cache_),
file_size,
has_enough_space),
- base::Bind(&GDataFileSystem::StartDownloadFileIfEnoughSpace,
+ base::Bind(&DriveFileSystem::StartDownloadFileIfEnoughSpace,
ui_weak_ptr_,
params,
content_url,
@@ -1708,7 +1708,7 @@
base::Owned(has_enough_space)));
}
-void GDataFileSystem::StartDownloadFileIfEnoughSpace(
+void DriveFileSystem::StartDownloadFileIfEnoughSpace(
const GetFileFromCacheParams& params,
const GURL& content_url,
const FilePath& cache_file_path,
@@ -1731,39 +1731,39 @@
params.virtual_file_path,
params.local_tmp_path,
content_url,
- base::Bind(&GDataFileSystem::OnFileDownloaded,
+ base::Bind(&DriveFileSystem::OnFileDownloaded,
ui_weak_ptr_,
params),
params.get_content_callback);
}
-void GDataFileSystem::GetEntryInfoByPath(const FilePath& file_path,
+void DriveFileSystem::GetEntryInfoByPath(const FilePath& file_path,
const GetEntryInfoCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) ||
BrowserThread::CurrentlyOn(BrowserThread::IO));
DCHECK(!callback.is_null());
RunTaskOnUIThread(
- base::Bind(&GDataFileSystem::GetEntryInfoByPathOnUIThread,
+ base::Bind(&DriveFileSystem::GetEntryInfoByPathOnUIThread,
ui_weak_ptr_,
file_path,
CreateRelayCallback(callback)));
}
-void GDataFileSystem::GetEntryInfoByPathOnUIThread(
+void DriveFileSystem::GetEntryInfoByPathOnUIThread(
const FilePath& file_path,
const GetEntryInfoCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!callback.is_null());
LoadFeedIfNeeded(
- base::Bind(&GDataFileSystem::GetEntryInfoByPathOnUIThreadAfterLoad,
+ base::Bind(&DriveFileSystem::GetEntryInfoByPathOnUIThreadAfterLoad,
ui_weak_ptr_,
file_path,
callback));
}
-void GDataFileSystem::GetEntryInfoByPathOnUIThreadAfterLoad(
+void DriveFileSystem::GetEntryInfoByPathOnUIThreadAfterLoad(
const FilePath& file_path,
const GetEntryInfoCallback& callback,
DriveFileError error) {
@@ -1777,12 +1777,12 @@
resource_metadata_->GetEntryInfoByPath(
file_path,
- base::Bind(&GDataFileSystem::GetEntryInfoByPathOnUIThreadAfterGetEntry,
+ base::Bind(&DriveFileSystem::GetEntryInfoByPathOnUIThreadAfterGetEntry,
ui_weak_ptr_,
callback));
}
-void GDataFileSystem::GetEntryInfoByPathOnUIThreadAfterGetEntry(
+void DriveFileSystem::GetEntryInfoByPathOnUIThreadAfterGetEntry(
const GetEntryInfoCallback& callback,
DriveFileError error,
scoped_ptr<DriveEntryProto> entry_proto) {
@@ -1798,7 +1798,7 @@
CheckLocalModificationAndRun(entry_proto.Pass(), callback);
}
-void GDataFileSystem::ReadDirectoryByPath(
+void DriveFileSystem::ReadDirectoryByPath(
const FilePath& file_path,
const ReadDirectoryWithSettingCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) ||
@@ -1806,26 +1806,26 @@
DCHECK(!callback.is_null());
RunTaskOnUIThread(
- base::Bind(&GDataFileSystem::ReadDirectoryByPathOnUIThread,
+ base::Bind(&DriveFileSystem::ReadDirectoryByPathOnUIThread,
ui_weak_ptr_,
file_path,
CreateRelayCallback(callback)));
}
-void GDataFileSystem::ReadDirectoryByPathOnUIThread(
+void DriveFileSystem::ReadDirectoryByPathOnUIThread(
const FilePath& file_path,
const ReadDirectoryWithSettingCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!callback.is_null());
LoadFeedIfNeeded(
- base::Bind(&GDataFileSystem::ReadDirectoryByPathOnUIThreadAfterLoad,
+ base::Bind(&DriveFileSystem::ReadDirectoryByPathOnUIThreadAfterLoad,
ui_weak_ptr_,
file_path,
callback));
}
-void GDataFileSystem::ReadDirectoryByPathOnUIThreadAfterLoad(
+void DriveFileSystem::ReadDirectoryByPathOnUIThreadAfterLoad(
const FilePath& file_path,
const ReadDirectoryWithSettingCallback& callback,
DriveFileError error) {
@@ -1841,12 +1841,12 @@
resource_metadata_->ReadDirectoryByPath(
file_path,
- base::Bind(&GDataFileSystem::ReadDirectoryByPathOnUIThreadAfterRead,
+ base::Bind(&DriveFileSystem::ReadDirectoryByPathOnUIThreadAfterRead,
ui_weak_ptr_,
callback));
}
-void GDataFileSystem::ReadDirectoryByPathOnUIThreadAfterRead(
+void DriveFileSystem::ReadDirectoryByPathOnUIThreadAfterRead(
const ReadDirectoryWithSettingCallback& callback,
DriveFileError error,
scoped_ptr<DriveEntryProtoVector> entries) {
@@ -1864,16 +1864,16 @@
callback.Run(DRIVE_FILE_OK, hide_hosted_docs_, entries.Pass());
}
-void GDataFileSystem::RequestDirectoryRefresh(const FilePath& file_path) {
+void DriveFileSystem::RequestDirectoryRefresh(const FilePath& file_path) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) ||
BrowserThread::CurrentlyOn(BrowserThread::IO));
RunTaskOnUIThread(
- base::Bind(&GDataFileSystem::RequestDirectoryRefreshOnUIThread,
+ base::Bind(&DriveFileSystem::RequestDirectoryRefreshOnUIThread,
ui_weak_ptr_,
file_path));
}
-void GDataFileSystem::RequestDirectoryRefreshOnUIThread(
+void DriveFileSystem::RequestDirectoryRefreshOnUIThread(
const FilePath& file_path) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -1881,12 +1881,12 @@
resource_metadata_->GetEntryInfoByPath(
file_path,
base::Bind(
- &GDataFileSystem::RequestDirectoryRefreshOnUIThreadAfterGetEntryInfo,
+ &DriveFileSystem::RequestDirectoryRefreshOnUIThreadAfterGetEntryInfo,
ui_weak_ptr_,
file_path));
}
-void GDataFileSystem::RequestDirectoryRefreshOnUIThreadAfterGetEntryInfo(
+void DriveFileSystem::RequestDirectoryRefreshOnUIThreadAfterGetEntryInfo(
const FilePath& file_path,
DriveFileError error,
scoped_ptr<DriveEntryProto> entry_proto) {
@@ -1901,12 +1901,12 @@
feed_loader_->LoadDirectoryFromServer(
resource_metadata_->origin(),
entry_proto->resource_id(),
- base::Bind(&GDataFileSystem::OnRequestDirectoryRefresh,
+ base::Bind(&DriveFileSystem::OnRequestDirectoryRefresh,
ui_weak_ptr_,
file_path));
}
-void GDataFileSystem::OnRequestDirectoryRefresh(
+void DriveFileSystem::OnRequestDirectoryRefresh(
const FilePath& directory_path,
GetDocumentsParams* params,
DriveFileError error) {
@@ -1937,11 +1937,11 @@
resource_metadata_->RefreshDirectory(
params->directory_resource_id,
file_map,
- base::Bind(&GDataFileSystem::OnDirectoryChangeFileMoveCallback,
+ base::Bind(&DriveFileSystem::OnDirectoryChangeFileMoveCallback,
ui_weak_ptr_));
}
-void GDataFileSystem::UpdateFileByResourceId(
+void DriveFileSystem::UpdateFileByResourceId(
const std::string& resource_id,
const FileOperationCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) ||
@@ -1949,13 +1949,13 @@
DCHECK(!callback.is_null());
RunTaskOnUIThread(
- base::Bind(&GDataFileSystem::UpdateFileByResourceIdOnUIThread,
+ base::Bind(&DriveFileSystem::UpdateFileByResourceIdOnUIThread,
ui_weak_ptr_,
resource_id,
CreateRelayCallback(callback)));
}
-void GDataFileSystem::UpdateFileByResourceIdOnUIThread(
+void DriveFileSystem::UpdateFileByResourceIdOnUIThread(
const std::string& resource_id,
const FileOperationCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -1965,12 +1965,12 @@
// UpdateFileByResourceIdOnUIThread(). crbug.com/143873
resource_metadata_->GetEntryInfoByResourceId(
resource_id,
- base::Bind(&GDataFileSystem::UpdateFileByEntryInfo,
+ base::Bind(&DriveFileSystem::UpdateFileByEntryInfo,
ui_weak_ptr_,
callback));
}
-void GDataFileSystem::UpdateFileByEntryInfo(
+void DriveFileSystem::UpdateFileByEntryInfo(
const FileOperationCallback& callback,
DriveFileError error,
const FilePath& /* dive_file_path */,
@@ -1992,12 +1992,12 @@
cache_->GetFileOnUIThread(
entry_proto->resource_id(),
entry_proto->file_specific_info().file_md5(),
- base::Bind(&GDataFileSystem::OnGetFileCompleteForUpdateFile,
+ base::Bind(&DriveFileSystem::OnGetFileCompleteForUpdateFile,
ui_weak_ptr_,
callback));
}
-void GDataFileSystem::OnGetFileCompleteForUpdateFile(
+void DriveFileSystem::OnGetFileCompleteForUpdateFile(
const FileOperationCallback& callback,
DriveFileError error,
const std::string& resource_id,
@@ -2022,7 +2022,7 @@
cache_file_path,
get_size_error,
file_size),
- base::Bind(&GDataFileSystem::OnGetFileSizeCompleteForUpdateFile,
+ base::Bind(&DriveFileSystem::OnGetFileSizeCompleteForUpdateFile,
ui_weak_ptr_,
callback,
resource_id,
@@ -2031,7 +2031,7 @@
base::Owned(file_size)));
}
-void GDataFileSystem::OnGetFileSizeCompleteForUpdateFile(
+void DriveFileSystem::OnGetFileSizeCompleteForUpdateFile(
const FileOperationCallback& callback,
const std::string& resource_id,
const FilePath& cache_file_path,
@@ -2049,14 +2049,14 @@
// UpdateFileByResourceIdOnUIThread(). crbug.com/143873
resource_metadata_->GetEntryInfoByResourceId(
resource_id,
- base::Bind(&GDataFileSystem::OnGetFileCompleteForUpdateFileByEntry,
+ base::Bind(&DriveFileSystem::OnGetFileCompleteForUpdateFileByEntry,
ui_weak_ptr_,
callback,
*file_size,
cache_file_path));
}
-void GDataFileSystem::OnGetFileCompleteForUpdateFileByEntry(
+void DriveFileSystem::OnGetFileCompleteForUpdateFileByEntry(
const FileOperationCallback& callback,
int64 file_size,
const FilePath& cache_file_path,
@@ -2083,12 +2083,12 @@
cache_file_path,
file_size,
entry_proto->file_specific_info().content_mime_type(),
- base::Bind(&GDataFileSystem::OnUpdatedFileUploaded,
+ base::Bind(&DriveFileSystem::OnUpdatedFileUploaded,
ui_weak_ptr_,
callback));
}
-void GDataFileSystem::OnUpdatedFileUploaded(
+void DriveFileSystem::OnUpdatedFileUploaded(
const FileOperationCallback& callback,
DriveFileError error,
scoped_ptr<UploadFileInfo> upload_file_info) {
@@ -2109,31 +2109,31 @@
base::Bind(&OnAddUploadFileCompleted, callback, error));
}
-void GDataFileSystem::GetAvailableSpace(
+void DriveFileSystem::GetAvailableSpace(
const GetAvailableSpaceCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) ||
BrowserThread::CurrentlyOn(BrowserThread::IO));
- RunTaskOnUIThread(base::Bind(&GDataFileSystem::GetAvailableSpaceOnUIThread,
+ RunTaskOnUIThread(base::Bind(&DriveFileSystem::GetAvailableSpaceOnUIThread,
ui_weak_ptr_,
CreateRelayCallback(callback)));
}
-void GDataFileSystem::GetAvailableSpaceOnUIThread(
+void DriveFileSystem::GetAvailableSpaceOnUIThread(
const GetAvailableSpaceCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!callback.is_null());
drive_service_->GetAccountMetadata(
gdata::util::IsDriveV2ApiEnabled() ?
- base::Bind(&GDataFileSystem::OnGetAboutResource,
+ base::Bind(&DriveFileSystem::OnGetAboutResource,
ui_weak_ptr_,
callback) :
- base::Bind(&GDataFileSystem::OnGetAvailableSpace,
+ base::Bind(&DriveFileSystem::OnGetAvailableSpace,
ui_weak_ptr_,
callback));
}
-void GDataFileSystem::OnGetAvailableSpace(
+void DriveFileSystem::OnGetAvailableSpace(
const GetAvailableSpaceCallback& callback,
GDataErrorCode status,
scoped_ptr<base::Value> data) {
@@ -2159,7 +2159,7 @@
feed->quota_bytes_used());
}
-void GDataFileSystem::OnGetAboutResource(
+void DriveFileSystem::OnGetAboutResource(
const GetAvailableSpaceCallback& callback,
GDataErrorCode status,
scoped_ptr<base::Value> resource_json) {
@@ -2186,7 +2186,7 @@
about->quota_bytes_used());
}
-void GDataFileSystem::OnCreateDirectoryCompleted(
+void DriveFileSystem::OnCreateDirectoryCompleted(
const CreateDirectoryParams& params,
GDataErrorCode status,
scoped_ptr<base::Value> data) {
@@ -2230,7 +2230,7 @@
}
}
-void GDataFileSystem::OnSearch(const SearchCallback& callback,
+void DriveFileSystem::OnSearch(const SearchCallback& callback,
GetDocumentsParams* params,
DriveFileError error) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -2290,26 +2290,26 @@
base::Bind(&AddEntryToSearchResults,
results,
callback,
- base::Bind(&GDataFileSystem::CheckForUpdates, ui_weak_ptr_),
+ base::Bind(&DriveFileSystem::CheckForUpdates, ui_weak_ptr_),
error,
i+1 == feed->entries().size(),
next_feed));
}
}
-void GDataFileSystem::Search(const std::string& search_query,
+void DriveFileSystem::Search(const std::string& search_query,
const GURL& next_feed,
const SearchCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) ||
BrowserThread::CurrentlyOn(BrowserThread::IO));
- RunTaskOnUIThread(base::Bind(&GDataFileSystem::SearchAsyncOnUIThread,
+ RunTaskOnUIThread(base::Bind(&DriveFileSystem::SearchAsyncOnUIThread,
ui_weak_ptr_,
search_query,
next_feed,
CreateRelayCallback(callback)));
}
-void GDataFileSystem::SearchAsyncOnUIThread(
+void DriveFileSystem::SearchAsyncOnUIThread(
const std::string& search_query,
const GURL& next_feed,
const SearchCallback& callback) {
@@ -2319,31 +2319,31 @@
resource_metadata_->origin(),
search_query,
next_feed,
- base::Bind(&GDataFileSystem::OnSearch, ui_weak_ptr_, callback));
+ base::Bind(&DriveFileSystem::OnSearch, ui_weak_ptr_, callback));
}
-void GDataFileSystem::OnDirectoryChanged(const FilePath& directory_path) {
+void DriveFileSystem::OnDirectoryChanged(const FilePath& directory_path) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- FOR_EACH_OBSERVER(GDataFileSystemInterface::Observer, observers_,
+ FOR_EACH_OBSERVER(DriveFileSystemInterface::Observer, observers_,
OnDirectoryChanged(directory_path));
}
-void GDataFileSystem::OnDocumentFeedFetched(int num_accumulated_entries) {
+void DriveFileSystem::OnDocumentFeedFetched(int num_accumulated_entries) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- FOR_EACH_OBSERVER(GDataFileSystemInterface::Observer, observers_,
+ FOR_EACH_OBSERVER(DriveFileSystemInterface::Observer, observers_,
OnDocumentFeedFetched(num_accumulated_entries));
}
-void GDataFileSystem::OnFeedFromServerLoaded() {
+void DriveFileSystem::OnFeedFromServerLoaded() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- FOR_EACH_OBSERVER(GDataFileSystemInterface::Observer, observers_,
+ FOR_EACH_OBSERVER(DriveFileSystemInterface::Observer, observers_,
OnFeedFromServerLoaded());
}
-void GDataFileSystem::LoadRootFeedFromCacheForTesting() {
+void DriveFileSystem::LoadRootFeedFromCacheForTesting() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
feed_loader_->LoadFromCache(
@@ -2351,7 +2351,7 @@
FileOperationCallback());
}
-DriveFileError GDataFileSystem::UpdateFromFeedForTesting(
+DriveFileError DriveFileSystem::UpdateFromFeedForTesting(
const std::vector<DocumentFeed*>& feed_list,
int64 start_changestamp,
int64 root_feed_changestamp) {
@@ -2362,7 +2362,7 @@
root_feed_changestamp);
}
-void GDataFileSystem::OnFilePathUpdated(const FileOperationCallback& callback,
+void DriveFileSystem::OnFilePathUpdated(const FileOperationCallback& callback,
DriveFileError error,
const FilePath& /* file_path */) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -2370,7 +2370,7 @@
callback.Run(error);
}
-void GDataFileSystem::OnCopyDocumentCompleted(
+void DriveFileSystem::OnCopyDocumentCompleted(
const FilePath& dir_path,
const FileOperationCallback& callback,
GDataErrorCode status,
@@ -2402,13 +2402,13 @@
resource_metadata_->AddEntryToDirectory(
resource_metadata_->root(),
entry,
- base::Bind(&GDataFileSystem::MoveEntryFromRootDirectory,
+ base::Bind(&DriveFileSystem::MoveEntryFromRootDirectory,
ui_weak_ptr_,
dir_path,
callback));
}
-void GDataFileSystem::OnMoveEntryFromRootDirectoryCompleted(
+void DriveFileSystem::OnMoveEntryFromRootDirectoryCompleted(
const FileOperationCallback& callback,
const FilePath& file_path,
const FilePath& dir_path,
@@ -2426,7 +2426,7 @@
dir_path,
entry,
base::Bind(
- &GDataFileSystem::NotifyAndRunFileOperationCallback,
+ &DriveFileSystem::NotifyAndRunFileOperationCallback,
ui_weak_ptr_,
callback));
return;
@@ -2438,7 +2438,7 @@
callback.Run(error);
}
-void GDataFileSystem::OnRemovedDocument(
+void DriveFileSystem::OnRemovedDocument(
const FileOperationCallback& callback,
const FilePath& file_path,
GDataErrorCode status,
@@ -2455,7 +2455,7 @@
}
}
-void GDataFileSystem::OnFileDownloaded(
+void DriveFileSystem::OnFileDownloaded(
const GetFileFromCacheParams& params,
GDataErrorCode status,
const GURL& content_url,
@@ -2468,7 +2468,7 @@
cache_->GetCacheEntryOnUIThread(
params.resource_id,
params.md5,
- base::Bind(&GDataFileSystem::UnpinIfPinned,
+ base::Bind(&DriveFileSystem::UnpinIfPinned,
ui_weak_ptr_,
params.resource_id,
params.md5));
@@ -2490,7 +2490,7 @@
base::Unretained(cache_),
0,
has_enough_space),
- base::Bind(&GDataFileSystem::OnFileDownloadedAndSpaceChecked,
+ base::Bind(&DriveFileSystem::OnFileDownloadedAndSpaceChecked,
ui_weak_ptr_,
params,
status,
@@ -2499,7 +2499,7 @@
base::Owned(has_enough_space)));
}
-void GDataFileSystem::UnpinIfPinned(
+void DriveFileSystem::UnpinIfPinned(
const std::string& resource_id,
const std::string& md5,
bool success,
@@ -2511,7 +2511,7 @@
cache_->UnpinOnUIThread(resource_id, md5, CacheOperationCallback());
}
-void GDataFileSystem::OnFileDownloadedAndSpaceChecked(
+void DriveFileSystem::OnFileDownloadedAndSpaceChecked(
const GetFileFromCacheParams& params,
GDataErrorCode status,
const GURL& content_url,
@@ -2531,7 +2531,7 @@
params.md5,
downloaded_file_path,
DriveCache::FILE_OPERATION_MOVE,
- base::Bind(&GDataFileSystem::OnDownloadStoredToCache,
+ base::Bind(&DriveFileSystem::OnDownloadStoredToCache,
ui_weak_ptr_));
} else {
// If we don't have enough space, remove the downloaded file, and
@@ -2554,14 +2554,14 @@
}
}
-void GDataFileSystem::OnDownloadStoredToCache(DriveFileError error,
+void DriveFileSystem::OnDownloadStoredToCache(DriveFileError error,
const std::string& resource_id,
const std::string& md5) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
// Nothing much to do here for now.
}
-void GDataFileSystem::RenameEntryLocally(
+void DriveFileSystem::RenameEntryLocally(
const FilePath& file_path,
const FilePath::StringType& new_name,
const FileMoveCallback& callback,
@@ -2595,12 +2595,12 @@
resource_metadata_->MoveEntryToDirectory(
entry->parent()->GetFilePath(),
entry,
- base::Bind(&GDataFileSystem::NotifyAndRunFileMoveCallback,
+ base::Bind(&DriveFileSystem::NotifyAndRunFileMoveCallback,
ui_weak_ptr_,
callback));
}
-void GDataFileSystem::MoveEntryToRootDirectoryLocally(
+void DriveFileSystem::MoveEntryToRootDirectoryLocally(
const FileMoveCallback& callback,
const FilePath& file_path,
const FilePath& dir_path,
@@ -2624,12 +2624,12 @@
resource_metadata_->MoveEntryToDirectory(
resource_metadata_->root()->GetFilePath(),
entry,
- base::Bind(&GDataFileSystem::NotifyAndRunFileMoveCallback,
+ base::Bind(&DriveFileSystem::NotifyAndRunFileMoveCallback,
ui_weak_ptr_,
callback));
}
-void GDataFileSystem::NotifyAndRunFileMoveCallback(
+void DriveFileSystem::NotifyAndRunFileMoveCallback(
const FileMoveCallback& callback,
DriveFileError error,
const FilePath& moved_file_path) {
@@ -2642,7 +2642,7 @@
callback.Run(error, moved_file_path);
}
-void GDataFileSystem::NotifyAndRunFileOperationCallback(
+void DriveFileSystem::NotifyAndRunFileOperationCallback(
const FileOperationCallback& callback,
DriveFileError error,
const FilePath& moved_file_path) {
@@ -2655,14 +2655,14 @@
callback.Run(error);
}
-void GDataFileSystem::OnDirectoryChangeFileMoveCallback(
+void DriveFileSystem::OnDirectoryChangeFileMoveCallback(
DriveFileError error,
const FilePath& directory_path) {
if (error == DRIVE_FILE_OK)
OnDirectoryChanged(directory_path);
}
-DriveFileError GDataFileSystem::RemoveEntryAndCacheLocally(
+DriveFileError DriveFileSystem::RemoveEntryAndCacheLocally(
const FilePath& file_path) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -2678,7 +2678,7 @@
return DRIVE_FILE_OK;
}
-void GDataFileSystem::RemoveStaleEntryOnUpload(
+void DriveFileSystem::RemoveStaleEntryOnUpload(
const std::string& resource_id,
DriveDirectory* parent_dir,
const FileMoveCallback& callback,
@@ -2693,38 +2693,38 @@
}
}
-void GDataFileSystem::NotifyFileSystemMounted() {
+void DriveFileSystem::NotifyFileSystemMounted() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DVLOG(1) << "File System is mounted";
// Notify the observers that the file system is mounted.
- FOR_EACH_OBSERVER(GDataFileSystemInterface::Observer, observers_,
+ FOR_EACH_OBSERVER(DriveFileSystemInterface::Observer, observers_,
OnFileSystemMounted());
}
-void GDataFileSystem::NotifyFileSystemToBeUnmounted() {
+void DriveFileSystem::NotifyFileSystemToBeUnmounted() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DVLOG(1) << "File System is to be unmounted";
// Notify the observers that the file system is being unmounted.
- FOR_EACH_OBSERVER(GDataFileSystemInterface::Observer, observers_,
+ FOR_EACH_OBSERVER(DriveFileSystemInterface::Observer, observers_,
OnFileSystemBeingUnmounted());
}
-void GDataFileSystem::NotifyInitialLoadFinishedAndRun(
+void DriveFileSystem::NotifyInitialLoadFinishedAndRun(
const FileOperationCallback& callback,
DriveFileError error) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!callback.is_null());
// Notify the observers that root directory has been initialized.
- FOR_EACH_OBSERVER(GDataFileSystemInterface::Observer, observers_,
+ FOR_EACH_OBSERVER(DriveFileSystemInterface::Observer, observers_,
OnInitialLoadFinished());
callback.Run(error);
}
-DriveFileError GDataFileSystem::AddNewDirectory(
+DriveFileError DriveFileSystem::AddNewDirectory(
const FilePath& directory_path, base::Value* entry_value) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -2756,14 +2756,14 @@
resource_metadata_->AddEntryToDirectory(
parent_dir,
new_entry,
- base::Bind(&GDataFileSystem::NotifyAndRunFileMoveCallback,
+ base::Bind(&DriveFileSystem::NotifyAndRunFileMoveCallback,
ui_weak_ptr_,
FileMoveCallback()));
return DRIVE_FILE_OK;
}
-GDataFileSystem::FindMissingDirectoryResult
-GDataFileSystem::FindFirstMissingParentDirectory(
+DriveFileSystem::FindMissingDirectoryResult
+DriveFileSystem::FindFirstMissingParentDirectory(
const FilePath& directory_path,
GURL* last_dir_content_url,
FilePath* first_missing_parent_path) {
@@ -2795,7 +2795,7 @@
return DIRECTORY_ALREADY_PRESENT;
}
-DriveFileError GDataFileSystem::RemoveEntryLocally(
+DriveFileError DriveFileSystem::RemoveEntryLocally(
const FilePath& file_path, std::string* resource_id) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -2818,12 +2818,12 @@
resource_metadata_->RemoveEntryFromParent(
entry,
- base::Bind(&GDataFileSystem::OnDirectoryChangeFileMoveCallback,
+ base::Bind(&DriveFileSystem::OnDirectoryChangeFileMoveCallback,
ui_weak_ptr_));
return DRIVE_FILE_OK;
}
-void GDataFileSystem::AddUploadedFile(
+void DriveFileSystem::AddUploadedFile(
UploadMode upload_mode,
const FilePath& virtual_dir_path,
scoped_ptr<DocumentEntry> entry,
@@ -2836,7 +2836,7 @@
// AddUploadedFile() is asynchronous.
base::MessageLoopProxy::current()->PostTask(
FROM_HERE,
- base::Bind(&GDataFileSystem::AddUploadedFileOnUIThread,
+ base::Bind(&DriveFileSystem::AddUploadedFileOnUIThread,
ui_weak_ptr_,
upload_mode,
virtual_dir_path,
@@ -2846,7 +2846,7 @@
callback));
}
-void GDataFileSystem::AddUploadedFileOnUIThread(
+void DriveFileSystem::AddUploadedFileOnUIThread(
UploadMode upload_mode,
const FilePath& virtual_dir_path,
scoped_ptr<DocumentEntry> entry,
@@ -2888,14 +2888,14 @@
callback_runner.Release());
const FileMoveCallback file_move_callback =
- base::Bind(&GDataFileSystem::ContinueAddUploadedFile,
+ base::Bind(&DriveFileSystem::ContinueAddUploadedFile,
ui_weak_ptr_, params);
if (upload_mode == UPLOAD_EXISTING_FILE) {
// Remove an existing entry, which should be present.
resource_metadata_->GetEntryByResourceIdAsync(
resource_id,
- base::Bind(&GDataFileSystem::RemoveStaleEntryOnUpload,
+ base::Bind(&DriveFileSystem::RemoveStaleEntryOnUpload,
ui_weak_ptr_,
resource_id,
parent_dir,
@@ -2905,7 +2905,7 @@
}
}
-void GDataFileSystem::ContinueAddUploadedFile(
+void DriveFileSystem::ContinueAddUploadedFile(
AddUploadedFileParams* params,
DriveFileError error,
const FilePath& file_path) {
@@ -2920,14 +2920,14 @@
resource_metadata_->AddEntryToDirectory(
params->parent_dir,
params->new_entry.release(),
- base::Bind(&GDataFileSystem::NotifyAndRunFileMoveCallback,
+ base::Bind(&DriveFileSystem::NotifyAndRunFileMoveCallback,
ui_weak_ptr_,
- base::Bind(&GDataFileSystem::AddUploadedFileToCache,
+ base::Bind(&DriveFileSystem::AddUploadedFileToCache,
ui_weak_ptr_,
base::Owned(params))));
}
-void GDataFileSystem::AddUploadedFileToCache(
+void DriveFileSystem::AddUploadedFileToCache(
AddUploadedFileParams* params,
DriveFileError error,
const FilePath& file_path) {
@@ -2956,7 +2956,7 @@
}
}
-void GDataFileSystem::UpdateEntryData(const std::string& resource_id,
+void DriveFileSystem::UpdateEntryData(const std::string& resource_id,
const std::string& md5,
scoped_ptr<DocumentEntry> entry,
const FilePath& file_content_path,
@@ -2967,7 +2967,7 @@
// UpdateEntryData() is asynchronous.
base::MessageLoopProxy::current()->PostTask(
FROM_HERE,
- base::Bind(&GDataFileSystem::UpdateEntryDataOnUIThread,
+ base::Bind(&DriveFileSystem::UpdateEntryDataOnUIThread,
ui_weak_ptr_,
resource_id,
md5,
@@ -2976,7 +2976,7 @@
callback));
}
-void GDataFileSystem::UpdateEntryDataOnUIThread(
+void DriveFileSystem::UpdateEntryDataOnUIThread(
const std::string& resource_id,
const std::string& md5,
scoped_ptr<DocumentEntry> entry,
@@ -3001,7 +3001,7 @@
callback));
}
-void GDataFileSystem::Observe(int type,
+void DriveFileSystem::Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -3018,7 +3018,7 @@
}
}
-void GDataFileSystem::SetHideHostedDocuments(bool hide) {
+void DriveFileSystem::SetHideHostedDocuments(bool hide) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (hide == hide_hosted_docs_)
@@ -3028,13 +3028,13 @@
const FilePath root_path = resource_metadata_->root()->GetFilePath();
// Kick off directory refresh when this setting changes.
- FOR_EACH_OBSERVER(GDataFileSystemInterface::Observer, observers_,
+ FOR_EACH_OBSERVER(DriveFileSystemInterface::Observer, observers_,
OnDirectoryChanged(root_path));
}
-//============= GDataFileSystem: internal helper functions =====================
+//============= DriveFileSystem: internal helper functions =====================
-void GDataFileSystem::InitializePreferenceObserver() {
+void DriveFileSystem::InitializePreferenceObserver() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
pref_registrar_.reset(new PrefChangeRegistrar());
@@ -3042,17 +3042,17 @@
pref_registrar_->Add(prefs::kDisableGDataHostedFiles, this);
}
-void GDataFileSystem::OpenFile(const FilePath& file_path,
+void DriveFileSystem::OpenFile(const FilePath& file_path,
const OpenFileCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) ||
BrowserThread::CurrentlyOn(BrowserThread::IO));
- RunTaskOnUIThread(base::Bind(&GDataFileSystem::OpenFileOnUIThread,
+ RunTaskOnUIThread(base::Bind(&DriveFileSystem::OpenFileOnUIThread,
ui_weak_ptr_,
file_path,
CreateRelayCallback(callback)));
}
-void GDataFileSystem::OpenFileOnUIThread(const FilePath& file_path,
+void DriveFileSystem::OpenFileOnUIThread(const FilePath& file_path,
const OpenFileCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -3071,16 +3071,16 @@
resource_metadata_->GetEntryInfoByPath(
file_path,
- base::Bind(&GDataFileSystem::OnGetEntryInfoCompleteForOpenFile,
+ base::Bind(&DriveFileSystem::OnGetEntryInfoCompleteForOpenFile,
ui_weak_ptr_,
file_path,
- base::Bind(&GDataFileSystem::OnOpenFileFinished,
+ base::Bind(&DriveFileSystem::OnOpenFileFinished,
ui_weak_ptr_,
file_path,
callback)));
}
-void GDataFileSystem::OnGetEntryInfoCompleteForOpenFile(
+void DriveFileSystem::OnGetEntryInfoCompleteForOpenFile(
const FilePath& file_path,
const OpenFileCallback& callback,
DriveFileError error,
@@ -3107,7 +3107,7 @@
DCHECK(!entry_proto->resource_id().empty());
GetResolvedFileByPath(
file_path,
- base::Bind(&GDataFileSystem::OnGetFileCompleteForOpenFile,
+ base::Bind(&DriveFileSystem::OnGetFileCompleteForOpenFile,
ui_weak_ptr_,
callback,
GetFileCompleteForOpenParams(
@@ -3118,7 +3118,7 @@
entry_proto.get());
}
-void GDataFileSystem::OnGetFileCompleteForOpenFile(
+void DriveFileSystem::OnGetFileCompleteForOpenFile(
const OpenFileCallback& callback,
const GetFileCompleteForOpenParams& entry_proto,
DriveFileError error,
@@ -3139,12 +3139,12 @@
cache_->MarkDirtyOnUIThread(
entry_proto.resource_id,
entry_proto.md5,
- base::Bind(&GDataFileSystem::OnMarkDirtyInCacheCompleteForOpenFile,
+ base::Bind(&DriveFileSystem::OnMarkDirtyInCacheCompleteForOpenFile,
ui_weak_ptr_,
callback));
}
-void GDataFileSystem::OnMarkDirtyInCacheCompleteForOpenFile(
+void DriveFileSystem::OnMarkDirtyInCacheCompleteForOpenFile(
const OpenFileCallback& callback,
DriveFileError error,
const std::string& resource_id,
@@ -3156,7 +3156,7 @@
callback.Run(error, cache_file_path);
}
-void GDataFileSystem::OnOpenFileFinished(const FilePath& file_path,
+void DriveFileSystem::OnOpenFileFinished(const FilePath& file_path,
const OpenFileCallback& callback,
DriveFileError result,
const FilePath& cache_file_path) {
@@ -3172,19 +3172,19 @@
callback.Run(result, cache_file_path);
}
-void GDataFileSystem::CloseFile(const FilePath& file_path,
+void DriveFileSystem::CloseFile(const FilePath& file_path,
const FileOperationCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) ||
BrowserThread::CurrentlyOn(BrowserThread::IO));
DCHECK(!callback.is_null());
- RunTaskOnUIThread(base::Bind(&GDataFileSystem::CloseFileOnUIThread,
+ RunTaskOnUIThread(base::Bind(&DriveFileSystem::CloseFileOnUIThread,
ui_weak_ptr_,
file_path,
CreateRelayCallback(callback)));
}
-void GDataFileSystem::CloseFileOnUIThread(
+void DriveFileSystem::CloseFileOnUIThread(
const FilePath& file_path,
const FileOperationCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -3201,16 +3201,16 @@
// Step 1 of CloseFile: Get resource_id and md5 for |file_path|.
resource_metadata_->GetEntryInfoByPath(
file_path,
- base::Bind(&GDataFileSystem::CloseFileOnUIThreadAfterGetEntryInfo,
+ base::Bind(&DriveFileSystem::CloseFileOnUIThreadAfterGetEntryInfo,
ui_weak_ptr_,
file_path,
- base::Bind(&GDataFileSystem::CloseFileOnUIThreadFinalize,
+ base::Bind(&DriveFileSystem::CloseFileOnUIThreadFinalize,
ui_weak_ptr_,
file_path,
callback)));
}
-void GDataFileSystem::CloseFileOnUIThreadAfterGetEntryInfo(
+void DriveFileSystem::CloseFileOnUIThreadAfterGetEntryInfo(
const FilePath& file_path,
const FileOperationCallback& callback,
DriveFileError error,
@@ -3235,12 +3235,12 @@
cache_->CommitDirtyOnUIThread(
entry_proto->resource_id(),
entry_proto->file_specific_info().file_md5(),
- base::Bind(&GDataFileSystem::CloseFileOnUIThreadAfterCommitDirtyInCache,
+ base::Bind(&DriveFileSystem::CloseFileOnUIThreadAfterCommitDirtyInCache,
ui_weak_ptr_,
callback));
}
-void GDataFileSystem::CloseFileOnUIThreadAfterCommitDirtyInCache(
+void DriveFileSystem::CloseFileOnUIThreadAfterCommitDirtyInCache(
const FileOperationCallback& callback,
DriveFileError error,
const std::string& /* resource_id */,
@@ -3251,7 +3251,7 @@
callback.Run(error);
}
-void GDataFileSystem::CloseFileOnUIThreadFinalize(
+void DriveFileSystem::CloseFileOnUIThreadFinalize(
const FilePath& file_path,
const FileOperationCallback& callback,
DriveFileError result) {
@@ -3268,7 +3268,7 @@
callback.Run(result);
}
-void GDataFileSystem::CheckLocalModificationAndRun(
+void DriveFileSystem::CheckLocalModificationAndRun(
scoped_ptr<DriveEntryProto> entry_proto,
const GetEntryInfoCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -3289,11 +3289,11 @@
resource_id,
md5,
base::Bind(
- &GDataFileSystem::CheckLocalModificationAndRunAfterGetCacheEntry,
+ &DriveFileSystem::CheckLocalModificationAndRunAfterGetCacheEntry,
ui_weak_ptr_, base::Passed(&entry_proto), callback));
}
-void GDataFileSystem::CheckLocalModificationAndRunAfterGetCacheEntry(
+void DriveFileSystem::CheckLocalModificationAndRunAfterGetCacheEntry(
scoped_ptr<DriveEntryProto> entry_proto,
const GetEntryInfoCallback& callback,
bool success,
@@ -3314,11 +3314,11 @@
resource_id,
md5,
base::Bind(
- &GDataFileSystem::CheckLocalModificationAndRunAfterGetCacheFile,
+ &DriveFileSystem::CheckLocalModificationAndRunAfterGetCacheFile,
ui_weak_ptr_, base::Passed(&entry_proto), callback));
}
-void GDataFileSystem::CheckLocalModificationAndRunAfterGetCacheFile(
+void DriveFileSystem::CheckLocalModificationAndRunAfterGetCacheFile(
scoped_ptr<DriveEntryProto> entry_proto,
const GetEntryInfoCallback& callback,
DriveFileError error,
@@ -3344,7 +3344,7 @@
local_cache_path,
base::Unretained(file_info),
base::Unretained(get_file_info_result)),
- base::Bind(&GDataFileSystem::CheckLocalModificationAndRunAfterGetFileInfo,
+ base::Bind(&DriveFileSystem::CheckLocalModificationAndRunAfterGetFileInfo,
ui_weak_ptr_,
base::Passed(&entry_proto),
callback,
@@ -3352,7 +3352,7 @@
base::Owned(get_file_info_result)));
}
-void GDataFileSystem::CheckLocalModificationAndRunAfterGetFileInfo(
+void DriveFileSystem::CheckLocalModificationAndRunAfterGetFileInfo(
scoped_ptr<DriveEntryProto> entry_proto,
const GetEntryInfoCallback& callback,
base::PlatformFileInfo* file_info,
diff --git a/chrome/browser/chromeos/gdata/gdata_file_system.h b/chrome/browser/chromeos/gdata/drive_file_system.h
similarity index 97%
rename from chrome/browser/chromeos/gdata/gdata_file_system.h
rename to chrome/browser/chromeos/gdata/drive_file_system.h
index 2e4aeaf..226e69e 100644
--- a/chrome/browser/chromeos/gdata/gdata_file_system.h
+++ b/chrome/browser/chromeos/gdata/drive_file_system.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_FILE_SYSTEM_H_
-#define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_
+#ifndef CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_FILE_SYSTEM_H_
+#define CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_FILE_SYSTEM_H_
#include <map>
#include <set>
@@ -17,9 +17,9 @@
#include "base/timer.h"
#include "chrome/browser/api/prefs/pref_change_registrar.h"
#include "chrome/browser/chromeos/gdata/drive_cache.h"
+#include "chrome/browser/chromeos/gdata/drive_file_system_interface.h"
#include "chrome/browser/chromeos/gdata/drive_resource_metadata.h"
#include "chrome/browser/chromeos/gdata/gdata_errorcode.h"
-#include "chrome/browser/chromeos/gdata/gdata_file_system_interface.h"
#include "chrome/browser/chromeos/gdata/gdata_wapi_feed_loader.h"
#include "chrome/browser/chromeos/gdata/gdata_wapi_feed_processor.h"
#include "content/public/browser/notification_observer.h"
@@ -36,25 +36,25 @@
class GDataWapiFeedLoader;
struct UploadFileInfo;
-// The production implementation of GDataFileSystemInterface.
-class GDataFileSystem : public GDataFileSystemInterface,
+// The production implementation of DriveFileSystemInterface.
+class DriveFileSystem : public DriveFileSystemInterface,
public GDataWapiFeedLoader::Observer,
public content::NotificationObserver {
public:
- GDataFileSystem(Profile* profile,
+ DriveFileSystem(Profile* profile,
DriveCache* cache,
DriveServiceInterface* drive_service,
GDataUploaderInterface* uploader,
DriveWebAppsRegistryInterface* webapps_registry,
base::SequencedTaskRunner* blocking_task_runner);
- virtual ~GDataFileSystem();
+ virtual ~DriveFileSystem();
- // GDataFileSystem overrides.
+ // DriveFileSystem overrides.
virtual void Initialize() OVERRIDE;
virtual void AddObserver(
- GDataFileSystemInterface::Observer* observer) OVERRIDE;
+ DriveFileSystemInterface::Observer* observer) OVERRIDE;
virtual void RemoveObserver(
- GDataFileSystemInterface::Observer* observer) OVERRIDE;
+ DriveFileSystemInterface::Observer* observer) OVERRIDE;
virtual void StartUpdates() OVERRIDE;
virtual void StopUpdates() OVERRIDE;
virtual void NotifyFileSystemMounted() OVERRIDE;
@@ -149,8 +149,8 @@
int64 root_feed_changestamp);
private:
- friend class GDataFileSystemTest;
- FRIEND_TEST_ALL_PREFIXES(GDataFileSystemTest,
+ friend class DriveFileSystemTest;
+ FRIEND_TEST_ALL_PREFIXES(DriveFileSystemTest,
FindFirstMissingParentDirectory);
// Defines possible search results of FindFirstMissingParentDirectory().
@@ -202,7 +202,7 @@
// Initiates transfer of |local_file_path| with |resource_id| to
// |remote_dest_file_path|. |local_file_path| must be a file from the local
// file system, |remote_dest_file_path| is the virtual destination path within
- // gdata file system. If |resource_id| is a non-empty string, the transfer is
+ // Drive file system. If |resource_id| is a non-empty string, the transfer is
// handled by CopyDocumentToDirectory. Otherwise, the transfer is handled by
// TransferRegularFile.
//
@@ -216,7 +216,7 @@
// Initiates transfer of |local_file_path| to |remote_dest_file_path|.
// |local_file_path| must be a regular file (i.e. not a hosted document) from
// the local file system, |remote_dest_file_path| is the virtual destination
- // path within gdata file system.
+ // path within Drive file system.
//
// Must be called from *UI* thread. |callback| is run on the calling thread.
void TransferRegularFile(const FilePath& local_file_path,
@@ -838,7 +838,7 @@
// other threads with base::Unretained(this).
scoped_ptr<DriveResourceMetadata> resource_metadata_;
- // The profile hosts the GDataFileSystem via GDataSystemService.
+ // The profile hosts the DriveFileSystem via GDataSystemService.
Profile* profile_;
// The cache owned by GDataSystemService.
@@ -867,19 +867,19 @@
// The loader is used to load the feeds.
scoped_ptr<GDataWapiFeedLoader> feed_loader_;
- ObserverList<GDataFileSystemInterface::Observer> observers_;
+ ObserverList<DriveFileSystemInterface::Observer> observers_;
scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
// WeakPtrFactory and WeakPtr bound to the UI thread.
// Note: These should remain the last member so they'll be destroyed and
// invalidate the weak pointers before any other members are destroyed.
- base::WeakPtrFactory<GDataFileSystem> ui_weak_ptr_factory_;
+ base::WeakPtrFactory<DriveFileSystem> ui_weak_ptr_factory_;
// Unlike other classes, we need this as we need this to redirect a task
// from IO thread to UI thread.
- base::WeakPtr<GDataFileSystem> ui_weak_ptr_;
+ base::WeakPtr<DriveFileSystem> ui_weak_ptr_;
};
} // namespace gdata
-#endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_
+#endif // CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_FILE_SYSTEM_H_
diff --git a/chrome/browser/chromeos/gdata/gdata_file_system_interface.h b/chrome/browser/chromeos/gdata/drive_file_system_interface.h
similarity index 94%
rename from chrome/browser/chromeos/gdata/gdata_file_system_interface.h
rename to chrome/browser/chromeos/gdata/drive_file_system_interface.h
index a2dfa80..0749a8d 100644
--- a/chrome/browser/chromeos/gdata/gdata_file_system_interface.h
+++ b/chrome/browser/chromeos/gdata/drive_file_system_interface.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_FILE_SYSTEM_INTERFACE_H_
-#define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_INTERFACE_H_
+#ifndef CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_FILE_SYSTEM_INTERFACE_H_
+#define CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_FILE_SYSTEM_INTERFACE_H_
#include <string>
#include <vector>
@@ -62,16 +62,16 @@
typedef base::Callback<void(DriveFileError error,
const FilePath& file_path)> OpenFileCallback;
-// Used to get available space for the account from GData.
+// Used to get available space for the account from Drive.
typedef base::Callback<void(DriveFileError error,
int64 bytes_total,
int64 bytes_used)> GetAvailableSpaceCallback;
-// GData file system abstraction layer.
-// The interface is defined to make GDataFileSystem mockable.
-class GDataFileSystemInterface {
+// Drive file system abstraction layer.
+// The interface is defined to make DriveFileSystem mockable.
+class DriveFileSystemInterface {
public:
- virtual ~GDataFileSystemInterface() {}
+ virtual ~DriveFileSystemInterface() {}
// Used to notify events on the file system.
// All events are notified on UI thread.
@@ -132,7 +132,7 @@
const GetEntryInfoWithFilePathCallback& callback) = 0;
// Initiates transfer of |remote_src_file_path| to |local_dest_file_path|.
- // |remote_src_file_path| is the virtual source path on the gdata file system.
+ // |remote_src_file_path| is the virtual source path on the Drive file system.
// |local_dest_file_path| is the destination path on the local file system.
//
// Must be called from *UI* thread. |callback| is run on the calling thread.
@@ -144,7 +144,7 @@
// Initiates transfer of |local_src_file_path| to |remote_dest_file_path|.
// |local_src_file_path| must be a file from the local file system.
- // |remote_dest_file_path| is the virtual destination path within gdata file
+ // |remote_dest_file_path| is the virtual destination path within Drive file
// system.
//
// Must be called from *UI* thread. |callback| is run on the calling thread.
@@ -154,19 +154,19 @@
const FilePath& remote_dest_file_path,
const FileOperationCallback& callback) = 0;
- // Retrieves a file at the virtual path |file_path| on the gdata file system
+ // Retrieves a file at the virtual path |file_path| on the Drive file system
// onto the cache, and mark it dirty. The local path to the cache file is
// returned to |callback|. After opening the file, both read and write
// on the file can be done with normal local file operations.
//
// |CloseFile| must be called when the modification to the cache is done.
- // Otherwise, GData file system does not pick up the file for uploading.
+ // Otherwise, Drive file system does not pick up the file for uploading.
//
// Can be called from UI/IO thread. |callback| is run on the calling thread.
virtual void OpenFile(const FilePath& file_path,
const OpenFileCallback& callback) = 0;
- // Closes a file at the virtual path |file_path| on the gdata file system,
+ // Closes a file at the virtual path |file_path| on the Drive file system,
// which is opened via OpenFile(). It commits the dirty flag on the cache.
//
// Can be called from UI/IO thread. |callback| is run on the calling thread.
@@ -256,7 +256,7 @@
// Gets |file_path| from the file system. The file entry represented by
// |file_path| needs to be present in in-memory representation of the file
// system in order to be retrieved. If the file is not cached, the file
- // will be downloaded through gdata api.
+ // will be downloaded through GData API or Drive V2 API.
//
// Can be called from UI/IO thread. |get_file_callback| and
// |get_content_callback| are run on the calling thread.
@@ -265,7 +265,7 @@
const GetFileCallback& get_file_callback,
const GetContentCallback& get_content_callback) = 0;
- // Gets a file by the given |resource_id| from the gdata server. Used for
+ // Gets a file by the given |resource_id| from the Drive server. Used for
// fetching pinned-but-not-fetched files.
//
// Can be called from UI/IO thread. |get_file_callback| and
@@ -275,7 +275,7 @@
const GetFileCallback& get_file_callback,
const GetContentCallback& get_content_callback) = 0;
- // Updates a file by the given |resource_id| on the gdata server by
+ // Updates a file by the given |resource_id| on the Drive server by
// uploading an updated version. Used for uploading dirty files. The file
// should already be present in the cache.
//
@@ -365,4 +365,4 @@
} // namespace gdata
-#endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_INTERFACE_H_
+#endif // CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_FILE_SYSTEM_INTERFACE_H_
diff --git a/chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc b/chrome/browser/chromeos/gdata/drive_file_system_proxy.cc
similarity index 89%
rename from chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc
rename to chrome/browser/chromeos/gdata/drive_file_system_proxy.cc
index aa45ad0..df85d69 100644
--- a/chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc
+++ b/chrome/browser/chromeos/gdata/drive_file_system_proxy.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_file_system_proxy.h"
+#include "chrome/browser/chromeos/gdata/drive_file_system_proxy.h"
#include <string>
#include <vector>
@@ -12,8 +12,8 @@
#include "base/string_util.h"
#include "base/values.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_files.h"
-#include "chrome/browser/chromeos/gdata/gdata_file_system_interface.h"
#include "chrome/browser/chromeos/gdata/gdata_system_service.h"
#include "chrome/browser/chromeos/gdata/gdata_util.h"
#include "content/public/browser/browser_thread.h"
@@ -59,7 +59,7 @@
}
// Helper function to run OpenFileCallback from
-// GDataFileSystemProxy::OpenFile().
+// DriveFileSystemProxy::OpenFile().
void OnGetFileByPathForOpen(
const FileSystemOperationInterface::OpenFileCallback& callback,
int file_flags,
@@ -93,7 +93,7 @@
}
// Helper function to run SnapshotFileCallback from
-// GDataFileSystemProxy::CreateSnapshotFile().
+// DriveFileSystemProxy::CreateSnapshotFile().
void CallSnapshotFileCallback(
const FileSystemOperationInterface::SnapshotFileCallback& callback,
const base::PlatformFileInfo& file_info,
@@ -126,10 +126,10 @@
callback.Run(error, final_file_info, local_path, file_ref);
}
-// Emits debug log when GDataFileSystem::CloseFile() is complete.
+// Emits debug log when DriveFileSystem::CloseFile() is complete.
void EmitDebugLogForCloseFile(const FilePath& local_path,
- DriveFileError error_code) {
- DVLOG(1) << "Closed: " << local_path.AsUTF8Unsafe() << ": " << error_code;
+ DriveFileError file_error) {
+ DVLOG(1) << "Closed: " << local_path.AsUTF8Unsafe() << ": " << file_error;
}
void DoTruncateOnFileThread(
@@ -176,17 +176,17 @@
return entry;
}
-// GDataFileSystemProxy class implementation.
+// DriveFileSystemProxy class implementation.
-GDataFileSystemProxy::GDataFileSystemProxy(
- GDataFileSystemInterface* file_system)
+DriveFileSystemProxy::DriveFileSystemProxy(
+ DriveFileSystemInterface* file_system)
: file_system_(file_system) {
// Should be created from the file browser extension API (AddMountFunction)
// on UI thread.
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
}
-void GDataFileSystemProxy::GetFileInfo(const FileSystemURL& file_url,
+void DriveFileSystemProxy::GetFileInfo(const FileSystemURL& file_url,
const FileSystemOperationInterface::GetMetadataCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
FilePath file_path;
@@ -201,13 +201,13 @@
file_system_->GetEntryInfoByPath(
file_path,
- base::Bind(&GDataFileSystemProxy::OnGetMetadata,
+ base::Bind(&DriveFileSystemProxy::OnGetMetadata,
this,
file_path,
callback));
}
-void GDataFileSystemProxy::Copy(const FileSystemURL& src_file_url,
+void DriveFileSystemProxy::Copy(const FileSystemURL& src_file_url,
const FileSystemURL& dest_file_url,
const FileSystemOperationInterface::StatusCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
@@ -223,10 +223,10 @@
file_system_->Copy(
src_file_path,
dest_file_path,
- base::Bind(&GDataFileSystemProxy::OnStatusCallback, this, callback));
+ base::Bind(&DriveFileSystemProxy::OnStatusCallback, this, callback));
}
-void GDataFileSystemProxy::Move(const FileSystemURL& src_file_url,
+void DriveFileSystemProxy::Move(const FileSystemURL& src_file_url,
const FileSystemURL& dest_file_url,
const FileSystemOperationInterface::StatusCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
@@ -242,10 +242,10 @@
file_system_->Move(
src_file_path,
dest_file_path,
- base::Bind(&GDataFileSystemProxy::OnStatusCallback, this, callback));
+ base::Bind(&DriveFileSystemProxy::OnStatusCallback, this, callback));
}
-void GDataFileSystemProxy::ReadDirectory(const FileSystemURL& file_url,
+void DriveFileSystemProxy::ReadDirectory(const FileSystemURL& file_url,
const FileSystemOperationInterface::ReadDirectoryCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
@@ -262,12 +262,12 @@
file_system_->ReadDirectoryByPath(
file_path,
- base::Bind(&GDataFileSystemProxy::OnReadDirectory,
+ base::Bind(&DriveFileSystemProxy::OnReadDirectory,
this,
callback));
}
-void GDataFileSystemProxy::Remove(const FileSystemURL& file_url, bool recursive,
+void DriveFileSystemProxy::Remove(const FileSystemURL& file_url, bool recursive,
const FileSystemOperationInterface::StatusCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
@@ -281,10 +281,10 @@
file_system_->Remove(
file_path,
recursive,
- base::Bind(&GDataFileSystemProxy::OnStatusCallback, this, callback));
+ base::Bind(&DriveFileSystemProxy::OnStatusCallback, this, callback));
}
-void GDataFileSystemProxy::CreateDirectory(
+void DriveFileSystemProxy::CreateDirectory(
const FileSystemURL& file_url,
bool exclusive,
bool recursive,
@@ -302,10 +302,10 @@
file_path,
exclusive,
recursive,
- base::Bind(&GDataFileSystemProxy::OnStatusCallback, this, callback));
+ base::Bind(&DriveFileSystemProxy::OnStatusCallback, this, callback));
}
-void GDataFileSystemProxy::CreateFile(
+void DriveFileSystemProxy::CreateFile(
const FileSystemURL& file_url,
bool exclusive,
const FileSystemOperationInterface::StatusCallback& callback) {
@@ -321,10 +321,10 @@
file_system_->CreateFile(
file_path,
exclusive,
- base::Bind(&GDataFileSystemProxy::OnStatusCallback, this, callback));
+ base::Bind(&DriveFileSystemProxy::OnStatusCallback, this, callback));
}
-void GDataFileSystemProxy::Truncate(
+void DriveFileSystemProxy::Truncate(
const FileSystemURL& file_url, int64 length,
const FileSystemOperationInterface::StatusCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
@@ -347,14 +347,14 @@
// CreateWritableSnapshotFile downloads the whole content unnecessarily.
file_system_->OpenFile(
file_path,
- base::Bind(&GDataFileSystemProxy::OnFileOpenedForTruncate,
+ base::Bind(&DriveFileSystemProxy::OnFileOpenedForTruncate,
this,
file_path,
length,
callback));
}
-void GDataFileSystemProxy::OnOpenFileForWriting(
+void DriveFileSystemProxy::OnOpenFileForWriting(
int file_flags,
base::ProcessHandle peer_handle,
const FileSystemOperationInterface::OpenFileCallback& callback,
@@ -390,7 +390,7 @@
DCHECK(posted);
}
-void GDataFileSystemProxy::OnCreateFileForOpen(
+void DriveFileSystemProxy::OnCreateFileForOpen(
const FilePath& file_path,
int file_flags,
base::ProcessHandle peer_handle,
@@ -416,14 +416,14 @@
// Open created (or existing) file for writing.
file_system_->OpenFile(
file_path,
- base::Bind(&GDataFileSystemProxy::OnOpenFileForWriting,
+ base::Bind(&DriveFileSystemProxy::OnOpenFileForWriting,
this,
file_flags,
peer_handle,
callback));
}
-void GDataFileSystemProxy::OnFileOpenedForTruncate(
+void DriveFileSystemProxy::OnFileOpenedForTruncate(
const FilePath& virtual_path,
int64 length,
const fileapi::FileSystemOperationInterface::StatusCallback& callback,
@@ -447,7 +447,7 @@
local_cache_path,
length,
result),
- base::Bind(&GDataFileSystemProxy::DidTruncate,
+ base::Bind(&DriveFileSystemProxy::DidTruncate,
this,
virtual_path,
callback,
@@ -455,7 +455,7 @@
DCHECK(posted);
}
-void GDataFileSystemProxy::DidTruncate(
+void DriveFileSystemProxy::DidTruncate(
const FilePath& virtual_path,
const FileSystemOperationInterface::StatusCallback& callback,
base::PlatformFileError* truncate_result) {
@@ -470,7 +470,7 @@
base::PlatformFileError(*truncate_result)));
}
-void GDataFileSystemProxy::OpenFile(
+void DriveFileSystemProxy::OpenFile(
const FileSystemURL& file_url,
int file_flags,
base::ProcessHandle peer_handle,
@@ -509,7 +509,7 @@
// Open existing file for writing.
file_system_->OpenFile(
file_path,
- base::Bind(&GDataFileSystemProxy::OnOpenFileForWriting,
+ base::Bind(&DriveFileSystemProxy::OnOpenFileForWriting,
this,
file_flags,
peer_handle,
@@ -529,7 +529,7 @@
file_system_->CreateFile(
file_path,
file_flags & base::PLATFORM_FILE_EXCLUSIVE_WRITE,
- base::Bind(&GDataFileSystemProxy::OnCreateFileForOpen,
+ base::Bind(&DriveFileSystemProxy::OnCreateFileForOpen,
this,
file_path,
file_flags,
@@ -545,7 +545,7 @@
}
}
-void GDataFileSystemProxy::NotifyCloseFile(const FileSystemURL& url) {
+void DriveFileSystemProxy::NotifyCloseFile(const FileSystemURL& url) {
FilePath file_path;
if (!ValidateUrl(url, &file_path))
return;
@@ -554,7 +554,7 @@
base::Bind(&EmitDebugLogForCloseFile, file_path));
}
-void GDataFileSystemProxy::CreateSnapshotFile(
+void DriveFileSystemProxy::CreateSnapshotFile(
const FileSystemURL& file_url,
const FileSystemOperationInterface::SnapshotFileCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
@@ -572,13 +572,13 @@
file_system_->GetEntryInfoByPath(
file_path,
- base::Bind(&GDataFileSystemProxy::OnGetEntryInfoByPath,
+ base::Bind(&DriveFileSystemProxy::OnGetEntryInfoByPath,
this,
file_path,
callback));
}
-void GDataFileSystemProxy::OnGetEntryInfoByPath(
+void DriveFileSystemProxy::OnGetEntryInfoByPath(
const FilePath& entry_path,
const FileSystemOperationInterface::SnapshotFileCallback& callback,
DriveFileError error,
@@ -607,7 +607,7 @@
GetContentCallback());
}
-void GDataFileSystemProxy::CreateWritableSnapshotFile(
+void DriveFileSystemProxy::CreateWritableSnapshotFile(
const FileSystemURL& file_url,
const fileapi::WritableSnapshotFile& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
@@ -624,19 +624,19 @@
file_system_->OpenFile(
file_path,
- base::Bind(&GDataFileSystemProxy::OnCreateWritableSnapshotFile,
+ base::Bind(&DriveFileSystemProxy::OnCreateWritableSnapshotFile,
this,
file_path,
callback));
}
-GDataFileSystemProxy::~GDataFileSystemProxy() {
+DriveFileSystemProxy::~DriveFileSystemProxy() {
// Should be deleted from the CrosMountPointProvider on UI thread.
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
}
// static.
-bool GDataFileSystemProxy::ValidateUrl(
+bool DriveFileSystemProxy::ValidateUrl(
const FileSystemURL& url, FilePath* file_path) {
// what platform you're on.
if (!url.is_valid() || url.type() != fileapi::kFileSystemTypeDrive) {
@@ -646,13 +646,13 @@
return true;
}
-void GDataFileSystemProxy::OnStatusCallback(
+void DriveFileSystemProxy::OnStatusCallback(
const fileapi::FileSystemOperationInterface::StatusCallback& callback,
DriveFileError error) {
callback.Run(util::DriveFileErrorToPlatformError(error));
}
-void GDataFileSystemProxy::OnGetMetadata(
+void DriveFileSystemProxy::OnGetMetadata(
const FilePath& file_path,
const FileSystemOperationInterface::GetMetadataCallback& callback,
DriveFileError error,
@@ -675,7 +675,7 @@
callback.Run(base::PLATFORM_FILE_OK, file_info, file_path);
}
-void GDataFileSystemProxy::OnReadDirectory(
+void DriveFileSystemProxy::OnReadDirectory(
const FileSystemOperationInterface::ReadDirectoryCallback&
callback,
DriveFileError error,
@@ -692,7 +692,7 @@
DCHECK(proto_entries.get());
std::vector<base::FileUtilProxy::Entry> entries;
- // Convert gdata files to something File API stack can understand.
+ // Convert Drive files to something File API stack can understand.
for (size_t i = 0; i < proto_entries->size(); ++i) {
const DriveEntryProto& proto = (*proto_entries)[i];
if (proto.has_file_specific_info() &&
@@ -706,7 +706,7 @@
callback.Run(base::PLATFORM_FILE_OK, entries, false);
}
-void GDataFileSystemProxy::OnCreateWritableSnapshotFile(
+void DriveFileSystemProxy::OnCreateWritableSnapshotFile(
const FilePath& virtual_path,
const fileapi::WritableSnapshotFile& callback,
DriveFileError result,
@@ -721,7 +721,7 @@
ShareableFileReference::DONT_DELETE_ON_FINAL_RELEASE,
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE));
file_ref->AddFinalReleaseCallback(
- base::Bind(&GDataFileSystemProxy::CloseWritableSnapshotFile,
+ base::Bind(&DriveFileSystemProxy::CloseWritableSnapshotFile,
this,
virtual_path));
}
@@ -730,7 +730,7 @@
util::DriveFileErrorToPlatformError(result), local_path, file_ref);
}
-void GDataFileSystemProxy::CloseWritableSnapshotFile(
+void DriveFileSystemProxy::CloseWritableSnapshotFile(
const FilePath& virtual_path,
const FilePath& local_path) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
diff --git a/chrome/browser/chromeos/gdata/gdata_file_system_proxy.h b/chrome/browser/chromeos/gdata/drive_file_system_proxy.h
similarity index 90%
rename from chrome/browser/chromeos/gdata/gdata_file_system_proxy.h
rename to chrome/browser/chromeos/gdata/drive_file_system_proxy.h
index ef33146b0..e7262f67 100644
--- a/chrome/browser/chromeos/gdata/gdata_file_system_proxy.h
+++ b/chrome/browser/chromeos/gdata/drive_file_system_proxy.h
@@ -2,11 +2,11 @@
// 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_FILE_SYSTEM_PROXY_H_
-#define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_PROXY_H_
+#ifndef CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_FILE_SYSTEM_PROXY_H_
+#define CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_FILE_SYSTEM_PROXY_H_
+#include "chrome/browser/chromeos/gdata/drive_file_system_interface.h"
#include "chrome/browser/chromeos/gdata/gdata_errorcode.h"
-#include "chrome/browser/chromeos/gdata/gdata_file_system_interface.h"
#include "webkit/chromeos/fileapi/remote_file_system_proxy.h"
namespace fileapi {
@@ -16,15 +16,15 @@
namespace gdata {
class DriveEntryProto;
-class GDataFileSystemInterface;
+class DriveFileSystemInterface;
typedef std::vector<DriveEntryProto> DriveEntryProtoVector;
-// Implementation of File API's remote file system proxy for GData file system.
-class GDataFileSystemProxy : public fileapi::RemoteFileSystemProxyInterface {
+// Implementation of File API's remote file system proxy for Drive file system.
+class DriveFileSystemProxy : public fileapi::RemoteFileSystemProxyInterface {
public:
- // |file_system| is the GDataFileSystem instance owned by GDataSystemService.
- explicit GDataFileSystemProxy(GDataFileSystemInterface* file_system);
+ // |file_system| is the DriveFileSystem instance owned by GDataSystemService.
+ explicit DriveFileSystemProxy(DriveFileSystemInterface* file_system);
// fileapi::RemoteFileSystemProxyInterface overrides.
virtual void GetFileInfo(
@@ -80,7 +80,7 @@
// TODO(zelidrag): More methods to follow as we implement other parts of FSO.
protected:
- virtual ~GDataFileSystemProxy();
+ virtual ~DriveFileSystemProxy();
private:
// Checks if a given |url| belongs to this file system. If it does,
@@ -180,13 +180,13 @@
base::PlatformFile* platform_file,
base::PlatformFileError* truncate_result);
- // GDataFileSystem is owned by Profile, which outlives GDataFileSystemProxy,
+ // DriveFileSystem is owned by Profile, which outlives DriveFileSystemProxy,
// which is owned by CrosMountPointProvider (i.e. by the time Profile is
// removed, the file manager is already gone). Hence it's safe to use this as
// a raw pointer.
- GDataFileSystemInterface* file_system_;
+ DriveFileSystemInterface* file_system_;
};
} // namespace chromeos
-#endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_PROXY_H_
+#endif // CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_FILE_SYSTEM_PROXY_H_
diff --git a/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc b/chrome/browser/chromeos/gdata/drive_file_system_unittest.cc
similarity index 95%
rename from chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc
rename to chrome/browser/chromeos/gdata/drive_file_system_unittest.cc
index dd42b20..fd1480a5 100644
--- a/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc
+++ b/chrome/browser/chromeos/gdata/drive_file_system_unittest.cc
@@ -19,8 +19,8 @@
#include "chrome/browser/chromeos/cros/cros_library.h"
#include "chrome/browser/chromeos/gdata/drive.pb.h"
#include "chrome/browser/chromeos/gdata/drive_api_parser.h"
+#include "chrome/browser/chromeos/gdata/drive_file_system.h"
#include "chrome/browser/chromeos/gdata/drive_webapps_registry.h"
-#include "chrome/browser/chromeos/gdata/gdata_file_system.h"
#include "chrome/browser/chromeos/gdata/gdata_test_util.h"
#include "chrome/browser/chromeos/gdata/gdata_uploader.h"
#include "chrome/browser/chromeos/gdata/gdata_util.h"
@@ -53,7 +53,7 @@
const bool is_directory;
};
-// Callback to GDataFileSystem::Search used in ContentSearch tests.
+// Callback to DriveFileSystem::Search used in ContentSearch tests.
// Verifies returned vector of results.
void DriveSearchCallback(
MessageLoop* message_loop,
@@ -98,7 +98,7 @@
}
// Action used to set mock expectations for
-// GDataFileSystem::CopyDocument().
+// DriveFileSystem::CopyDocument().
ACTION_P2(MockCopyDocument, status, value) {
base::MessageLoopProxy::current()->PostTask(
FROM_HERE,
@@ -202,9 +202,9 @@
MOCK_METHOD1(UpdateFromApplicationList, void(const AppList& applist));
};
-class GDataFileSystemTest : public testing::Test {
+class DriveFileSystemTest : public testing::Test {
protected:
- GDataFileSystemTest()
+ DriveFileSystemTest()
: ui_thread_(content::BrowserThread::UI, &message_loop_),
io_thread_(content::BrowserThread::IO),
cache_(NULL),
@@ -229,12 +229,12 @@
callback_helper_ = new CallbackHelper;
// Allocate and keep a pointer to the mock, and inject it into the
- // GDataFileSystem object, which will own the mock object.
+ // DriveFileSystem object, which will own the mock object.
mock_drive_service_ = new StrictMock<MockDriveService>;
EXPECT_CALL(*mock_drive_service_, Initialize(profile_.get())).Times(1);
- // Likewise, this will be owned by GDataFileSystem.
+ // Likewise, this will be owned by DriveFileSystem.
mock_free_disk_space_checker_ = new StrictMock<MockFreeDiskSpaceGetter>;
SetFreeDiskSpaceGetterForTesting(mock_free_disk_space_checker_);
@@ -250,7 +250,7 @@
mock_webapps_registry_.reset(new StrictMock<MockDriveWebAppsRegistry>);
ASSERT_FALSE(file_system_);
- file_system_ = new GDataFileSystem(profile_.get(),
+ file_system_ = new DriveFileSystem(profile_.get(),
cache_,
mock_drive_service_,
mock_uploader_.get(),
@@ -402,7 +402,7 @@
bool result = false;
blocking_task_runner_->PostTask(
FROM_HERE,
- base::Bind(&GDataFileSystemTest::GetCacheEntryFromOriginThreadInternal,
+ base::Bind(&DriveFileSystemTest::GetCacheEntryFromOriginThreadInternal,
base::Unretained(this),
resource_id,
md5,
@@ -453,7 +453,7 @@
cache_->StoreOnUIThread(
resource_id, md5, source_path,
DriveCache::FILE_OPERATION_COPY,
- base::Bind(&GDataFileSystemTest::VerifyCacheFileState,
+ base::Bind(&DriveFileSystemTest::VerifyCacheFileState,
base::Unretained(this)));
test_util::RunBlockingPoolTask();
@@ -471,7 +471,7 @@
cache_->PinOnUIThread(
resource_id, md5,
- base::Bind(&GDataFileSystemTest::VerifyCacheFileState,
+ base::Bind(&DriveFileSystemTest::VerifyCacheFileState,
base::Unretained(this)));
test_util::RunBlockingPoolTask();
@@ -490,7 +490,7 @@
cache_->MarkDirtyOnUIThread(
resource_id, md5,
- base::Bind(&GDataFileSystemTest::VerifyMarkDirty,
+ base::Bind(&DriveFileSystemTest::VerifyMarkDirty,
base::Unretained(this)));
test_util::RunBlockingPoolTask();
@@ -527,7 +527,7 @@
cache_->CommitDirtyOnUIThread(
resource_id, md5,
- base::Bind(&GDataFileSystemTest::VerifyCacheFileState,
+ base::Bind(&DriveFileSystemTest::VerifyCacheFileState,
base::Unretained(this)));
test_util::RunBlockingPoolTask();
@@ -848,7 +848,7 @@
scoped_refptr<CallbackHelper> callback_helper_;
DriveCache* cache_;
scoped_ptr<StrictMock<MockGDataUploader> > mock_uploader_;
- GDataFileSystem* file_system_;
+ DriveFileSystem* file_system_;
StrictMock<MockDriveService>* mock_drive_service_;
scoped_ptr<StrictMock<MockDriveWebAppsRegistry> > mock_webapps_registry_;
StrictMock<MockFreeDiskSpaceGetter>* mock_free_disk_space_checker_;
@@ -866,7 +866,7 @@
static bool cros_initialized_;
};
-bool GDataFileSystemTest::cros_initialized_ = false;
+bool DriveFileSystemTest::cros_initialized_ = false;
void AsyncInitializationCallback(
int* counter,
@@ -885,7 +885,7 @@
message_loop->Quit();
}
-TEST_F(GDataFileSystemTest, DuplicatedAsyncInitialization) {
+TEST_F(DriveFileSystemTest, DuplicatedAsyncInitialization) {
int counter = 0;
GetEntryInfoCallback callback = base::Bind(
&AsyncInitializationCallback,
@@ -908,7 +908,7 @@
EXPECT_EQ(2, counter);
}
-TEST_F(GDataFileSystemTest, SearchRootDirectory) {
+TEST_F(DriveFileSystemTest, SearchRootDirectory) {
LoadRootFeedDocument("root_feed.json");
const FilePath kFilePath = FilePath(FILE_PATH_LITERAL("drive"));
@@ -918,7 +918,7 @@
EXPECT_EQ(kDriveRootDirectoryResourceId, entry->resource_id());
}
-TEST_F(GDataFileSystemTest, SearchExistingFile) {
+TEST_F(DriveFileSystemTest, SearchExistingFile) {
LoadRootFeedDocument("root_feed.json");
const FilePath kFilePath = FilePath(
@@ -928,7 +928,7 @@
EXPECT_EQ("file:2_file_resource_id", entry->resource_id());
}
-TEST_F(GDataFileSystemTest, SearchExistingDocument) {
+TEST_F(DriveFileSystemTest, SearchExistingDocument) {
LoadRootFeedDocument("root_feed.json");
const FilePath kFilePath = FilePath(
@@ -938,7 +938,7 @@
EXPECT_EQ("document:5_document_resource_id", entry->resource_id());
}
-TEST_F(GDataFileSystemTest, SearchNonExistingFile) {
+TEST_F(DriveFileSystemTest, SearchNonExistingFile) {
LoadRootFeedDocument("root_feed.json");
const FilePath kFilePath = FilePath(
@@ -947,7 +947,7 @@
ASSERT_FALSE(entry.get());
}
-TEST_F(GDataFileSystemTest, SearchEncodedFileNames) {
+TEST_F(DriveFileSystemTest, SearchEncodedFileNames) {
LoadRootFeedDocument("root_feed.json");
const FilePath kFilePath1 = FilePath(
@@ -968,7 +968,7 @@
EXPECT_EQ("file:slash_subdir_file", entry->resource_id());
}
-TEST_F(GDataFileSystemTest, SearchEncodedFileNamesLoadingRoot) {
+TEST_F(DriveFileSystemTest, SearchEncodedFileNamesLoadingRoot) {
LoadRootFeedDocument("root_feed.json");
const FilePath kFilePath1 = FilePath(
@@ -989,7 +989,7 @@
EXPECT_EQ("file:slash_subdir_file", entry->resource_id());
}
-TEST_F(GDataFileSystemTest, SearchDuplicateNames) {
+TEST_F(DriveFileSystemTest, SearchDuplicateNames) {
LoadRootFeedDocument("root_feed.json");
const FilePath kFilePath1 = FilePath(
@@ -1005,7 +1005,7 @@
EXPECT_EQ("file:4_file_resource_id", entry->resource_id());
}
-TEST_F(GDataFileSystemTest, SearchExistingDirectory) {
+TEST_F(DriveFileSystemTest, SearchExistingDirectory) {
LoadRootFeedDocument("root_feed.json");
const FilePath kFilePath = FilePath(
@@ -1015,7 +1015,7 @@
ASSERT_EQ("folder:1_folder_resource_id", entry->resource_id());
}
-TEST_F(GDataFileSystemTest, SearchInSubdir) {
+TEST_F(DriveFileSystemTest, SearchInSubdir) {
LoadRootFeedDocument("root_feed.json");
const FilePath kFilePath = FilePath(
@@ -1026,7 +1026,7 @@
}
// Check the reconstruction of the directory structure from only the root feed.
-TEST_F(GDataFileSystemTest, SearchInSubSubdir) {
+TEST_F(DriveFileSystemTest, SearchInSubSubdir) {
LoadRootFeedDocument("root_feed.json");
const FilePath kFilePath = FilePath(
@@ -1037,7 +1037,7 @@
ASSERT_EQ("folder:sub_sub_directory_folder_id", entry->resource_id());
}
-TEST_F(GDataFileSystemTest, FilePathTests) {
+TEST_F(DriveFileSystemTest, FilePathTests) {
LoadRootFeedDocument("root_feed.json");
EXPECT_TRUE(EntryExists(FilePath(FILE_PATH_LITERAL("drive/File 1.txt"))));
@@ -1047,7 +1047,7 @@
FILE_PATH_LITERAL("drive/Directory 1/SubDirectory File 1.txt"))));
}
-TEST_F(GDataFileSystemTest, ChangeFeed_AddAndDeleteFileInRoot) {
+TEST_F(DriveFileSystemTest, ChangeFeed_AddAndDeleteFileInRoot) {
int latest_changelog = 0;
LoadRootFeedDocument("root_feed.json");
@@ -1064,7 +1064,7 @@
}
-TEST_F(GDataFileSystemTest, ChangeFeed_AddAndDeleteFileFromExistingDirectory) {
+TEST_F(DriveFileSystemTest, ChangeFeed_AddAndDeleteFileFromExistingDirectory) {
int latest_changelog = 0;
LoadRootFeedDocument("root_feed.json");
@@ -1090,7 +1090,7 @@
FILE_PATH_LITERAL("drive/Directory 1/Added file.gdoc"))));
}
-TEST_F(GDataFileSystemTest, ChangeFeed_AddFileToNewDirectory) {
+TEST_F(DriveFileSystemTest, ChangeFeed_AddFileToNewDirectory) {
int latest_changelog = 0;
LoadRootFeedDocument("root_feed.json");
// Add file to a new directory.
@@ -1107,7 +1107,7 @@
FILE_PATH_LITERAL("drive/New Directory/File in new dir.gdoc"))));
}
-TEST_F(GDataFileSystemTest, ChangeFeed_AddFileToNewButDeletedDirectory) {
+TEST_F(DriveFileSystemTest, ChangeFeed_AddFileToNewButDeletedDirectory) {
int latest_changelog = 0;
LoadRootFeedDocument("root_feed.json");
@@ -1119,7 +1119,7 @@
++latest_changelog);
}
-TEST_F(GDataFileSystemTest, ChangeFeed_DirectoryMovedFromRootToDirectory) {
+TEST_F(DriveFileSystemTest, ChangeFeed_DirectoryMovedFromRootToDirectory) {
int latest_changelog = 0;
LoadRootFeedDocument("root_feed.json");
@@ -1159,7 +1159,7 @@
"Sub Sub Directory Folder"))));
}
-TEST_F(GDataFileSystemTest, ChangeFeed_FileMovedFromDirectoryToRoot) {
+TEST_F(DriveFileSystemTest, ChangeFeed_FileMovedFromDirectoryToRoot) {
int latest_changelog = 0;
LoadRootFeedDocument("root_feed.json");
@@ -1191,7 +1191,7 @@
"drive/SubDirectory File 1.txt"))));
}
-TEST_F(GDataFileSystemTest, ChangeFeed_FileRenamedInDirectory) {
+TEST_F(DriveFileSystemTest, ChangeFeed_FileRenamedInDirectory) {
int latest_changelog = 0;
LoadRootFeedDocument("root_feed.json");
@@ -1215,7 +1215,7 @@
"drive/Directory 1/New SubDirectory File 1.txt"))));
}
-TEST_F(GDataFileSystemTest, CachedFeedLoading) {
+TEST_F(DriveFileSystemTest, CachedFeedLoading) {
SaveTestFileSystem();
TestLoadMetadataFromCache();
@@ -1227,7 +1227,7 @@
FilePath(FILE_PATH_LITERAL("drive/Dir1/SubDir2/File3"))));
}
-TEST_F(GDataFileSystemTest, CachedFeadLoadingThenServerFeedLoading) {
+TEST_F(DriveFileSystemTest, CachedFeadLoadingThenServerFeedLoading) {
SaveTestFileSystem();
// SaveTestFileSystem and "account_metadata.json" have the same changestamp,
@@ -1253,7 +1253,7 @@
test_util::RunBlockingPoolTask();
}
-TEST_F(GDataFileSystemTest, TransferFileFromLocalToRemote_RegularFile) {
+TEST_F(DriveFileSystemTest, TransferFileFromLocalToRemote_RegularFile) {
EXPECT_CALL(*mock_free_disk_space_checker_, AmountOfFreeDiskSpace())
.Times(AtLeast(1)).WillRepeatedly(Return(kLotsOfSpace));
@@ -1289,7 +1289,7 @@
EXPECT_TRUE(EntryExists(remote_dest_file_path));
}
-TEST_F(GDataFileSystemTest, TransferFileFromLocalToRemote_HostedDocument) {
+TEST_F(DriveFileSystemTest, TransferFileFromLocalToRemote_HostedDocument) {
LoadRootFeedDocument("root_feed.json");
// Prepare a local file, which is a json file of a hosted document, which
@@ -1341,7 +1341,7 @@
EXPECT_TRUE(EntryExists(remote_dest_file_path));
}
-TEST_F(GDataFileSystemTest, TransferFileFromRemoteToLocal_RegularFile) {
+TEST_F(DriveFileSystemTest, TransferFileFromRemoteToLocal_RegularFile) {
LoadRootFeedDocument("root_feed.json");
FileOperationCallback callback =
@@ -1396,7 +1396,7 @@
EXPECT_EQ(remote_src_file_data, local_dest_file_data);
}
-TEST_F(GDataFileSystemTest, TransferFileFromRemoteToLocal_HostedDocument) {
+TEST_F(DriveFileSystemTest, TransferFileFromRemoteToLocal_HostedDocument) {
LoadRootFeedDocument("root_feed.json");
FileOperationCallback callback =
@@ -1419,7 +1419,7 @@
VerifyHostedDocumentJSONFile(*entry_proto, local_dest_file_path);
}
-TEST_F(GDataFileSystemTest, CopyNotExistingFile) {
+TEST_F(DriveFileSystemTest, CopyNotExistingFile) {
FilePath src_file_path(FILE_PATH_LITERAL("drive/Dummy file.txt"));
FilePath dest_file_path(FILE_PATH_LITERAL("drive/Test.log"));
@@ -1439,7 +1439,7 @@
EXPECT_FALSE(EntryExists(dest_file_path));
}
-TEST_F(GDataFileSystemTest, CopyFileToNonExistingDirectory) {
+TEST_F(DriveFileSystemTest, CopyFileToNonExistingDirectory) {
FilePath src_file_path(FILE_PATH_LITERAL("drive/File 1.txt"));
FilePath dest_parent_path(FILE_PATH_LITERAL("drive/Dummy"));
FilePath dest_file_path(FILE_PATH_LITERAL("drive/Dummy/Test.log"));
@@ -1471,7 +1471,7 @@
// Test the case where the parent of |dest_file_path| is an existing file,
// not a directory.
-TEST_F(GDataFileSystemTest, CopyFileToInvalidPath) {
+TEST_F(DriveFileSystemTest, CopyFileToInvalidPath) {
FilePath src_file_path(FILE_PATH_LITERAL("drive/Document 1.gdoc"));
FilePath dest_parent_path(FILE_PATH_LITERAL("drive/Duplicate Name.txt"));
FilePath dest_file_path(FILE_PATH_LITERAL(
@@ -1508,7 +1508,7 @@
EXPECT_FALSE(EntryExists(dest_file_path));
}
-TEST_F(GDataFileSystemTest, RenameFile) {
+TEST_F(DriveFileSystemTest, RenameFile) {
const FilePath src_file_path(
FILE_PATH_LITERAL("drive/Directory 1/SubDirectory File 1.txt"));
const FilePath src_parent_path(FILE_PATH_LITERAL("drive/Directory 1"));
@@ -1544,7 +1544,7 @@
EXPECT_EQ(src_file_resource_id, GetResourceIdByPath(dest_file_path));
}
-TEST_F(GDataFileSystemTest, MoveFileFromRootToSubDirectory) {
+TEST_F(DriveFileSystemTest, MoveFileFromRootToSubDirectory) {
FilePath src_file_path(FILE_PATH_LITERAL("drive/File 1.txt"));
FilePath dest_parent_path(FILE_PATH_LITERAL("drive/Directory 1"));
FilePath dest_file_path(FILE_PATH_LITERAL("drive/Directory 1/Test.log"));
@@ -1593,7 +1593,7 @@
EXPECT_EQ(src_file_resource_id, GetResourceIdByPath(dest_file_path));
}
-TEST_F(GDataFileSystemTest, MoveFileFromSubDirectoryToRoot) {
+TEST_F(DriveFileSystemTest, MoveFileFromSubDirectoryToRoot) {
FilePath src_parent_path(FILE_PATH_LITERAL("drive/Directory 1"));
FilePath src_file_path(
FILE_PATH_LITERAL("drive/Directory 1/SubDirectory File 1.txt"));
@@ -1644,7 +1644,7 @@
EXPECT_EQ(src_file_resource_id, GetResourceIdByPath(dest_file_path));
}
-TEST_F(GDataFileSystemTest, MoveFileBetweenSubDirectories) {
+TEST_F(DriveFileSystemTest, MoveFileBetweenSubDirectories) {
FilePath src_parent_path(FILE_PATH_LITERAL("drive/Directory 1"));
FilePath src_file_path(
FILE_PATH_LITERAL("drive/Directory 1/SubDirectory File 1.txt"));
@@ -1722,7 +1722,7 @@
EXPECT_EQ(src_file_resource_id, GetResourceIdByPath(dest_file_path));
}
-TEST_F(GDataFileSystemTest, MoveNotExistingFile) {
+TEST_F(DriveFileSystemTest, MoveNotExistingFile) {
FilePath src_file_path(FILE_PATH_LITERAL("drive/Dummy file.txt"));
FilePath dest_file_path(FILE_PATH_LITERAL("drive/Test.log"));
@@ -1742,7 +1742,7 @@
EXPECT_FALSE(EntryExists(dest_file_path));
}
-TEST_F(GDataFileSystemTest, MoveFileToNonExistingDirectory) {
+TEST_F(DriveFileSystemTest, MoveFileToNonExistingDirectory) {
FilePath src_file_path(FILE_PATH_LITERAL("drive/File 1.txt"));
FilePath dest_parent_path(FILE_PATH_LITERAL("drive/Dummy"));
FilePath dest_file_path(FILE_PATH_LITERAL("drive/Dummy/Test.log"));
@@ -1774,7 +1774,7 @@
// Test the case where the parent of |dest_file_path| is a existing file,
// not a directory.
-TEST_F(GDataFileSystemTest, MoveFileToInvalidPath) {
+TEST_F(DriveFileSystemTest, MoveFileToInvalidPath) {
FilePath src_file_path(FILE_PATH_LITERAL("drive/File 1.txt"));
FilePath dest_parent_path(FILE_PATH_LITERAL("drive/Duplicate Name.txt"));
FilePath dest_file_path(FILE_PATH_LITERAL(
@@ -1809,7 +1809,7 @@
EXPECT_FALSE(EntryExists(dest_file_path));
}
-TEST_F(GDataFileSystemTest, RemoveEntries) {
+TEST_F(DriveFileSystemTest, RemoveEntries) {
LoadRootFeedDocument("root_feed.json");
FilePath nonexisting_file(FILE_PATH_LITERAL("drive/Dummy file.txt"));
@@ -1863,7 +1863,7 @@
test_util::RunBlockingPoolTask();
}
-TEST_F(GDataFileSystemTest, CreateDirectory) {
+TEST_F(DriveFileSystemTest, CreateDirectory) {
LoadRootFeedDocument("root_feed.json");
EXPECT_CALL(*mock_directory_observer_, OnDirectoryChanged(
@@ -1885,7 +1885,7 @@
EXPECT_TRUE(EntryExists(subdir_path));
}
-TEST_F(GDataFileSystemTest, FindFirstMissingParentDirectory) {
+TEST_F(DriveFileSystemTest, FindFirstMissingParentDirectory) {
LoadRootFeedDocument("root_feed.json");
GURL last_dir_content_url;
@@ -1894,7 +1894,7 @@
// Create directory in root.
FilePath dir_path(FILE_PATH_LITERAL("drive/New Folder 1"));
EXPECT_EQ(
- GDataFileSystem::FOUND_MISSING,
+ DriveFileSystem::FOUND_MISSING,
file_system_->FindFirstMissingParentDirectory(dir_path,
&last_dir_content_url,
&first_missing_parent_path));
@@ -1905,7 +1905,7 @@
// Missing folders in subdir of an existing folder.
FilePath dir_path2(FILE_PATH_LITERAL("drive/Directory 1/New Folder 2"));
EXPECT_EQ(
- GDataFileSystem::FOUND_MISSING,
+ DriveFileSystem::FOUND_MISSING,
file_system_->FindFirstMissingParentDirectory(dir_path2,
&last_dir_content_url,
&first_missing_parent_path));
@@ -1916,7 +1916,7 @@
// Missing two folders on the path.
FilePath dir_path3 = dir_path2.Append(FILE_PATH_LITERAL("Another Folder"));
EXPECT_EQ(
- GDataFileSystem::FOUND_MISSING,
+ DriveFileSystem::FOUND_MISSING,
file_system_->FindFirstMissingParentDirectory(dir_path3,
&last_dir_content_url,
&first_missing_parent_path));
@@ -1926,7 +1926,7 @@
// Folders on top of an existing file.
EXPECT_EQ(
- GDataFileSystem::FOUND_INVALID,
+ DriveFileSystem::FOUND_INVALID,
file_system_->FindFirstMissingParentDirectory(
FilePath(FILE_PATH_LITERAL("drive/File 1.txt/BadDir")),
&last_dir_content_url,
@@ -1934,7 +1934,7 @@
// Existing folder.
EXPECT_EQ(
- GDataFileSystem::DIRECTORY_ALREADY_PRESENT,
+ DriveFileSystem::DIRECTORY_ALREADY_PRESENT,
file_system_->FindFirstMissingParentDirectory(
FilePath(FILE_PATH_LITERAL("drive/Directory 1")),
&last_dir_content_url,
@@ -1942,7 +1942,7 @@
}
// Create a directory through the document service
-TEST_F(GDataFileSystemTest, CreateDirectoryWithService) {
+TEST_F(DriveFileSystemTest, CreateDirectoryWithService) {
LoadRootFeedDocument("root_feed.json");
EXPECT_CALL(*mock_drive_service_,
CreateDirectory(_, "Sample Directory Title", _)).Times(1);
@@ -1963,7 +1963,7 @@
// EXPECT_EQ(DRIVE_FILE_OK, callback_helper_->last_error_);
}
-TEST_F(GDataFileSystemTest, GetFileByPath_FromGData_EnoughSpace) {
+TEST_F(DriveFileSystemTest, GetFileByPath_FromGData_EnoughSpace) {
LoadRootFeedDocument("root_feed.json");
GetFileCallback callback =
@@ -2004,7 +2004,7 @@
callback_helper_->download_path_.value());
}
-TEST_F(GDataFileSystemTest, GetFileByPath_FromGData_NoSpaceAtAll) {
+TEST_F(DriveFileSystemTest, GetFileByPath_FromGData_NoSpaceAtAll) {
LoadRootFeedDocument("root_feed.json");
GetFileCallback callback =
@@ -2042,7 +2042,7 @@
callback_helper_->last_error_);
}
-TEST_F(GDataFileSystemTest, GetFileByPath_FromGData_NoEnoughSpaceButCanFreeUp) {
+TEST_F(DriveFileSystemTest, GetFileByPath_FromGData_NoEnoughSpaceButCanFreeUp) {
LoadRootFeedDocument("root_feed.json");
GetFileCallback callback =
@@ -2104,7 +2104,7 @@
ASSERT_FALSE(CacheFileExists("<resource_id>", "<md5>"));
}
-TEST_F(GDataFileSystemTest, GetFileByPath_FromGData_EnoughSpaceButBecomeFull) {
+TEST_F(DriveFileSystemTest, GetFileByPath_FromGData_EnoughSpaceButBecomeFull) {
LoadRootFeedDocument("root_feed.json");
GetFileCallback callback =
@@ -2148,7 +2148,7 @@
callback_helper_->last_error_);
}
-TEST_F(GDataFileSystemTest, GetFileByPath_FromCache) {
+TEST_F(DriveFileSystemTest, GetFileByPath_FromCache) {
EXPECT_CALL(*mock_free_disk_space_checker_, AmountOfFreeDiskSpace())
.Times(AtLeast(1)).WillRepeatedly(Return(kLotsOfSpace));
@@ -2192,7 +2192,7 @@
callback_helper_->download_path_.value());
}
-TEST_F(GDataFileSystemTest, GetFileByPath_HostedDocument) {
+TEST_F(DriveFileSystemTest, GetFileByPath_HostedDocument) {
LoadRootFeedDocument("root_feed.json");
GetFileCallback callback =
@@ -2216,7 +2216,7 @@
callback_helper_->download_path_);
}
-TEST_F(GDataFileSystemTest, GetFileByResourceId) {
+TEST_F(DriveFileSystemTest, GetFileByResourceId) {
EXPECT_CALL(*mock_free_disk_space_checker_, AmountOfFreeDiskSpace())
.Times(AtLeast(1)).WillRepeatedly(Return(kLotsOfSpace));
@@ -2256,7 +2256,7 @@
callback_helper_->download_path_.value());
}
-TEST_F(GDataFileSystemTest, GetFileByResourceId_FromCache) {
+TEST_F(DriveFileSystemTest, GetFileByResourceId_FromCache) {
EXPECT_CALL(*mock_free_disk_space_checker_, AmountOfFreeDiskSpace())
.Times(AtLeast(1)).WillRepeatedly(Return(kLotsOfSpace));
@@ -2295,7 +2295,7 @@
callback_helper_->download_path_.value());
}
-TEST_F(GDataFileSystemTest, UpdateFileByResourceId_PersistentFile) {
+TEST_F(DriveFileSystemTest, UpdateFileByResourceId_PersistentFile) {
EXPECT_CALL(*mock_free_disk_space_checker_, AmountOfFreeDiskSpace())
.Times(AtLeast(1)).WillRepeatedly(Return(kLotsOfSpace));
@@ -2439,7 +2439,7 @@
ASSERT_FALSE(file_util::PathExists(outgoing_symlink_path));
}
-TEST_F(GDataFileSystemTest, UpdateFileByResourceId_NonexistentFile) {
+TEST_F(DriveFileSystemTest, UpdateFileByResourceId_NonexistentFile) {
LoadRootFeedDocument("root_feed.json");
// This is nonexistent in root_feed.json.
@@ -2458,7 +2458,7 @@
EXPECT_EQ(DRIVE_FILE_ERROR_NOT_FOUND, callback_helper_->last_error_);
}
-TEST_F(GDataFileSystemTest, ContentSearch) {
+TEST_F(DriveFileSystemTest, ContentSearch) {
LoadRootFeedDocument("root_feed.json");
mock_drive_service_->set_search_result("search_result_feed.json");
@@ -2478,7 +2478,7 @@
message_loop_.Run(); // Wait to get our result.
}
-TEST_F(GDataFileSystemTest, ContentSearchWithNewEntry) {
+TEST_F(DriveFileSystemTest, ContentSearchWithNewEntry) {
LoadRootFeedDocument("root_feed.json");
// Search result returning two entries "Directory 1/" and
@@ -2511,7 +2511,7 @@
message_loop_.Run(); // Wait to get our result.
}
-TEST_F(GDataFileSystemTest, ContentSearchEmptyResult) {
+TEST_F(DriveFileSystemTest, ContentSearchEmptyResult) {
LoadRootFeedDocument("root_feed.json");
mock_drive_service_->set_search_result("empty_feed.json");
@@ -2528,7 +2528,7 @@
message_loop_.Run(); // Wait to get our result.
}
-TEST_F(GDataFileSystemTest, GetAvailableSpace) {
+TEST_F(DriveFileSystemTest, GetAvailableSpace) {
GetAvailableSpaceCallback callback =
base::Bind(&CallbackHelper::GetAvailableSpaceCallback,
callback_helper_.get());
@@ -2541,7 +2541,7 @@
EXPECT_EQ(GG_LONGLONG(9876543210), callback_helper_->quota_bytes_total_);
}
-TEST_F(GDataFileSystemTest, RequestDirectoryRefresh) {
+TEST_F(DriveFileSystemTest, RequestDirectoryRefresh) {
LoadRootFeedDocument("root_feed.json");
// We'll fetch documents in the root directory with its resource ID.
@@ -2556,7 +2556,7 @@
test_util::RunBlockingPoolTask();
}
-TEST_F(GDataFileSystemTest, OpenAndCloseFile) {
+TEST_F(DriveFileSystemTest, OpenAndCloseFile) {
LoadRootFeedDocument("root_feed.json");
OpenFileCallback callback =
diff --git a/chrome/browser/chromeos/gdata/drive_files.h b/chrome/browser/chromeos/gdata/drive_files.h
index ea28f373..1c43a076 100644
--- a/chrome/browser/chromeos/gdata/drive_files.h
+++ b/chrome/browser/chromeos/gdata/drive_files.h
@@ -117,7 +117,7 @@
bool is_deleted() const { return deleted_; }
// Returns virtual file path representing this file system entry. This path
- // corresponds to file path expected by public methods of GDataFileSystem
+ // corresponds to file path expected by public methods of DriveFileSystem
// class.
FilePath GetFilePath() const;
diff --git a/chrome/browser/chromeos/gdata/drive_task_executor.cc b/chrome/browser/chromeos/gdata/drive_task_executor.cc
index d3d0be7..9d98cff 100644
--- a/chrome/browser/chromeos/gdata/drive_task_executor.cc
+++ b/chrome/browser/chromeos/gdata/drive_task_executor.cc
@@ -64,7 +64,7 @@
DCHECK(current_index_ == 0);
if (!system_service || !system_service->file_system())
return false;
- GDataFileSystemInterface* file_system = system_service->file_system();
+ DriveFileSystemInterface* file_system = system_service->file_system();
// Reset the index, so we know when we're done.
current_index_ = raw_paths.size();
diff --git a/chrome/browser/chromeos/gdata/drive_webapps_registry.cc b/chrome/browser/chromeos/gdata/drive_webapps_registry.cc
index 01e8f37..7dd6556 100644
--- a/chrome/browser/chromeos/gdata/drive_webapps_registry.cc
+++ b/chrome/browser/chromeos/gdata/drive_webapps_registry.cc
@@ -66,7 +66,7 @@
DriveWebAppInfo::~DriveWebAppInfo() {
}
-// GDataFileSystem::WebAppFileSelector struct implementation.
+// DriveFileSystem::WebAppFileSelector struct implementation.
DriveWebAppsRegistry::WebAppFileSelector::WebAppFileSelector(
const GURL& product_link,
diff --git a/chrome/browser/chromeos/gdata/file_write_helper.cc b/chrome/browser/chromeos/gdata/file_write_helper.cc
index 3a2b670..b64733a 100644
--- a/chrome/browser/chromeos/gdata/file_write_helper.cc
+++ b/chrome/browser/chromeos/gdata/file_write_helper.cc
@@ -11,7 +11,7 @@
namespace gdata {
-FileWriteHelper::FileWriteHelper(GDataFileSystemInterface* file_system)
+FileWriteHelper::FileWriteHelper(DriveFileSystemInterface* file_system)
: file_system_(file_system),
weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
// Must be created in GDataSystemService.
diff --git a/chrome/browser/chromeos/gdata/file_write_helper.h b/chrome/browser/chromeos/gdata/file_write_helper.h
index c5dca70..09e11f4 100644
--- a/chrome/browser/chromeos/gdata/file_write_helper.h
+++ b/chrome/browser/chromeos/gdata/file_write_helper.h
@@ -8,16 +8,16 @@
#include "base/bind.h"
#include "base/file_path.h"
#include "base/memory/weak_ptr.h"
+#include "chrome/browser/chromeos/gdata/drive_file_system_interface.h"
#include "chrome/browser/chromeos/gdata/gdata_errorcode.h"
-#include "chrome/browser/chromeos/gdata/gdata_file_system_interface.h"
namespace gdata {
-// This class provides higher level operations for writing to GData files over
-// GDataFileSystemInterface.
+// This class provides higher level operations for writing to Drive files over
+// DriveFileSystemInterface.
class FileWriteHelper {
public:
- explicit FileWriteHelper(GDataFileSystemInterface* file_system);
+ explicit FileWriteHelper(DriveFileSystemInterface* file_system);
~FileWriteHelper();
// Prepares a local temporary file path and passes it to |callback| on the
@@ -45,7 +45,7 @@
void PrepareWritableFileAndRunAfterCallback(const FilePath& file_path);
// File system owned by GDataSystemService.
- GDataFileSystemInterface* file_system_;
+ DriveFileSystemInterface* file_system_;
// WeakPtrFactory bound to the UI thread.
// Note: This should remain the last member so it'll be destroyed and
diff --git a/chrome/browser/chromeos/gdata/file_write_helper_unittest.cc b/chrome/browser/chromeos/gdata/file_write_helper_unittest.cc
index 8f8d3c2..42984b1 100644
--- a/chrome/browser/chromeos/gdata/file_write_helper_unittest.cc
+++ b/chrome/browser/chromeos/gdata/file_write_helper_unittest.cc
@@ -8,7 +8,7 @@
#include "base/message_loop.h"
#include "base/threading/thread_restrictions.h"
#include "chrome/browser/chromeos/gdata/gdata_test_util.h"
-#include "chrome/browser/chromeos/gdata/mock_gdata_file_system.h"
+#include "chrome/browser/chromeos/gdata/mock_drive_file_system.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/test/test_browser_thread.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -51,13 +51,13 @@
public:
FileWriteHelperTest()
: ui_thread_(content::BrowserThread::UI, &message_loop_),
- mock_file_system_(new StrictMock<MockGDataFileSystem>) {
+ mock_file_system_(new StrictMock<MockDriveFileSystem>) {
}
protected:
MessageLoopForUI message_loop_;
content::TestBrowserThread ui_thread_;
- scoped_ptr< StrictMock<MockGDataFileSystem> > mock_file_system_;
+ scoped_ptr< StrictMock<MockDriveFileSystem> > mock_file_system_;
};
TEST_F(FileWriteHelperTest, PrepareFileForWritingSuccess) {
diff --git a/chrome/browser/chromeos/gdata/gdata_download_observer.cc b/chrome/browser/chromeos/gdata/gdata_download_observer.cc
index 757aa21b..bf165f8 100644
--- a/chrome/browser/chromeos/gdata/gdata_download_observer.cc
+++ b/chrome/browser/chromeos/gdata/gdata_download_observer.cc
@@ -10,8 +10,8 @@
#include "base/file_util.h"
#include "base/supports_user_data.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_service_interface.h"
-#include "chrome/browser/chromeos/gdata/gdata_file_system_interface.h"
#include "chrome/browser/chromeos/gdata/gdata_system_service.h"
#include "chrome/browser/chromeos/gdata/gdata_upload_file_info.h"
#include "chrome/browser/chromeos/gdata/gdata_uploader.h"
@@ -133,7 +133,7 @@
base::Owned(gdata_tmp_download_path)));
}
-// Callback for GDataFileSystem::CreateDirectory.
+// Callback for DriveFileSystem::CreateDirectory.
void OnCreateDirectory(const base::Closure& substitute_callback,
DriveFileError error) {
DVLOG(1) << "OnCreateDirectory " << error;
@@ -145,7 +145,7 @@
}
}
-// Callback for GDataFileSystem::GetEntryInfoByPath.
+// Callback for DriveFileSystem::GetEntryInfoByPath.
void OnEntryFound(Profile* profile,
const FilePath& gdata_dir_path,
const base::Closure& substitute_callback,
@@ -176,7 +176,7 @@
if (error == HTTP_SUCCESS) {
const FilePath gdata_dir_path =
util::ExtractGDataPath(gdata_path.DirName());
- // Ensure the directory exists. This also forces GDataFileSystem to
+ // Ensure the directory exists. This also forces DriveFileSystem to
// initialize GDataRootDirectory.
GetSystemService(profile)->file_system()->GetEntryInfoByPath(
gdata_dir_path,
@@ -192,7 +192,7 @@
GDataDownloadObserver::GDataDownloadObserver(
GDataUploader* uploader,
- GDataFileSystemInterface* file_system)
+ DriveFileSystemInterface* file_system)
: gdata_uploader_(uploader),
file_system_(file_system),
download_manager_(NULL),
@@ -231,8 +231,8 @@
// Can't access drive if we're not authenticated.
// We set off a chain of callbacks as follows:
// DriveServiceInterface::Authenticate
- // OnAuthenticate calls GDataFileSystem::GetEntryInfoByPath
- // OnEntryFound calls GDataFileSystem::CreateDirectory (if necessary)
+ // OnAuthenticate calls DriveFileSystem::GetEntryInfoByPath
+ // OnEntryFound calls DriveFileSystem::CreateDirectory (if necessary)
// OnCreateDirectory calls SubstituteGDataDownloadPathInternal
GetSystemService(profile)->drive_service()->Authenticate(
base::Bind(&OnAuthenticate, profile, gdata_path,
@@ -628,7 +628,7 @@
DCHECK(upload_data);
// Take ownership of the DocumentEntry from UploadFileInfo. This is used by
- // GDataFileSystem::AddUploadedFile() to add the entry to DriveCache after the
+ // DriveFileSystem::AddUploadedFile() to add the entry to DriveCache after the
// upload completes.
upload_data->set_entry(upload_file_info->entry.Pass());
diff --git a/chrome/browser/chromeos/gdata/gdata_download_observer.h b/chrome/browser/chromeos/gdata/gdata_download_observer.h
index 08e8b79..ad12a20 100644
--- a/chrome/browser/chromeos/gdata/gdata_download_observer.h
+++ b/chrome/browser/chromeos/gdata/gdata_download_observer.h
@@ -20,7 +20,7 @@
class DocumentEntry;
class DriveEntryProto;
-class GDataFileSystemInterface;
+class DriveFileSystemInterface;
class GDataUploader;
struct UploadFileInfo;
@@ -30,7 +30,7 @@
public content::DownloadItem::Observer {
public:
GDataDownloadObserver(GDataUploader* uploader,
- GDataFileSystemInterface* file_system);
+ DriveFileSystemInterface* file_system);
virtual ~GDataDownloadObserver();
// Become an observer of DownloadManager.
@@ -122,7 +122,7 @@
DriveFileError error,
scoped_ptr<DriveEntryProto> entry_proto);
- // Callback for handling results of GDataFileSystem::GetEntryInfoByPath()
+ // Callback for handling results of DriveFileSystem::GetEntryInfoByPath()
// initiated by CreateUploadFileInfoAfterCheckExistence(). This callback
// reads the directory entry to determine the upload path, then calls
// StartUpload() to actually start the upload.
@@ -153,7 +153,7 @@
// The uploader owned by GDataSystemService. Used to trigger file uploads.
GDataUploader* gdata_uploader_;
// The file system owned by GDataSystemService.
- GDataFileSystemInterface* file_system_;
+ 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 d0607a51..c45ae80 100644
--- a/chrome/browser/chromeos/gdata/gdata_protocol_handler.cc
+++ b/chrome/browser/chromeos/gdata/gdata_protocol_handler.cc
@@ -18,9 +18,9 @@
#include "base/threading/sequenced_worker_pool.h"
#include "base/utf_string_conversions.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_service_interface.h"
#include "chrome/browser/chromeos/gdata/gdata_errorcode.h"
-#include "chrome/browser/chromeos/gdata/gdata_file_system_interface.h"
#include "chrome/browser/chromeos/gdata/gdata_system_service.h"
#include "chrome/browser/chromeos/gdata/gdata_util.h"
#include "chrome/browser/profiles/profile.h"
@@ -111,8 +111,8 @@
ProfileManager::GetDefaultProfile());
}
-// Helper function to get GDataFileSystem from Profile on UI thread.
-void GetFileSystemOnUIThread(GDataFileSystemInterface** file_system) {
+// Helper function to get DriveFileSystem from Profile on UI thread.
+void GetFileSystemOnUIThread(DriveFileSystemInterface** file_system) {
GDataSystemService* system_service = GetSystemService();
*file_system = system_service ? system_service->file_system() : NULL;
}
@@ -147,7 +147,7 @@
private:
// Helper for Start() to let us start asynchronously.
- void StartAsync(GDataFileSystemInterface** file_system);
+ void StartAsync(DriveFileSystemInterface** file_system);
// Helper methods for Delegate::OnUrlFetchDownloadData and ReadRawData to
// receive download data and copy to response buffer.
@@ -162,7 +162,7 @@
bool ReadFromDownloadData();
// Helper callback for handling async responses from
- // GDataFileSystem::GetFileByResourceId().
+ // DriveFileSystem::GetFileByResourceId().
void OnGetFileByResourceId(DriveFileError error,
const FilePath& local_file_path,
const std::string& mime_type,
@@ -204,7 +204,7 @@
void CloseFileStream();
scoped_ptr<base::WeakPtrFactory<GDataURLRequestJob> > weak_ptr_factory_;
- GDataFileSystemInterface* file_system_;
+ DriveFileSystemInterface* file_system_;
bool error_; // True if we've encountered an error.
bool headers_set_; // True if headers have been set.
@@ -301,7 +301,7 @@
// UI thread; StartAsync reply task will proceed with actually starting the
// request.
- GDataFileSystemInterface** file_system = new GDataFileSystemInterface*(NULL);
+ DriveFileSystemInterface** file_system = new DriveFileSystemInterface*(NULL);
BrowserThread::PostTaskAndReply(
BrowserThread::UI,
FROM_HERE,
@@ -318,7 +318,7 @@
CloseFileStream();
// If download operation for gdata file (via
- // GDataFileSystem::GetFileByResourceId) is still in progress, cancel it by
+ // DriveFileSystem::GetFileByResourceId) is still in progress, cancel it by
// posting a task on the UI thread.
// Download operation is still in progress if:
// 1) |local_file_path_| is still empty; it gets filled when callback for
@@ -471,7 +471,7 @@
//======================= GDataURLRequestJob private methods ===================
-void GDataURLRequestJob::StartAsync(GDataFileSystemInterface** file_system) {
+void GDataURLRequestJob::StartAsync(DriveFileSystemInterface** file_system) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
file_system_ = *file_system;
diff --git a/chrome/browser/chromeos/gdata/gdata_sync_client.cc b/chrome/browser/chromeos/gdata/gdata_sync_client.cc
index 0b5bf3d7..93e3834 100644
--- a/chrome/browser/chromeos/gdata/gdata_sync_client.cc
+++ b/chrome/browser/chromeos/gdata/gdata_sync_client.cc
@@ -74,7 +74,7 @@
}
GDataSyncClient::GDataSyncClient(Profile* profile,
- GDataFileSystemInterface* file_system,
+ DriveFileSystemInterface* file_system,
DriveCache* cache)
: profile_(profile),
file_system_(file_system),
diff --git a/chrome/browser/chromeos/gdata/gdata_sync_client.h b/chrome/browser/chromeos/gdata/gdata_sync_client.h
index 64d4e03f..91aede1 100644
--- a/chrome/browser/chromeos/gdata/gdata_sync_client.h
+++ b/chrome/browser/chromeos/gdata/gdata_sync_client.h
@@ -16,7 +16,7 @@
#include "base/time.h"
#include "chrome/browser/chromeos/cros/network_library.h"
#include "chrome/browser/chromeos/gdata/drive_cache.h"
-#include "chrome/browser/chromeos/gdata/gdata_file_system_interface.h"
+#include "chrome/browser/chromeos/gdata/drive_file_system_interface.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_source.h"
@@ -43,7 +43,7 @@
// TODO(satorux): This client should also upload pinned but dirty (locally
// edited) files to gdata. Will work on this once downloading is done.
// crosbug.com/27836.
-class GDataSyncClient : public GDataFileSystemInterface::Observer,
+class GDataSyncClient : public DriveFileSystemInterface::Observer,
public DriveCache::Observer,
public chromeos::NetworkLibrary::NetworkManagerObserver,
public content::NotificationObserver {
@@ -69,14 +69,14 @@
// |file_system| is used access the
// cache (ex. store a file to the cache when the file is downloaded).
GDataSyncClient(Profile* profile,
- GDataFileSystemInterface* file_system,
+ DriveFileSystemInterface* file_system,
DriveCache* cache);
virtual ~GDataSyncClient();
// Initializes the GDataSyncClient.
void Initialize();
- // GDataFileSystemInterface overrides.
+ // DriveFileSystemInterface::Observer overrides.
virtual void OnInitialLoadFinished() OVERRIDE;
virtual void OnFeedFromServerLoaded() OVERRIDE;
@@ -183,7 +183,7 @@
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
Profile* profile_;
- GDataFileSystemInterface* file_system_; // Owned by GDataSystemService.
+ DriveFileSystemInterface* file_system_; // Owned by GDataSystemService.
DriveCache* cache_; // Owned by GDataSystemService.
scoped_ptr<PrefChangeRegistrar> registrar_;
diff --git a/chrome/browser/chromeos/gdata/gdata_sync_client_unittest.cc b/chrome/browser/chromeos/gdata/gdata_sync_client_unittest.cc
index 7fafe99..b13101f3 100644
--- a/chrome/browser/chromeos/gdata/gdata_sync_client_unittest.cc
+++ b/chrome/browser/chromeos/gdata/gdata_sync_client_unittest.cc
@@ -21,7 +21,7 @@
#include "chrome/browser/chromeos/gdata/drive.pb.h"
#include "chrome/browser/chromeos/gdata/gdata_test_util.h"
#include "chrome/browser/chromeos/gdata/gdata_util.h"
-#include "chrome/browser/chromeos/gdata/mock_gdata_file_system.h"
+#include "chrome/browser/chromeos/gdata/mock_drive_file_system.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/pref_names.h"
@@ -61,7 +61,7 @@
: ui_thread_(content::BrowserThread::UI, &message_loop_),
io_thread_(content::BrowserThread::IO),
profile_(new TestingProfile),
- mock_file_system_(new StrictMock<MockGDataFileSystem>),
+ mock_file_system_(new StrictMock<MockDriveFileSystem>),
mock_network_library_(NULL) {
}
@@ -217,7 +217,7 @@
pinned_dir.AppendASCII("resource_id_dirty")));
}
- // Sets the expectation for MockGDataFileSystem::GetFileByResourceId(),
+ // Sets the expectation for MockDriveFileSystem::GetFileByResourceId(),
// that simulates successful retrieval of a file for the given resource ID.
void SetExpectationForGetFileByResourceId(const std::string& resource_id) {
EXPECT_CALL(*mock_file_system_,
@@ -229,7 +229,7 @@
REGULAR_FILE));
}
- // Sets the expectation for MockGDataFileSystem::UpdateFileByResourceId(),
+ // Sets the expectation for MockDriveFileSystem::UpdateFileByResourceId(),
// that simulates successful uploading of a file for the given resource ID.
void SetExpectationForUpdateFileByResourceId(
const std::string& resource_id) {
@@ -238,7 +238,7 @@
.WillOnce(MockUpdateFileByResourceId(DRIVE_FILE_OK));
}
- // Sets the expectation for MockGDataFileSystem::GetFileInfoByResourceId(),
+ // Sets the expectation for MockDriveFileSystem::GetFileInfoByResourceId(),
// that simulates successful retrieval of file info for the given resource
// ID.
//
@@ -283,7 +283,7 @@
content::TestBrowserThread io_thread_;
ScopedTempDir temp_dir_;
scoped_ptr<TestingProfile> profile_;
- scoped_ptr<StrictMock<MockGDataFileSystem> > mock_file_system_;
+ scoped_ptr<StrictMock<MockDriveFileSystem> > mock_file_system_;
DriveCache* cache_;
scoped_ptr<GDataSyncClient> sync_client_;
chromeos::MockNetworkLibrary* mock_network_library_;
@@ -330,7 +330,7 @@
AddResourceIdToFetch("resource_id_not_fetched_baz");
AddResourceIdToUpload("resource_id_dirty");
- // These files will be fetched or uploaded by GDataFileSystem, once
+ // These files will be fetched or uploaded by DriveFileSystem, once
// StartSyncLoop() starts.
SetExpectationForGetFileByResourceId("resource_id_not_fetched_foo");
SetExpectationForGetFileByResourceId("resource_id_not_fetched_bar");
@@ -349,7 +349,7 @@
AddResourceIdToFetch("resource_id_not_fetched_baz");
AddResourceIdToUpload("resource_id_dirty");
- // These files will be neither fetched nor uploaded not by GDataFileSystem,
+ // These files will be neither fetched nor uploaded not by DriveFileSystem,
// as network is not connected.
sync_client_->StartSyncLoop();
@@ -392,7 +392,7 @@
AddResourceIdToFetch("resource_id_not_fetched_baz");
AddResourceIdToUpload("resource_id_dirty");
- // These files will be neither fetched nor uploaded not by GDataFileSystem,
+ // These files will be neither fetched nor uploaded not by DriveFileSystem,
// as fetching over cellular network is disabled by default.
// Then connect to cellular. This will kick off StartSyncLoop().
@@ -411,7 +411,7 @@
AddResourceIdToFetch("resource_id_not_fetched_baz");
AddResourceIdToUpload("resource_id_dirty");
- // These files will be fetched or uploaded by GDataFileSystem, as syncing
+ // These files will be fetched or uploaded by DriveFileSystem, as syncing
// over cellular network is explicitly enabled.
SetExpectationForGetFileByResourceId("resource_id_not_fetched_foo");
SetExpectationForGetFileByResourceId("resource_id_not_fetched_bar");
@@ -431,7 +431,7 @@
AddResourceIdToFetch("resource_id_not_fetched_baz");
AddResourceIdToUpload("resource_id_dirty");
- // These files will be neither fetched nor uploaded not by GDataFileSystem,
+ // These files will be neither fetched nor uploaded not by DriveFileSystem,
// as syncing over wimax network is disabled by default.
// Then connect to wimax. This will kick off StartSyncLoop().
@@ -450,7 +450,7 @@
AddResourceIdToFetch("resource_id_not_fetched_baz");
AddResourceIdToUpload("resource_id_dirty");
- // These files will be fetched or uploaded by GDataFileSystem, as syncing
+ // These files will be fetched or uploaded by DriveFileSystem, as syncing
// over cellular network, which includes wimax, is explicitly enabled.
SetExpectationForGetFileByResourceId("resource_id_not_fetched_foo");
SetExpectationForGetFileByResourceId("resource_id_not_fetched_bar");
@@ -473,7 +473,7 @@
AddResourceIdToFetch("resource_id_not_fetched_baz");
AddResourceIdToUpload("resource_id_dirty");
- // These files will be neither fetched nor uploaded not by GDataFileSystem,
+ // These files will be neither fetched nor uploaded not by DriveFileSystem,
// as the GData feature is disabled.
sync_client_->StartSyncLoop();
@@ -541,13 +541,13 @@
// test cache directory.
cache_->RequestInitializeOnUIThread();
- // Set the expectation so that the MockGDataFileSystem returns "new_md5"
+ // Set the expectation so that the MockDriveFileSystem returns "new_md5"
// for "resource_id_fetched". This simulates that the file is updated on
// the server side, and the new MD5 is obtained from the server (i.e. the
// local cach file is stale).
SetExpectationForGetFileInfoByResourceId("resource_id_fetched",
"new_md5");
- // Set the expectation so that the MockGDataFileSystem returns "some_md5"
+ // Set the expectation so that the MockDriveFileSystem returns "some_md5"
// for "resource_id_dirty". The MD5 on the server is always different from
// the MD5 of a dirty file, which is set to "local". We should not collect
// this by StartCheckingExistingPinnedFiles().
diff --git a/chrome/browser/chromeos/gdata/gdata_system_service.cc b/chrome/browser/chromeos/gdata/gdata_system_service.cc
index f08c698..ffd76aa 100644
--- a/chrome/browser/chromeos/gdata/gdata_system_service.cc
+++ b/chrome/browser/chromeos/gdata/gdata_system_service.cc
@@ -8,12 +8,12 @@
#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_file_system.h"
+#include "chrome/browser/chromeos/gdata/drive_file_system_proxy.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_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"
@@ -65,7 +65,7 @@
blocking_task_runner_);
uploader_.reset(new GDataUploader(drive_service_.get()));
webapps_registry_.reset(new DriveWebAppsRegistry);
- file_system_.reset(new GDataFileSystem(profile_,
+ file_system_.reset(new DriveFileSystem(profile_,
cache(),
drive_service_.get(),
uploader(),
@@ -142,7 +142,7 @@
if (provider && !provider->HasMountPoint(mount_point)) {
provider->AddRemoteMountPoint(
mount_point,
- new GDataFileSystemProxy(file_system_.get()));
+ new DriveFileSystemProxy(file_system_.get()));
}
file_system_->Initialize();
diff --git a/chrome/browser/chromeos/gdata/gdata_system_service.h b/chrome/browser/chromeos/gdata/gdata_system_service.h
index a2d21b2..e190fc7 100644
--- a/chrome/browser/chromeos/gdata/gdata_system_service.h
+++ b/chrome/browser/chromeos/gdata/gdata_system_service.h
@@ -20,16 +20,16 @@
namespace gdata {
class DriveCache;
+class DriveFileSystemInterface;
class DriveServiceInterface;
class DriveWebAppsRegistry;
class FileWriteHelper;
class GDataContactsService;
class GDataDownloadObserver;
-class GDataFileSystemInterface;
class GDataSyncClient;
class GDataUploader;
-// GDataSystemService runs the GData system, including the GData file system
+// GDataSystemService runs the GData 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
@@ -39,7 +39,7 @@
public:
DriveServiceInterface* drive_service() { return drive_service_.get(); }
DriveCache* cache() { return cache_; }
- GDataFileSystemInterface* file_system() { return file_system_.get(); }
+ DriveFileSystemInterface* file_system() { return file_system_.get(); }
FileWriteHelper* file_write_helper() { return file_write_helper_.get(); }
GDataUploader* uploader() { return uploader_.get(); }
GDataContactsService* contacts_service() { return contacts_service_.get(); }
@@ -80,7 +80,7 @@
scoped_ptr<DriveServiceInterface> drive_service_;
scoped_ptr<GDataUploader> uploader_;
scoped_ptr<DriveWebAppsRegistry> webapps_registry_;
- scoped_ptr<GDataFileSystemInterface> file_system_;
+ scoped_ptr<DriveFileSystemInterface> file_system_;
scoped_ptr<FileWriteHelper> file_write_helper_;
scoped_ptr<GDataDownloadObserver> download_observer_;
scoped_ptr<GDataSyncClient> sync_client_;
diff --git a/chrome/browser/chromeos/gdata/gdata_util.cc b/chrome/browser/chromeos/gdata/gdata_util.cc
index 74c8954..f99c72fa 100644
--- a/chrome/browser/chromeos/gdata/gdata_util.cc
+++ b/chrome/browser/chromeos/gdata/gdata_util.cc
@@ -23,8 +23,8 @@
#include "base/time.h"
#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/file_write_helper.h"
-#include "chrome/browser/chromeos/gdata/gdata_file_system_interface.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"
@@ -61,7 +61,7 @@
base::PLATFORM_FILE_EXCLUSIVE_READ |
base::PLATFORM_FILE_ASYNC;
-GDataFileSystemInterface* GetGDataFileSystem(Profile* profile) {
+DriveFileSystemInterface* GetDriveFileSystem(Profile* profile) {
GDataSystemService* system_service =
GDataSystemServiceFactory::GetForProfile(profile);
return system_service ? system_service->file_system() : NULL;
@@ -238,7 +238,7 @@
GURL* url) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- GDataFileSystemInterface* file_system = GetGDataFileSystem(profile);
+ DriveFileSystemInterface* file_system = GetDriveFileSystem(profile);
if (!file_system)
return;
DriveCache* cache = GetDriveCache(profile);
@@ -302,7 +302,7 @@
DCHECK(cache_paths);
DCHECK(!callback.is_null());
- GDataFileSystemInterface* file_system = GetGDataFileSystem(profile);
+ DriveFileSystemInterface* file_system = GetDriveFileSystem(profile);
if (!file_system || gdata_paths->empty()) {
callback.Run();
return;
diff --git a/chrome/browser/chromeos/gdata/gdata_wapi_service.h b/chrome/browser/chromeos/gdata/gdata_wapi_service.h
index 585353c..6b2b9b3c 100644
--- a/chrome/browser/chromeos/gdata/gdata_wapi_service.h
+++ b/chrome/browser/chromeos/gdata/gdata_wapi_service.h
@@ -28,7 +28,7 @@
class GDataWapiService : public DriveServiceInterface {
public:
// Instance is usually created by GDataSystemServiceFactory and owned by
- // GDataFileSystem.
+ // DriveFileSystem.
GDataWapiService();
virtual ~GDataWapiService();
diff --git a/chrome/browser/chromeos/gdata/mock_directory_change_observer.h b/chrome/browser/chromeos/gdata/mock_directory_change_observer.h
index 95cf2209..56dc1bf 100644
--- a/chrome/browser/chromeos/gdata/mock_directory_change_observer.h
+++ b/chrome/browser/chromeos/gdata/mock_directory_change_observer.h
@@ -5,18 +5,18 @@
#ifndef CHROME_BROWSER_CHROMEOS_GDATA_MOCK_DIRECTORY_CHANGE_OBSERVER_H_
#define CHROME_BROWSER_CHROMEOS_GDATA_MOCK_DIRECTORY_CHANGE_OBSERVER_H_
-#include "chrome/browser/chromeos/gdata/gdata_file_system_interface.h"
+#include "chrome/browser/chromeos/gdata/drive_file_system_interface.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace gdata {
-// Mock for GDataFileSystemInterface::Observer::OnDirectoryChanged().
-class MockDirectoryChangeObserver : public GDataFileSystemInterface::Observer {
+// Mock for DriveFileSystemInterface::Observer::OnDirectoryChanged().
+class MockDirectoryChangeObserver : public DriveFileSystemInterface::Observer {
public:
MockDirectoryChangeObserver();
virtual ~MockDirectoryChangeObserver();
- // GDataFileSystemInterface::Observer overrides.
+ // DriveFileSystemInterface::Observer overrides.
MOCK_METHOD1(OnDirectoryChanged, void(const FilePath& directory_path));
};
diff --git a/chrome/browser/chromeos/gdata/mock_drive_file_system.cc b/chrome/browser/chromeos/gdata/mock_drive_file_system.cc
new file mode 100644
index 0000000..cd7da1d
--- /dev/null
+++ b/chrome/browser/chromeos/gdata/mock_drive_file_system.cc
@@ -0,0 +1,15 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// 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/mock_drive_file_system.h"
+
+namespace gdata {
+
+MockDriveFileSystem::MockDriveFileSystem() {
+}
+
+MockDriveFileSystem::~MockDriveFileSystem() {
+}
+
+} // namespace gdata
diff --git a/chrome/browser/chromeos/gdata/mock_gdata_file_system.h b/chrome/browser/chromeos/gdata/mock_drive_file_system.h
similarity index 90%
rename from chrome/browser/chromeos/gdata/mock_gdata_file_system.h
rename to chrome/browser/chromeos/gdata/mock_drive_file_system.h
index e14b665..3ba3ded 100644
--- a/chrome/browser/chromeos/gdata/mock_gdata_file_system.h
+++ b/chrome/browser/chromeos/gdata/mock_drive_file_system.h
@@ -2,23 +2,23 @@
// 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_MOCK_GDATA_FILE_SYSTEM_H_
-#define CHROME_BROWSER_CHROMEOS_GDATA_MOCK_GDATA_FILE_SYSTEM_H_
+#ifndef CHROME_BROWSER_CHROMEOS_GDATA_MOCK_DRIVE_FILE_SYSTEM_H_
+#define CHROME_BROWSER_CHROMEOS_GDATA_MOCK_DRIVE_FILE_SYSTEM_H_
#include <string>
-#include "chrome/browser/chromeos/gdata/gdata_file_system_interface.h"
+#include "chrome/browser/chromeos/gdata/drive_file_system_interface.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace gdata {
-// Mock for GDataFileSystemInterface.
-class MockGDataFileSystem : public GDataFileSystemInterface {
+// Mock for DriveFileSystemInterface.
+class MockDriveFileSystem : public DriveFileSystemInterface {
public:
- MockGDataFileSystem();
- virtual ~MockGDataFileSystem();
+ MockDriveFileSystem();
+ virtual ~MockDriveFileSystem();
- // GDataFileSystemInterface overrides.
+ // DriveFileSystemInterface overrides.
MOCK_METHOD0(Initialize, void());
MOCK_METHOD1(AddObserver, void(Observer* observer));
MOCK_METHOD1(RemoveObserver, void(Observer* observer));
@@ -100,4 +100,4 @@
} // namespace gdata
-#endif // CHROME_BROWSER_CHROMEOS_GDATA_MOCK_GDATA_FILE_SYSTEM_H_
+#endif // CHROME_BROWSER_CHROMEOS_GDATA_MOCK_DRIVE_FILE_SYSTEM_H_
diff --git a/chrome/browser/chromeos/gdata/mock_drive_service.h b/chrome/browser/chromeos/gdata/mock_drive_service.h
index 6a56a1c0..d0cb559f 100644
--- a/chrome/browser/chromeos/gdata/mock_drive_service.h
+++ b/chrome/browser/chromeos/gdata/mock_drive_service.h
@@ -20,7 +20,7 @@
class MockDriveService : public DriveServiceInterface {
public:
- // DriveService is usually owned and created by GDataFileSystem.
+ // DriveService is usually owned and created by DriveFileSystem.
MockDriveService();
virtual ~MockDriveService();
diff --git a/chrome/browser/chromeos/gdata/mock_gdata_file_system.cc b/chrome/browser/chromeos/gdata/mock_gdata_file_system.cc
deleted file mode 100644
index d3e938d..0000000
--- a/chrome/browser/chromeos/gdata/mock_gdata_file_system.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// 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/mock_gdata_file_system.h"
-
-namespace gdata {
-
-MockGDataFileSystem::MockGDataFileSystem() {
-}
-
-MockGDataFileSystem::~MockGDataFileSystem() {
-}
-
-} // namespace gdata
diff --git a/chrome/browser/download/save_package_file_picker_chromeos.h b/chrome/browser/download/save_package_file_picker_chromeos.h
index 840ac6d..6637b481 100644
--- a/chrome/browser/download/save_package_file_picker_chromeos.h
+++ b/chrome/browser/download/save_package_file_picker_chromeos.h
@@ -10,10 +10,6 @@
#include "content/public/browser/web_contents_observer.h"
#include "ui/base/dialogs/select_file_dialog.h"
-namespace gdata {
-class GDataFileSystem;
-}
-
namespace ui {
struct SelectedFileInfo;
}
diff --git a/chrome/browser/resources/file_manager/js/file_copy_manager.js b/chrome/browser/resources/file_manager/js/file_copy_manager.js
index 4f52834f..5cf617d 100644
--- a/chrome/browser/resources/file_manager/js/file_copy_manager.js
+++ b/chrome/browser/resources/file_manager/js/file_copy_manager.js
@@ -780,9 +780,9 @@
}
if (task.sourceOnGData && task.targetOnGData) {
- // TODO(benchan): GDataFileSystem has not implemented directory copy,
+ // TODO(benchan): DriveFileSystem has not implemented directory copy,
// and thus we only call FileEntry.copyTo() for files. Revisit this
- // code when GDataFileSystem supports directory copy.
+ // code when DriveFileSystem supports directory copy.
if (!sourceEntry.isDirectory) {
resolveDirAndBaseName(
targetDirEntry, targetRelativePath,
@@ -796,7 +796,7 @@
}
}
- // TODO(benchan): Until GDataFileSystem supports FileWriter, we use the
+ // TODO(benchan): Until DriveFileSystem supports FileWriter, we use the
// transferFile API to copy files into or out from a gdata file system.
if (sourceEntry.isFile && (task.sourceOnGData || task.targetOnGData)) {
var sourceFileUrl = sourceEntry.toURL();
@@ -942,4 +942,3 @@
sourceEntry.file(onSourceFileFound, errorCallback);
};
-
diff --git a/chrome/browser/resources/file_manager/js/file_manager.js b/chrome/browser/resources/file_manager/js/file_manager.js
index be52bff..37da354d 100644
--- a/chrome/browser/resources/file_manager/js/file_manager.js
+++ b/chrome/browser/resources/file_manager/js/file_manager.js
@@ -1156,9 +1156,9 @@
}
// TODO(benchan): Currently, there is no FileWatcher emulation for
- // GDataFileSystem, so we need to manually trigger the directory rescan
+ // DriveFileSystem, so we need to manually trigger the directory rescan
// after paste operations complete. Remove this once we emulate file
- // watching functionalities in GDataFileSystem.
+ // watching functionalities in DriveFileSystem.
if (this.isOnGData()) {
if (event.reason == 'SUCCESS' || event.reason == 'ERROR' ||
event.reason == 'CANCELLED') {
@@ -4204,4 +4204,3 @@
defaultActionSeparator.hidden = !taskItem;
}
})();
-
diff --git a/chrome/browser/ui/webui/chromeos/drive_internals_ui.cc b/chrome/browser/ui/webui/chromeos/drive_internals_ui.cc
index d02b64e..762afb1 100644
--- a/chrome/browser/ui/webui/chromeos/drive_internals_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/drive_internals_ui.cc
@@ -14,8 +14,8 @@
#include "chrome/browser/chromeos/gdata/auth_service.h"
#include "chrome/browser/chromeos/gdata/drive.pb.h"
#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_file_system_interface.h"
#include "chrome/browser/chromeos/gdata/gdata_system_service.h"
#include "chrome/browser/chromeos/gdata/gdata_util.h"
#include "chrome/browser/profiles/profile.h"
diff --git a/chrome/browser/ui/webui/feedback_ui.cc b/chrome/browser/ui/webui/feedback_ui.cc
index c76fcd5..8489197 100644
--- a/chrome/browser/ui/webui/feedback_ui.cc
+++ b/chrome/browser/ui/webui/feedback_ui.cc
@@ -60,7 +60,7 @@
#include "base/path_service.h"
#include "chrome/browser/chromeos/cros/cros_library.h"
#include "chrome/browser/chromeos/gdata/drive.pb.h"
-#include "chrome/browser/chromeos/gdata/gdata_file_system_interface.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/gdata_util.h"
#include "chrome/browser/chromeos/login/user_manager.h"
@@ -584,7 +584,7 @@
void FeedbackHandler::GetMostRecentScreenshotsGData(
const FilePath& filepath, std::vector<std::string>* saved_screenshots,
size_t max_saved, base::Closure callback) {
- gdata::GDataFileSystemInterface* file_system =
+ gdata::DriveFileSystemInterface* file_system =
gdata::GDataSystemServiceFactory::GetForProfile(
Profile::FromWebUI(web_ui()))->file_system();
file_system->ReadDirectoryByPath(
diff --git a/chrome/browser/ui/webui/screenshot_source.cc b/chrome/browser/ui/webui/screenshot_source.cc
index a4dd834..4597a1a 100644
--- a/chrome/browser/ui/webui/screenshot_source.cc
+++ b/chrome/browser/ui/webui/screenshot_source.cc
@@ -21,7 +21,7 @@
#if defined(OS_CHROMEOS)
#include "ash/shell.h"
#include "ash/shell_delegate.h"
-#include "chrome/browser/chromeos/gdata/gdata_file_system_interface.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/gdata_util.h"
#include "content/public/browser/browser_thread.h"
@@ -95,7 +95,7 @@
ash::Shell::GetInstance()->delegate()->GetCurrentBrowserContext());
FilePath download_path = download_prefs->DownloadPath();
if (gdata::util::IsUnderGDataMountPoint(download_path)) {
- gdata::GDataFileSystemInterface* file_system =
+ gdata::DriveFileSystemInterface* file_system =
gdata::GDataSystemServiceFactory::GetForProfile(
profile_)->file_system();
file_system->GetFileByResourceId(
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index 4f8650f..ed72ac1 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -578,6 +578,11 @@
'browser/chromeos/gdata/drive_cache.h',
'browser/chromeos/gdata/drive_cache_metadata.cc',
'browser/chromeos/gdata/drive_cache_metadata.h',
+ 'browser/chromeos/gdata/drive_file_system.cc',
+ 'browser/chromeos/gdata/drive_file_system.h',
+ 'browser/chromeos/gdata/drive_file_system_interface.h',
+ 'browser/chromeos/gdata/drive_file_system_proxy.cc',
+ 'browser/chromeos/gdata/drive_file_system_proxy.h',
'browser/chromeos/gdata/drive_files.cc',
'browser/chromeos/gdata/drive_files.h',
'browser/chromeos/gdata/drive_resource_metadata.cc',
@@ -594,11 +599,6 @@
'browser/chromeos/gdata/gdata_download_observer.cc',
'browser/chromeos/gdata/gdata_download_observer.h',
'browser/chromeos/gdata/gdata_errorcode.h',
- 'browser/chromeos/gdata/gdata_file_system.cc',
- 'browser/chromeos/gdata/gdata_file_system.h',
- 'browser/chromeos/gdata/gdata_file_system_interface.h',
- 'browser/chromeos/gdata/gdata_file_system_proxy.cc',
- 'browser/chromeos/gdata/gdata_file_system_proxy.h',
'browser/chromeos/gdata/gdata_operations.cc',
'browser/chromeos/gdata/gdata_operations.h',
'browser/chromeos/gdata/gdata_protocol_handler.cc',
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi
index f4b7f68..1958156 100644
--- a/chrome/chrome_tests.gypi
+++ b/chrome/chrome_tests.gypi
@@ -1117,12 +1117,12 @@
'browser/chromeos/gdata/drive_api_parser_unittest.cc',
'browser/chromeos/gdata/drive_cache_metadata_unittest.cc',
'browser/chromeos/gdata/drive_cache_unittest.cc',
+ 'browser/chromeos/gdata/drive_file_system_unittest.cc',
'browser/chromeos/gdata/drive_resource_metadata_unittest.cc',
'browser/chromeos/gdata/drive_webapps_registry_unittest.cc',
'browser/chromeos/gdata/file_write_helper_unittest.cc',
'browser/chromeos/gdata/gdata_contacts_service_stub.cc',
'browser/chromeos/gdata/gdata_contacts_service_stub.h',
- 'browser/chromeos/gdata/gdata_file_system_unittest.cc',
'browser/chromeos/gdata/gdata_operations_unittest.cc',
'browser/chromeos/gdata/gdata_sync_client_unittest.cc',
'browser/chromeos/gdata/gdata_test_util.cc',
@@ -1133,10 +1133,10 @@
'browser/chromeos/gdata/mock_directory_change_observer.h',
'browser/chromeos/gdata/mock_drive_cache_observer.cc',
'browser/chromeos/gdata/mock_drive_cache_observer.h',
+ 'browser/chromeos/gdata/mock_drive_file_system.cc',
+ 'browser/chromeos/gdata/mock_drive_file_system.h',
'browser/chromeos/gdata/mock_drive_service.cc',
'browser/chromeos/gdata/mock_drive_service.h',
- 'browser/chromeos/gdata/mock_gdata_file_system.cc',
- 'browser/chromeos/gdata/mock_gdata_file_system.h',
'browser/chromeos/gdata/operation_registry_unittest.cc',
'browser/chromeos/gview_request_interceptor_unittest.cc',
'browser/chromeos/imageburner/burn_manager_unittest.cc',