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 f87f8ccbf7fe82ab6dc9a5ecd980cf9e588a0257..079125cf37031832a2b378a79c138aa8c223ce20 100644 |
--- a/chrome/browser/extensions/api/image_writer_private/operation_manager.cc |
+++ b/chrome/browser/extensions/api/image_writer_private/operation_manager.cc |
@@ -64,9 +64,14 @@ void OperationManager::StartWriteFromUrl( |
const std::string& hash, |
const std::string& device_path, |
const Operation::StartWriteCallback& callback) { |
+#if defined(OS_CHROMEOS) |
+ // Chrome OS can only support a single operation at a time. |
+ if (operations_.size() > 0) { |
+#else |
OperationMap::iterator existing_operation = operations_.find(extension_id); |
if (existing_operation != operations_.end()) { |
+#endif |
return callback.Run(false, error::kOperationAlreadyInProgress); |
} |
@@ -89,9 +94,14 @@ void OperationManager::StartWriteFromFile( |
const base::FilePath& path, |
const std::string& device_path, |
const Operation::StartWriteCallback& callback) { |
+#if defined(OS_CHROMEOS) |
+ // Chrome OS can only support a single operation at a time. |
+ if (operations_.size() > 0) { |
+#else |
OperationMap::iterator existing_operation = operations_.find(extension_id); |
if (existing_operation != operations_.end()) { |
+#endif |
return callback.Run(false, error::kOperationAlreadyInProgress); |
} |