| Index: chrome/browser/chromeos/gdata/gdata_operations.cc
|
| diff --git a/chrome/browser/chromeos/gdata/gdata_operations.cc b/chrome/browser/chromeos/gdata/gdata_operations.cc
|
| index a0df4d8f45279ca722e2b77b3016bb8de2302f92..fde6b225982bf727abac1d7a930f7e8d8309df08 100644
|
| --- a/chrome/browser/chromeos/gdata/gdata_operations.cc
|
| +++ b/chrome/browser/chromeos/gdata/gdata_operations.cc
|
| @@ -187,6 +187,9 @@ void UrlFetchOperationBase::Start(const std::string& auth_token) {
|
| if (save_temp_file_) {
|
| url_fetcher_->SaveResponseToTemporaryFile(
|
| BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE));
|
| + } else if (!output_file_path_.empty()){
|
| + url_fetcher_->SaveResponseToFileAtPath(output_file_path_,
|
| + BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE));
|
| }
|
|
|
| // Add request headers.
|
| @@ -427,7 +430,8 @@ DownloadFileOperation::DownloadFileOperation(
|
| Profile* profile,
|
| const DownloadActionCallback& callback,
|
| const GURL& document_url,
|
| - const FilePath& virtual_path)
|
| + const FilePath& virtual_path,
|
| + const FilePath& output_file_path)
|
| : UrlFetchOperationBase(registry,
|
| GDataOperationRegistry::OPERATION_DOWNLOAD,
|
| virtual_path,
|
| @@ -435,7 +439,10 @@ DownloadFileOperation::DownloadFileOperation(
|
| callback_(callback),
|
| document_url_(document_url) {
|
| // Make sure we download the content into a temp file.
|
| - save_temp_file_ = true;
|
| + if (output_file_path.empty())
|
| + save_temp_file_ = true;
|
| + else
|
| + output_file_path_ = output_file_path;
|
| }
|
|
|
| DownloadFileOperation::~DownloadFileOperation() {}
|
|
|