Index: chrome/browser/extensions/api/image_writer_private/operation.h |
diff --git a/chrome/browser/extensions/api/image_writer_private/operation.h b/chrome/browser/extensions/api/image_writer_private/operation.h |
index 58c0814617d4bb3100ed8a965fcc395edefdc980..ba5044d7e94dd0af6a7849fcac205b4f88eba4b6 100644 |
--- a/chrome/browser/extensions/api/image_writer_private/operation.h |
+++ b/chrome/browser/extensions/api/image_writer_private/operation.h |
@@ -11,6 +11,7 @@ |
#include "base/memory/weak_ptr.h" |
#include "base/task/cancelable_task_tracker.h" |
#include "base/timer/timer.h" |
+#include "chrome/browser/extensions/api/image_writer_private/image_writer_utility_client.h" |
#include "chrome/browser/extensions/api/image_writer_private/image_writer_utils.h" |
#include "chrome/common/extensions/api/image_writer_private.h" |
#include "third_party/zlib/google/zip_reader.h" |
@@ -116,19 +117,20 @@ class Operation : public base::RefCountedThreadSafe<Operation> { |
private: |
friend class base::RefCountedThreadSafe<Operation>; |
- // TODO(haven): Clean up these switches. http://crbug.com/292956 |
-#if defined(OS_LINUX) && !defined(CHROMEOS) |
- void WriteRun(); |
- void WriteChunk(scoped_ptr<image_writer_utils::ImageReader> reader, |
- scoped_ptr<image_writer_utils::ImageWriter> writer, |
- int64 bytes_written); |
- bool WriteCleanUp(scoped_ptr<image_writer_utils::ImageReader> reader, |
- scoped_ptr<image_writer_utils::ImageWriter> writer); |
- void WriteComplete(); |
- |
- void VerifyWriteStage2(scoped_ptr<std::string> image_hash); |
- void VerifyWriteCompare(scoped_ptr<std::string> image_hash, |
- scoped_ptr<std::string> device_hash); |
+#if !defined(OS_CHROMEOS) |
+ // Ensures the client is started. This may be called many times but will only |
+ // instantiate one client which should exist for the lifetime of the |
+ // Operation. |
+ void StartUtilityClient(); |
+ |
+ // Stops the client. This must be called to ensure the utility process can |
+ // shutdown. |
+ void StopUtilityClient(); |
+ |
+ // Reports progress from the client, transforming from bytes to percentage. |
+ virtual void WriteImageProgress(int64 total_bytes, int64 curr_bytes); |
+ |
+ scoped_refptr<ImageWriterUtilityClient> image_writer_client_; |
#endif |
#if defined(OS_CHROMEOS) |