| Index: chrome/browser/chromeos/drive/drive_download_observer.cc
|
| diff --git a/chrome/browser/chromeos/drive/drive_download_observer.cc b/chrome/browser/chromeos/drive/drive_download_observer.cc
|
| index dcc80381d80fce06398fe8a56729e6d863571b59..81de5de3614f553b3c295e8ed7727567ef9651cb 100644
|
| --- a/chrome/browser/chromeos/drive/drive_download_observer.cc
|
| +++ b/chrome/browser/chromeos/drive/drive_download_observer.cc
|
| @@ -25,7 +25,7 @@ using content::BrowserThread;
|
| using content::DownloadManager;
|
| using content::DownloadItem;
|
|
|
| -namespace gdata {
|
| +namespace drive {
|
| namespace {
|
|
|
| // Threshold file size after which we stream the file.
|
| @@ -50,8 +50,10 @@ class UploadingUserData : public DownloadCompletionBlocker {
|
| int upload_id() const { return upload_id_; }
|
| void set_virtual_dir_path(const FilePath& path) { virtual_dir_path_ = path; }
|
| const FilePath& virtual_dir_path() const { return virtual_dir_path_; }
|
| - void set_entry(scoped_ptr<DocumentEntry> entry) { entry_ = entry.Pass(); }
|
| - scoped_ptr<DocumentEntry> entry_passed() { return entry_.Pass(); }
|
| + void set_entry(scoped_ptr<gdata::DocumentEntry> entry) {
|
| + entry_ = entry.Pass();
|
| + }
|
| + scoped_ptr<gdata::DocumentEntry> entry_passed() { return entry_.Pass(); }
|
| void set_overwrite(bool overwrite) { is_overwrite_ = overwrite; }
|
| bool is_overwrite() const { return is_overwrite_; }
|
| void set_resource_id(const std::string& resource_id) {
|
| @@ -65,7 +67,7 @@ class UploadingUserData : public DownloadCompletionBlocker {
|
| DriveUploader* uploader_;
|
| int upload_id_;
|
| FilePath virtual_dir_path_;
|
| - scoped_ptr<DocumentEntry> entry_;
|
| + scoped_ptr<gdata::DocumentEntry> entry_;
|
| bool is_overwrite_;
|
| std::string resource_id_;
|
| std::string md5_;
|
| @@ -179,11 +181,11 @@ void OnEntryFound(Profile* profile,
|
| void OnAuthenticate(Profile* profile,
|
| const FilePath& drive_path,
|
| const base::Closure& substitute_callback,
|
| - GDataErrorCode error,
|
| + gdata::GDataErrorCode error,
|
| const std::string& token) {
|
| DVLOG(1) << "OnAuthenticate";
|
|
|
| - if (error == HTTP_SUCCESS) {
|
| + if (error == gdata::HTTP_SUCCESS) {
|
| const FilePath drive_dir_path =
|
| util::ExtractDrivePath(drive_path.DirName());
|
| // Ensure the directory exists. This also forces DriveFileSystem to
|
| @@ -664,7 +666,7 @@ void DriveDownloadObserver::OnUploadComplete(
|
| DriveFileError error,
|
| const FilePath& drive_path,
|
| const FilePath& file_path,
|
| - scoped_ptr<DocumentEntry> document_entry) {
|
| + scoped_ptr<gdata::DocumentEntry> document_entry) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| DCHECK(document_entry.get());
|
|
|
| @@ -698,8 +700,8 @@ void DriveDownloadObserver::MoveFileToDriveCache(DownloadItem* download) {
|
| return;
|
| }
|
|
|
| - // Pass ownership of the DocumentEntry object.
|
| - scoped_ptr<DocumentEntry> entry = upload_data->entry_passed();
|
| + // Pass ownership of the gdata::DocumentEntry object.
|
| + scoped_ptr<gdata::DocumentEntry> entry = upload_data->entry_passed();
|
| if (!entry.get()) {
|
| NOTREACHED();
|
| return;
|
| @@ -715,7 +717,7 @@ void DriveDownloadObserver::MoveFileToDriveCache(DownloadItem* download) {
|
| // Move downloaded file to drive cache. Note that |content_file_path| should
|
| // use the final target path (download->GetTargetFilePath()) when the
|
| // download item has transitioned to the DownloadItem::COMPLETE state.
|
| - file_system_->AddUploadedFile(UPLOAD_NEW_FILE,
|
| + file_system_->AddUploadedFile(gdata::UPLOAD_NEW_FILE,
|
| upload_data->virtual_dir_path(),
|
| entry.Pass(),
|
| download->GetTargetFilePath(),
|
| @@ -745,4 +747,4 @@ std::string DriveDownloadObserver::UploaderParams::DebugString() const {
|
| "]";
|
| }
|
|
|
| -} // namespace gdata
|
| +} // namespace drive
|
|
|