Index: chrome/browser/chromeos/gdata/drive_resource_metadata.cc |
diff --git a/chrome/browser/chromeos/gdata/drive_resource_metadata.cc b/chrome/browser/chromeos/gdata/drive_resource_metadata.cc |
index c7f26ca15e6041ce6cc6bfe68cc4f1362752a293..1fc37be76525e14bae08635fbe3f6f63c360b306 100644 |
--- a/chrome/browser/chromeos/gdata/drive_resource_metadata.cc |
+++ b/chrome/browser/chromeos/gdata/drive_resource_metadata.cc |
@@ -30,7 +30,7 @@ const char kDBKeyResourceIdPrefix[] = "r:"; |
} // namespace |
-EntryInfoResult::EntryInfoResult() : error(GDATA_FILE_ERROR_FAILED) { |
+EntryInfoResult::EntryInfoResult() : error(DRIVE_FILE_ERROR_FAILED) { |
} |
EntryInfoResult::~EntryInfoResult() { |
@@ -230,7 +230,7 @@ void DriveResourceMetadata::AddEntryToDirectory( |
directory->AddEntry(new_entry); |
DVLOG(1) << "AddEntryToDirectory " << new_entry->GetFilePath().value(); |
base::MessageLoopProxy::current()->PostTask(FROM_HERE, |
- base::Bind(callback, GDATA_FILE_OK, new_entry->GetFilePath())); |
+ base::Bind(callback, DRIVE_FILE_OK, new_entry->GetFilePath())); |
} |
void DriveResourceMetadata::MoveEntryToDirectory( |
@@ -246,15 +246,15 @@ void DriveResourceMetadata::MoveEntryToDirectory( |
DriveEntry* destination = FindEntryByPathSync(directory_path); |
FilePath moved_file_path; |
- GDataFileError error = GDATA_FILE_ERROR_FAILED; |
+ DriveFileError error = DRIVE_FILE_ERROR_FAILED; |
if (!destination) { |
- error = GDATA_FILE_ERROR_NOT_FOUND; |
+ error = DRIVE_FILE_ERROR_NOT_FOUND; |
} else if (!destination->AsDriveDirectory()) { |
- error = GDATA_FILE_ERROR_NOT_A_DIRECTORY; |
+ error = DRIVE_FILE_ERROR_NOT_A_DIRECTORY; |
} else { |
destination->AsDriveDirectory()->AddEntry(entry); |
moved_file_path = entry->GetFilePath(); |
- error = GDATA_FILE_OK; |
+ error = DRIVE_FILE_OK; |
} |
DVLOG(1) << "MoveEntryToDirectory " << moved_file_path.value(); |
base::MessageLoopProxy::current()->PostTask( |
@@ -271,7 +271,7 @@ void DriveResourceMetadata::RemoveEntryFromParent( |
parent->RemoveEntry(entry); |
base::MessageLoopProxy::current()->PostTask(FROM_HERE, |
- base::Bind(callback, GDATA_FILE_OK, parent->GetFilePath())); |
+ base::Bind(callback, DRIVE_FILE_OK, parent->GetFilePath())); |
} |
void DriveResourceMetadata::AddEntryToResourceMap(DriveEntry* entry) { |
@@ -336,17 +336,17 @@ void DriveResourceMetadata::GetEntryInfoByResourceId( |
DCHECK(!callback.is_null()); |
scoped_ptr<DriveEntryProto> entry_proto; |
- GDataFileError error = GDATA_FILE_ERROR_FAILED; |
+ DriveFileError error = DRIVE_FILE_ERROR_FAILED; |
FilePath drive_file_path; |
DriveEntry* entry = GetEntryByResourceId(resource_id); |
if (entry) { |
entry_proto.reset(new DriveEntryProto); |
entry->ToProtoFull(entry_proto.get()); |
- error = GDATA_FILE_OK; |
+ error = DRIVE_FILE_OK; |
drive_file_path = entry->GetFilePath(); |
} else { |
- error = GDATA_FILE_ERROR_NOT_FOUND; |
+ error = DRIVE_FILE_ERROR_NOT_FOUND; |
} |
base::MessageLoopProxy::current()->PostTask( |
@@ -364,15 +364,15 @@ void DriveResourceMetadata::GetEntryInfoByPath( |
DCHECK(!callback.is_null()); |
scoped_ptr<DriveEntryProto> entry_proto; |
- GDataFileError error = GDATA_FILE_ERROR_FAILED; |
+ DriveFileError error = DRIVE_FILE_ERROR_FAILED; |
DriveEntry* entry = FindEntryByPathSync(path); |
if (entry) { |
entry_proto.reset(new DriveEntryProto); |
entry->ToProtoFull(entry_proto.get()); |
- error = GDATA_FILE_OK; |
+ error = DRIVE_FILE_OK; |
} else { |
- error = GDATA_FILE_ERROR_NOT_FOUND; |
+ error = DRIVE_FILE_ERROR_NOT_FOUND; |
} |
base::MessageLoopProxy::current()->PostTask( |
@@ -387,16 +387,16 @@ void DriveResourceMetadata::ReadDirectoryByPath( |
DCHECK(!callback.is_null()); |
scoped_ptr<DriveEntryProtoVector> entries; |
- GDataFileError error = GDATA_FILE_ERROR_FAILED; |
+ DriveFileError error = DRIVE_FILE_ERROR_FAILED; |
DriveEntry* entry = FindEntryByPathSync(path); |
if (entry && entry->AsDriveDirectory()) { |
entries = entry->AsDriveDirectory()->ToProtoVector(); |
- error = GDATA_FILE_OK; |
+ error = DRIVE_FILE_OK; |
} else if (entry && !entry->AsDriveDirectory()) { |
- error = GDATA_FILE_ERROR_NOT_A_DIRECTORY; |
+ error = DRIVE_FILE_ERROR_NOT_A_DIRECTORY; |
} else { |
- error = GDATA_FILE_ERROR_NOT_FOUND; |
+ error = DRIVE_FILE_ERROR_NOT_FOUND; |
} |
base::MessageLoopProxy::current()->PostTask( |
@@ -466,13 +466,13 @@ void DriveResourceMetadata::RefreshDirectoryInternal( |
DCHECK(!callback.is_null()); |
if (!directory_entry) { |
- callback.Run(GDATA_FILE_ERROR_NOT_FOUND, FilePath()); |
+ callback.Run(DRIVE_FILE_ERROR_NOT_FOUND, FilePath()); |
return; |
} |
DriveDirectory* directory = directory_entry->AsDriveDirectory(); |
if (!directory) { |
- callback.Run(GDATA_FILE_ERROR_NOT_A_DIRECTORY, FilePath()); |
+ callback.Run(DRIVE_FILE_ERROR_NOT_A_DIRECTORY, FilePath()); |
return; |
} |
@@ -488,7 +488,7 @@ void DriveResourceMetadata::RefreshDirectoryInternal( |
directory->AddEntry(entry.release()); |
} |
- callback.Run(GDATA_FILE_OK, directory->GetFilePath()); |
+ callback.Run(DRIVE_FILE_OK, directory->GetFilePath()); |
} |
void DriveResourceMetadata::InitFromDB( |
@@ -501,7 +501,7 @@ void DriveResourceMetadata::InitFromDB( |
if (resource_metadata_db_.get()) { |
if (!callback.is_null()) |
- callback.Run(GDATA_FILE_ERROR_FAILED); |
+ callback.Run(DRIVE_FILE_ERROR_FAILED); |
return; |
} |
@@ -533,7 +533,7 @@ void DriveResourceMetadata::InitResourceMap( |
if (serialized_resources->empty()) { |
origin_ = INITIALIZING; |
if (!callback.is_null()) |
- callback.Run(GDATA_FILE_ERROR_NOT_FOUND); |
+ callback.Run(DRIVE_FILE_ERROR_NOT_FOUND); |
return; |
} |
@@ -546,7 +546,7 @@ void DriveResourceMetadata::InitResourceMap( |
!base::StringToInt(iter->second, &version) || |
version != kProtoVersion) { |
if (!callback.is_null()) |
- callback.Run(GDATA_FILE_ERROR_FAILED); |
+ callback.Run(DRIVE_FILE_ERROR_FAILED); |
return; |
} |
serialized_resources->erase(iter); |
@@ -557,7 +557,7 @@ void DriveResourceMetadata::InitResourceMap( |
!base::StringToInt64(iter->second, &largest_changestamp_)) { |
NOTREACHED() << "Could not find/parse largest_changestamp"; |
if (!callback.is_null()) |
- callback.Run(GDATA_FILE_ERROR_FAILED); |
+ callback.Run(DRIVE_FILE_ERROR_FAILED); |
return; |
} else { |
DVLOG(1) << "InitResourceMap largest_changestamp_" << largest_changestamp_; |
@@ -616,7 +616,7 @@ void DriveResourceMetadata::InitResourceMap( |
origin_ = FROM_CACHE; |
if (!callback.is_null()) |
- callback.Run(GDATA_FILE_OK); |
+ callback.Run(DRIVE_FILE_OK); |
} |
void DriveResourceMetadata::SaveToDB() { |
@@ -714,7 +714,7 @@ void DriveResourceMetadata::GetEntryInfoPairByPathsAfterGetFirst( |
const FilePath& first_path, |
const FilePath& second_path, |
const GetEntryInfoPairCallback& callback, |
- GDataFileError error, |
+ DriveFileError error, |
scoped_ptr<DriveEntryProto> entry_proto) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
DCHECK(!callback.is_null()); |
@@ -725,7 +725,7 @@ void DriveResourceMetadata::GetEntryInfoPairByPathsAfterGetFirst( |
result->first.proto = entry_proto.Pass(); |
// If the first one is not found, don't continue. |
- if (error != GDATA_FILE_OK) { |
+ if (error != DRIVE_FILE_OK) { |
callback.Run(result.Pass()); |
return; |
} |
@@ -744,7 +744,7 @@ void DriveResourceMetadata::GetEntryInfoPairByPathsAfterGetSecond( |
const FilePath& second_path, |
const GetEntryInfoPairCallback& callback, |
scoped_ptr<EntryInfoPairResult> result, |
- GDataFileError error, |
+ DriveFileError error, |
scoped_ptr<DriveEntryProto> entry_proto) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
DCHECK(!callback.is_null()); |