Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Unified Diff: chrome/browser/extensions/api/image_writer_private/operation_manager.cc

Issue 149313003: Significantly cleans up the ImageWriter Operation class and subclasses. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes compilation errors. Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 62409e497e26ecd4435a8a1ed47d8eb91a9bfd1b..81e96f706999dcda8515f55cc10aa20cc41573fe 100644
--- a/chrome/browser/extensions/api/image_writer_private/operation_manager.cc
+++ b/chrome/browser/extensions/api/image_writer_private/operation_manager.cc
@@ -59,10 +59,9 @@ 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);
@@ -73,11 +72,11 @@ 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,
@@ -88,7 +87,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);
@@ -100,7 +99,7 @@ void OperationManager::StartWriteFromFile(
new WriteFromFileOperation(weak_factory_.GetWeakPtr(),
extension_id,
path,
- storage_unit_id));
+ device_path));
operations_[extension_id] = operation;
BrowserThread::PostTask(BrowserThread::FILE,
FROM_HERE,
@@ -126,7 +125,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);
@@ -137,7 +136,7 @@ void OperationManager::DestroyPartitions(
scoped_refptr<Operation> operation(
new DestroyPartitionsOperation(weak_factory_.GetWeakPtr(),
extension_id,
- storage_unit_id));
+ device_path));
operations_[extension_id] = operation;
BrowserThread::PostTask(BrowserThread::FILE,
FROM_HERE,

Powered by Google App Engine
This is Rietveld 408576698