Index: chrome/browser/extensions/api/image_writer_private/operation_manager.cc |
diff --git a/chrome/browser/extensions/api/image_writer_private/operation_manager.cc b/chrome/browser/extensions/api/image_writer_private/operation_manager.cc |
index dd840d4850b1ac5199c0034437080c43db5ed05e..9f1aec30d66cefe9de5bcf9d9db2be898dc59b56 100644 |
--- a/chrome/browser/extensions/api/image_writer_private/operation_manager.cc |
+++ b/chrome/browser/extensions/api/image_writer_private/operation_manager.cc |
@@ -58,10 +58,8 @@ void OperationManager::Shutdown() { |
void OperationManager::StartWriteFromUrl( |
const ExtensionId& extension_id, |
GURL url, |
- content::RenderViewHost* rvh, |
const std::string& hash, |
- bool saveImageAsDownload, |
- const std::string& storage_unit_id, |
+ const std::string& device_path, |
const Operation::StartWriteCallback& callback) { |
OperationMap::iterator existing_operation = operations_.find(extension_id); |
@@ -72,11 +70,10 @@ void OperationManager::StartWriteFromUrl( |
scoped_refptr<Operation> operation( |
new WriteFromUrlOperation(weak_factory_.GetWeakPtr(), |
extension_id, |
- rvh, |
+ profile_->GetRequestContext(), |
url, |
hash, |
- saveImageAsDownload, |
- storage_unit_id)); |
+ device_path)); |
operations_[extension_id] = operation; |
BrowserThread::PostTask(BrowserThread::FILE, |
FROM_HERE, |
@@ -87,7 +84,7 @@ void OperationManager::StartWriteFromUrl( |
void OperationManager::StartWriteFromFile( |
const ExtensionId& extension_id, |
const base::FilePath& path, |
- const std::string& storage_unit_id, |
+ const std::string& device_path, |
const Operation::StartWriteCallback& callback) { |
OperationMap::iterator existing_operation = operations_.find(extension_id); |
@@ -95,11 +92,8 @@ void OperationManager::StartWriteFromFile( |
return callback.Run(false, error::kOperationAlreadyInProgress); |
} |
- scoped_refptr<Operation> operation( |
- new WriteFromFileOperation(weak_factory_.GetWeakPtr(), |
- extension_id, |
- path, |
- storage_unit_id)); |
+ scoped_refptr<Operation> operation(new WriteFromFileOperation( |
+ weak_factory_.GetWeakPtr(), extension_id, path, device_path)); |
operations_[extension_id] = operation; |
BrowserThread::PostTask(BrowserThread::FILE, |
FROM_HERE, |
@@ -125,7 +119,7 @@ void OperationManager::CancelWrite( |
void OperationManager::DestroyPartitions( |
const ExtensionId& extension_id, |
- const std::string& storage_unit_id, |
+ const std::string& device_path, |
const Operation::StartWriteCallback& callback) { |
OperationMap::iterator existing_operation = operations_.find(extension_id); |
@@ -133,10 +127,8 @@ void OperationManager::DestroyPartitions( |
return callback.Run(false, error::kOperationAlreadyInProgress); |
} |
- scoped_refptr<Operation> operation( |
- new DestroyPartitionsOperation(weak_factory_.GetWeakPtr(), |
- extension_id, |
- storage_unit_id)); |
+ scoped_refptr<Operation> operation(new DestroyPartitionsOperation( |
+ weak_factory_.GetWeakPtr(), extension_id, device_path)); |
operations_[extension_id] = operation; |
BrowserThread::PostTask(BrowserThread::FILE, |
FROM_HERE, |
@@ -148,7 +140,6 @@ void OperationManager::OnProgress(const ExtensionId& extension_id, |
image_writer_api::Stage stage, |
int progress) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
- DVLOG(2) << "progress - " << stage << " at " << progress << "%"; |
image_writer_api::ProgressInfo info; |
info.stage = stage; |