Index: chrome/browser/chromeos/extensions/file_browser_private_api.cc |
diff --git a/chrome/browser/chromeos/extensions/file_browser_private_api.cc b/chrome/browser/chromeos/extensions/file_browser_private_api.cc |
index c6d8898b3eeeb7ecfad5acc04bc3bd6e085f499a..7a51916f5217adc602a1d76d4771a730bafae56a 100644 |
--- a/chrome/browser/chromeos/extensions/file_browser_private_api.cc |
+++ b/chrome/browser/chromeos/extensions/file_browser_private_api.cc |
@@ -188,7 +188,7 @@ void AddDriveMountPoint( |
if (!provider) |
return; |
- const FilePath mount_point = gdata::util::GetDriveMountPointPath(); |
+ const FilePath mount_point = drive::util::GetDriveMountPointPath(); |
if (!render_view_host || !render_view_host->GetProcess()) |
return; |
@@ -199,12 +199,12 @@ void AddDriveMountPoint( |
file_handler_util::GetReadWritePermissions()); |
// Grant R/W permission for tmp and pinned cache folder. |
- gdata::DriveSystemService* system_service = |
- gdata::DriveSystemServiceFactory::GetForProfile(profile); |
+ drive::DriveSystemService* system_service = |
+ drive::DriveSystemServiceFactory::GetForProfile(profile); |
// |system_service| is NULL if incognito window / guest login. |
if (!system_service || !system_service->file_system()) |
return; |
- gdata::DriveCache* cache = system_service->cache(); |
+ drive::DriveCache* cache = system_service->cache(); |
// We check permissions for raw cache file paths only for read-only |
// operations (when fileEntry.file() is called), so read only permissions |
@@ -212,12 +212,12 @@ void AddDriveMountPoint( |
// operations the file access check is done for drive/ paths. |
GrantFilePermissionsToHost(render_view_host, |
cache->GetCacheDirectoryPath( |
- gdata::DriveCache::CACHE_TYPE_TMP), |
+ drive::DriveCache::CACHE_TYPE_TMP), |
file_handler_util::GetReadOnlyPermissions()); |
GrantFilePermissionsToHost( |
render_view_host, |
cache->GetCacheDirectoryPath( |
- gdata::DriveCache::CACHE_TYPE_PERSISTENT), |
+ drive::DriveCache::CACHE_TYPE_PERSISTENT), |
file_handler_util::GetReadOnlyPermissions()); |
FilePath mount_point_virtual; |
@@ -521,13 +521,13 @@ void RequestLocalFileSystemFunction::RespondSuccessOnUIThread( |
// Add drive mount point immediately when we kick of first instance of file |
// manager. The actual mount event will be sent to UI only when we perform |
// proper authentication. |
- if (gdata::DriveSystemService::IsDriveEnabled(profile_)) |
+ if (drive::DriveSystemService::IsDriveEnabled(profile_)) |
AddDriveMountPoint(profile_, extension_id(), render_view_host()); |
DictionaryValue* dict = new DictionaryValue(); |
SetResult(dict); |
dict->SetString("name", name); |
dict->SetString("path", root_path.spec()); |
- dict->SetInteger("error", gdata::DRIVE_FILE_OK); |
+ dict->SetInteger("error", drive::DRIVE_FILE_OK); |
SendResponse(true); |
} |
@@ -630,7 +630,7 @@ bool RemoveFileWatchBrowserFunction::PerformFileWatchOperation( |
// static |
void GetFileTasksFileBrowserFunction::IntersectAvailableDriveTasks( |
- gdata::DriveWebAppsRegistry* registry, |
+ drive::DriveWebAppsRegistry* registry, |
const FileInfoList& file_info_list, |
WebAppInfoMap* app_info, |
std::set<std::string>* available_tasks) { |
@@ -638,13 +638,13 @@ void GetFileTasksFileBrowserFunction::IntersectAvailableDriveTasks( |
file_iter != file_info_list.end(); ++file_iter) { |
if (file_iter->file_path.empty()) |
continue; |
- ScopedVector<gdata::DriveWebAppInfo> info; |
+ ScopedVector<drive::DriveWebAppInfo> info; |
registry->GetWebAppsForFile(file_iter->file_path, |
file_iter->mime_type, &info); |
- std::vector<gdata::DriveWebAppInfo*> info_ptrs; |
+ std::vector<drive::DriveWebAppInfo*> info_ptrs; |
info.release(&info_ptrs); // so they don't go away prematurely. |
std::set<std::string> tasks_for_this_file; |
- for (std::vector<gdata::DriveWebAppInfo*>::iterator |
+ for (std::vector<drive::DriveWebAppInfo*>::iterator |
apps = info_ptrs.begin(); apps != info_ptrs.end(); ++apps) { |
std::pair<WebAppInfoMap::iterator, bool> insert_result = |
app_info->insert(std::make_pair((*apps)->app_id, *apps)); |
@@ -702,7 +702,7 @@ void GetFileTasksFileBrowserFunction::FindDefaultDriveTasks( |
// static |
void GetFileTasksFileBrowserFunction::CreateDriveTasks( |
- gdata::DriveWebAppsRegistry* registry, |
+ drive::DriveWebAppsRegistry* registry, |
const WebAppInfoMap& app_info, |
const std::set<std::string>& available_tasks, |
const std::set<std::string>& default_tasks, |
@@ -722,7 +722,7 @@ void GetFileTasksFileBrowserFunction::CreateDriveTasks( |
WebAppInfoMap::const_iterator info_iter = app_info.find(app_id); |
DCHECK(info_iter != app_info.end()); |
- gdata::DriveWebAppInfo* info = info_iter->second; |
+ drive::DriveWebAppInfo* info = info_iter->second; |
DictionaryValue* task = new DictionaryValue; |
task->SetString("taskId", *app_iter); |
@@ -759,19 +759,19 @@ bool GetFileTasksFileBrowserFunction::FindDriveAppTasks( |
if (file_info_list.empty()) |
return true; |
- gdata::DriveSystemService* system_service = |
- gdata::DriveSystemServiceFactory::GetForProfile(profile_); |
+ drive::DriveSystemService* system_service = |
+ drive::DriveSystemServiceFactory::GetForProfile(profile_); |
// |system_service| is NULL if incognito window / guest login. We return true |
// in this case because there might be other extension tasks, even if we don't |
// have any to add. |
if (!system_service || !system_service->webapps_registry()) |
return true; |
- gdata::DriveWebAppsRegistry* registry = system_service->webapps_registry(); |
+ drive::DriveWebAppsRegistry* registry = system_service->webapps_registry(); |
// Map of app_id to DriveWebAppInfo so we can look up the apps we've found |
// after taking the intersection of available apps. |
- std::map<std::string, gdata::DriveWebAppInfo*> app_info; |
+ std::map<std::string, drive::DriveWebAppInfo*> app_info; |
// Set of application IDs. This will end up with the intersection of the |
// application IDs that apply to the paths in |file_paths|. |
std::set<std::string> available_tasks; |
@@ -1348,7 +1348,7 @@ bool AddMountFunction::RunImpl() { |
const bool success = true; |
// Pass back the drive mount point path as source path. |
const std::string& drive_path = |
- gdata::util::GetDriveMountPointPathAsString(); |
+ drive::util::GetDriveMountPointPathAsString(); |
SetResult(Value::CreateStringValue(drive_path)); |
FileBrowserEventRouterFactory::GetForProfile(profile_)-> |
MountDrive(base::Bind(&AddMountFunction::SendResponse, |
@@ -1385,9 +1385,9 @@ void AddMountFunction::GetLocalPathsResponseOnUIThread( |
const FilePath& source_path = files[0].local_path; |
const FilePath::StringType& display_name = files[0].display_name; |
// Check if the source path is under Drive cache directory. |
- gdata::DriveSystemService* system_service = |
- gdata::DriveSystemServiceFactory::GetForProfile(profile_); |
- gdata::DriveCache* cache = system_service ? system_service->cache() : NULL; |
+ drive::DriveSystemService* system_service = |
+ drive::DriveSystemServiceFactory::GetForProfile(profile_); |
+ drive::DriveCache* cache = system_service ? system_service->cache() : NULL; |
if (cache && cache->IsUnderDriveCacheDirectory(source_path)) { |
cache->SetMountedStateOnUIThread( |
source_path, |
@@ -1396,13 +1396,13 @@ void AddMountFunction::GetLocalPathsResponseOnUIThread( |
display_name)); |
} else { |
OnMountedStateSet(mount_type_str, display_name, |
- gdata::DRIVE_FILE_OK, source_path); |
+ drive::DRIVE_FILE_OK, source_path); |
} |
} |
void AddMountFunction::OnMountedStateSet(const std::string& mount_type, |
const FilePath::StringType& file_name, |
- gdata::DriveFileError error, |
+ drive::DriveFileError error, |
const FilePath& file_path) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
DiskMountManager* disk_mount_manager = DiskMountManager::GetInstance(); |
@@ -1515,11 +1515,11 @@ void GetSizeStatsFunction::GetLocalPathsResponseOnUIThread( |
return; |
} |
- if (files[0].file_path == gdata::util::GetDriveMountPointPath()) { |
- gdata::DriveSystemService* system_service = |
- gdata::DriveSystemServiceFactory::GetForProfile(profile_); |
+ if (files[0].file_path == drive::util::GetDriveMountPointPath()) { |
+ drive::DriveSystemService* system_service = |
+ drive::DriveSystemServiceFactory::GetForProfile(profile_); |
- gdata::DriveFileSystemInterface* file_system = |
+ drive::DriveFileSystemInterface* file_system = |
system_service->file_system(); |
file_system->GetAvailableSpace( |
@@ -1537,12 +1537,12 @@ void GetSizeStatsFunction::GetLocalPathsResponseOnUIThread( |
} |
void GetSizeStatsFunction::GetDriveAvailableSpaceCallback( |
- gdata::DriveFileError error, |
+ drive::DriveFileError error, |
int64 bytes_total, |
int64 bytes_used) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
- if (error == gdata::DRIVE_FILE_OK) { |
+ if (error == drive::DRIVE_FILE_OK) { |
int64 bytes_remaining = bytes_total - bytes_used; |
GetSizeStatsCallbackOnUIThread(static_cast<size_t>(bytes_total/1024), |
static_cast<size_t>(bytes_remaining/1024)); |
@@ -2025,7 +2025,7 @@ bool FileDialogStringsFunction::RunImpl() { |
ChromeURLDataManager::DataSource::SetFontAndTextDirection(dict); |
dict->SetBoolean("ENABLE_GDATA", |
- gdata::DriveSystemService::IsDriveEnabled(profile())); |
+ drive::DriveSystemService::IsDriveEnabled(profile())); |
#if defined(USE_ASH) |
dict->SetBoolean("ASH", true); |
@@ -2053,13 +2053,13 @@ GetDriveFilePropertiesFunction::~GetDriveFilePropertiesFunction() { |
void GetDriveFilePropertiesFunction::DoOperation( |
const FilePath& file_path, |
base::DictionaryValue* property_dict, |
- scoped_ptr<gdata::DriveEntryProto> entry_proto) { |
+ scoped_ptr<drive::DriveEntryProto> entry_proto) { |
DCHECK(property_dict); |
// Nothing to do here so simply call OnOperationComplete(). |
OnOperationComplete(file_path, |
property_dict, |
- gdata::DRIVE_FILE_OK, |
+ drive::DRIVE_FILE_OK, |
entry_proto.Pass()); |
} |
@@ -2100,8 +2100,8 @@ void GetDriveFilePropertiesFunction::GetNextFileProperties() { |
file_properties_->Append(property_dict); |
// Start getting the file info. |
- gdata::DriveSystemService* system_service = |
- gdata::DriveSystemServiceFactory::GetForProfile(profile_); |
+ drive::DriveSystemService* system_service = |
+ drive::DriveSystemServiceFactory::GetForProfile(profile_); |
system_service->file_system()->GetEntryInfoByPath( |
file_path, |
base::Bind(&GetDriveFilePropertiesFunction::OnGetFileInfo, |
@@ -2121,14 +2121,14 @@ void GetDriveFilePropertiesFunction::CompleteGetFileProperties() { |
void GetDriveFilePropertiesFunction::OnGetFileInfo( |
const FilePath& file_path, |
base::DictionaryValue* property_dict, |
- gdata::DriveFileError error, |
- scoped_ptr<gdata::DriveEntryProto> entry_proto) { |
+ drive::DriveFileError error, |
+ scoped_ptr<drive::DriveEntryProto> entry_proto) { |
DCHECK(property_dict); |
if (entry_proto.get() && !entry_proto->has_file_specific_info()) |
- error = gdata::DRIVE_FILE_ERROR_NOT_FOUND; |
+ error = drive::DRIVE_FILE_ERROR_NOT_FOUND; |
- if (error == gdata::DRIVE_FILE_OK) |
+ if (error == drive::DRIVE_FILE_OK) |
DoOperation(file_path, property_dict, entry_proto.Pass()); |
else |
OnOperationComplete(file_path, property_dict, error, entry_proto.Pass()); |
@@ -2137,19 +2137,19 @@ void GetDriveFilePropertiesFunction::OnGetFileInfo( |
void GetDriveFilePropertiesFunction::OnOperationComplete( |
const FilePath& file_path, |
base::DictionaryValue* property_dict, |
- gdata::DriveFileError error, |
- scoped_ptr<gdata::DriveEntryProto> entry_proto) { |
+ drive::DriveFileError error, |
+ scoped_ptr<drive::DriveEntryProto> entry_proto) { |
if (entry_proto.get() && !entry_proto->has_file_specific_info()) |
- error = gdata::DRIVE_FILE_ERROR_NOT_FOUND; |
+ error = drive::DRIVE_FILE_ERROR_NOT_FOUND; |
- if (error != gdata::DRIVE_FILE_OK) { |
+ if (error != drive::DRIVE_FILE_OK) { |
property_dict->SetInteger("errorCode", error); |
CompleteGetFileProperties(); |
return; |
} |
DCHECK(entry_proto.get()); |
- const gdata::DriveFileSpecificInfo& file_specific_info = |
+ const drive::DriveFileSpecificInfo& file_specific_info = |
entry_proto->file_specific_info(); |
property_dict->SetString("thumbnailUrl", file_specific_info.thumbnail_url()); |
if (!file_specific_info.alternate_url().empty()) |
@@ -2165,11 +2165,11 @@ void GetDriveFilePropertiesFunction::OnOperationComplete( |
property_dict->SetString("contentMimeType", |
file_specific_info.content_mime_type()); |
- gdata::DriveSystemService* system_service = |
- gdata::DriveSystemServiceFactory::GetForProfile(profile_); |
+ drive::DriveSystemService* system_service = |
+ drive::DriveSystemServiceFactory::GetForProfile(profile_); |
// Get drive WebApps that can accept this file. |
- ScopedVector<gdata::DriveWebAppInfo> web_apps; |
+ ScopedVector<drive::DriveWebAppInfo> web_apps; |
system_service->webapps_registry()->GetWebAppsForFile( |
file_path, file_specific_info.content_mime_type(), &web_apps); |
if (!web_apps.empty()) { |
@@ -2183,10 +2183,10 @@ void GetDriveFilePropertiesFunction::OnOperationComplete( |
ListValue* apps = new ListValue(); |
property_dict->Set("driveApps", apps); |
- for (ScopedVector<gdata::DriveWebAppInfo>::const_iterator it = |
+ for (ScopedVector<drive::DriveWebAppInfo>::const_iterator it = |
web_apps.begin(); |
it != web_apps.end(); ++it) { |
- const gdata::DriveWebAppInfo* webapp_info = *it; |
+ const drive::DriveWebAppInfo* webapp_info = *it; |
DictionaryValue* app = new DictionaryValue(); |
app->SetString("appId", webapp_info->app_id); |
app->SetString("appName", webapp_info->app_name); |
@@ -2225,7 +2225,7 @@ void GetDriveFilePropertiesFunction::OnOperationComplete( |
void GetDriveFilePropertiesFunction::CacheStateReceived( |
base::DictionaryValue* property_dict, |
bool /* success */, |
- const gdata::DriveCacheEntry& cache_entry) { |
+ const drive::DriveCacheEntry& cache_entry) { |
// In case of an error (i.e. success is false), cache_entry.is_*() all |
// returns false. |
property_dict->SetBoolean("isPinned", cache_entry.is_pinned()); |
@@ -2254,17 +2254,17 @@ bool PinDriveFileFunction::RunImpl() { |
void PinDriveFileFunction::DoOperation( |
const FilePath& file_path, |
base::DictionaryValue* properties, |
- scoped_ptr<gdata::DriveEntryProto> entry_proto) { |
+ scoped_ptr<drive::DriveEntryProto> entry_proto) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
- gdata::DriveSystemService* system_service = |
- gdata::DriveSystemServiceFactory::GetForProfile(profile_); |
+ drive::DriveSystemService* system_service = |
+ drive::DriveSystemServiceFactory::GetForProfile(profile_); |
// This is subtle but we should take references of resource_id and md5 |
// before |file_info| is passed to |callback| by base::Passed(). Otherwise, |
// file_info->whatever() crashes. |
const std::string& resource_id = entry_proto->resource_id(); |
const std::string& md5 = entry_proto->file_specific_info().file_md5(); |
- const gdata::CacheOperationCallback callback = |
+ const drive::CacheOperationCallback callback = |
base::Bind(&PinDriveFileFunction::OnPinStateSet, |
this, |
file_path, |
@@ -2280,8 +2280,8 @@ void PinDriveFileFunction::DoOperation( |
void PinDriveFileFunction::OnPinStateSet( |
const FilePath& path, |
base::DictionaryValue* properties, |
- scoped_ptr<gdata::DriveEntryProto> entry_proto, |
- gdata::DriveFileError error, |
+ scoped_ptr<drive::DriveEntryProto> entry_proto, |
+ drive::DriveFileError error, |
const std::string& /* resource_id */, |
const std::string& /* md5 */) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
@@ -2322,7 +2322,7 @@ void GetFileLocationsFunction::GetLocalPathsResponseOnUIThread( |
ListValue* locations = new ListValue; |
for (size_t i = 0; i < files.size(); ++i) { |
- if (gdata::util::IsUnderDriveMountPoint(files[i].file_path)) { |
+ if (drive::util::IsUnderDriveMountPoint(files[i].file_path)) { |
locations->Append(Value::CreateStringValue("drive")); |
} else { |
locations->Append(Value::CreateStringValue("local")); |
@@ -2366,8 +2366,8 @@ void GetDriveFilesFunction::GetLocalPathsResponseOnUIThread( |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
for (size_t i = 0; i < files.size(); ++i) { |
- DCHECK(gdata::util::IsUnderDriveMountPoint(files[i].file_path)); |
- FilePath drive_path = gdata::util::ExtractDrivePath(files[i].file_path); |
+ DCHECK(drive::util::IsUnderDriveMountPoint(files[i].file_path)); |
+ FilePath drive_path = drive::util::ExtractDrivePath(files[i].file_path); |
remaining_drive_paths_.push(drive_path); |
} |
@@ -2383,8 +2383,8 @@ void GetDriveFilesFunction::GetFileOrSendResponse() { |
return; |
} |
- gdata::DriveSystemService* system_service = |
- gdata::DriveSystemServiceFactory::GetForProfile(profile_); |
+ drive::DriveSystemService* system_service = |
+ drive::DriveSystemServiceFactory::GetForProfile(profile_); |
DCHECK(system_service); |
// Get the file on the top of the queue. |
@@ -2397,13 +2397,13 @@ void GetDriveFilesFunction::GetFileOrSendResponse() { |
void GetDriveFilesFunction::OnFileReady( |
- gdata::DriveFileError error, |
+ drive::DriveFileError error, |
const FilePath& local_path, |
const std::string& unused_mime_type, |
- gdata::DriveFileType file_type) { |
+ drive::DriveFileType file_type) { |
FilePath drive_path = remaining_drive_paths_.front(); |
- if (error == gdata::DRIVE_FILE_OK) { |
+ if (error == drive::DRIVE_FILE_OK) { |
local_paths_->Append(Value::CreateStringValue(local_path.value())); |
DVLOG(1) << "Got " << drive_path.value() << " as " << local_path.value(); |
@@ -2429,8 +2429,8 @@ GetFileTransfersFunction::GetFileTransfersFunction() {} |
GetFileTransfersFunction::~GetFileTransfersFunction() {} |
ListValue* GetFileTransfersFunction::GetFileTransfersList() { |
- gdata::DriveSystemService* system_service = |
- gdata::DriveSystemServiceFactory::GetForProfile(profile_); |
+ drive::DriveSystemService* system_service = |
+ drive::DriveSystemServiceFactory::GetForProfile(profile_); |
if (!system_service) |
return NULL; |
@@ -2483,8 +2483,8 @@ bool CancelFileTransfersFunction::RunImpl() { |
void CancelFileTransfersFunction::GetLocalPathsResponseOnUIThread( |
const SelectedFileInfoList& files) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
- gdata::DriveSystemService* system_service = |
- gdata::DriveSystemServiceFactory::GetForProfile(profile_); |
+ drive::DriveSystemService* system_service = |
+ drive::DriveSystemServiceFactory::GetForProfile(profile_); |
if (!system_service) { |
SendResponse(false); |
return; |
@@ -2492,15 +2492,15 @@ void CancelFileTransfersFunction::GetLocalPathsResponseOnUIThread( |
scoped_ptr<ListValue> responses(new ListValue()); |
for (size_t i = 0; i < files.size(); ++i) { |
- DCHECK(gdata::util::IsUnderDriveMountPoint(files[i].file_path)); |
- FilePath file_path = gdata::util::ExtractDrivePath(files[i].file_path); |
+ DCHECK(drive::util::IsUnderDriveMountPoint(files[i].file_path)); |
+ FilePath file_path = drive::util::ExtractDrivePath(files[i].file_path); |
scoped_ptr<DictionaryValue> result(new DictionaryValue()); |
result->SetBoolean( |
"canceled", |
system_service->drive_service()->CancelForFilePath(file_path)); |
GURL file_url; |
if (file_manager_util::ConvertFileToFileSystemUrl(profile_, |
- gdata::util::GetSpecialRemoteRootPath().Append(file_path), |
+ drive::util::GetSpecialRemoteRootPath().Append(file_path), |
source_url_.GetOrigin(), |
&file_url)) { |
result->SetString("fileUrl", file_url.spec()); |
@@ -2543,8 +2543,8 @@ void TransferFileFunction::GetLocalPathsResponseOnUIThread( |
return; |
} |
- gdata::DriveSystemService* system_service = |
- gdata::DriveSystemServiceFactory::GetForProfile(profile_); |
+ drive::DriveSystemService* system_service = |
+ drive::DriveSystemServiceFactory::GetForProfile(profile_); |
if (!system_service) { |
SendResponse(false); |
return; |
@@ -2554,20 +2554,20 @@ void TransferFileFunction::GetLocalPathsResponseOnUIThread( |
FilePath destination_file = files[1].file_path; |
bool source_file_under_drive = |
- gdata::util::IsUnderDriveMountPoint(source_file); |
+ drive::util::IsUnderDriveMountPoint(source_file); |
bool destination_file_under_drive = |
- gdata::util::IsUnderDriveMountPoint(destination_file); |
+ drive::util::IsUnderDriveMountPoint(destination_file); |
if (source_file_under_drive && !destination_file_under_drive) { |
// Transfer a file from gdata to local file system. |
- source_file = gdata::util::ExtractDrivePath(source_file); |
+ source_file = drive::util::ExtractDrivePath(source_file); |
system_service->file_system()->TransferFileFromRemoteToLocal( |
source_file, |
destination_file, |
base::Bind(&TransferFileFunction::OnTransferCompleted, this)); |
} else if (!source_file_under_drive && destination_file_under_drive) { |
// Transfer a file from local to Drive file system |
- destination_file = gdata::util::ExtractDrivePath(destination_file); |
+ destination_file = drive::util::ExtractDrivePath(destination_file); |
system_service->file_system()->TransferFileFromLocalToRemote( |
source_file, |
destination_file, |
@@ -2580,13 +2580,13 @@ void TransferFileFunction::GetLocalPathsResponseOnUIThread( |
} |
} |
-void TransferFileFunction::OnTransferCompleted(gdata::DriveFileError error) { |
- if (error == gdata::DRIVE_FILE_OK) { |
+void TransferFileFunction::OnTransferCompleted(drive::DriveFileError error) { |
+ if (error == drive::DRIVE_FILE_OK) { |
SendResponse(true); |
} else { |
error_ = base::StringPrintf("%d", static_cast<int>( |
fileapi::PlatformFileErrorToWebFileError( |
- gdata::DriveFileErrorToPlatformError(error)))); |
+ drive::DriveFileErrorToPlatformError(error)))); |
SendResponse(false); |
} |
} |
@@ -2597,7 +2597,7 @@ bool GetDrivePreferencesFunction::RunImpl() { |
const PrefService* service = profile_->GetPrefs(); |
- bool drive_enabled = gdata::DriveSystemService::IsDriveEnabled(profile_); |
+ bool drive_enabled = drive::DriveSystemService::IsDriveEnabled(profile_); |
if (drive_enabled) |
AddDriveMountPoint(profile_, extension_id(), render_view_host()); |
@@ -2666,8 +2666,8 @@ void SearchDriveFunction::OnFileSystemOpened( |
file_system_name_ = file_system_name; |
file_system_url_ = file_system_url; |
- gdata::DriveSystemService* system_service = |
- gdata::DriveSystemServiceFactory::GetForProfile(profile_); |
+ drive::DriveSystemService* system_service = |
+ drive::DriveSystemServiceFactory::GetForProfile(profile_); |
if (!system_service || !system_service->file_system()) { |
SendResponse(false); |
return; |
@@ -2679,10 +2679,10 @@ void SearchDriveFunction::OnFileSystemOpened( |
} |
void SearchDriveFunction::OnSearch( |
- gdata::DriveFileError error, |
+ drive::DriveFileError error, |
const GURL& next_feed, |
- scoped_ptr<std::vector<gdata::SearchResultInfo> > results) { |
- if (error != gdata::DRIVE_FILE_OK) { |
+ scoped_ptr<std::vector<drive::SearchResultInfo> > results) { |
+ if (error != drive::DRIVE_FILE_OK) { |
SendResponse(false); |
return; |
} |
@@ -2710,8 +2710,8 @@ void SearchDriveFunction::OnSearch( |
} |
bool ClearDriveCacheFunction::RunImpl() { |
- gdata::DriveSystemService* system_service = |
- gdata::DriveSystemServiceFactory::GetForProfile(profile_); |
+ drive::DriveSystemService* system_service = |
+ drive::DriveSystemServiceFactory::GetForProfile(profile_); |
// |system_service| is NULL if incognito window / guest login. |
if (!system_service || !system_service->file_system()) |
return false; |
@@ -2754,8 +2754,8 @@ bool RequestDirectoryRefreshFunction::RunImpl() { |
if (!args_->GetString(0, &file_url_as_string)) |
return false; |
- gdata::DriveSystemService* system_service = |
- gdata::DriveSystemServiceFactory::GetForProfile(profile_); |
+ drive::DriveSystemService* system_service = |
+ drive::DriveSystemServiceFactory::GetForProfile(profile_); |
if (!system_service || !system_service->file_system()) |
return false; |