Chromium Code Reviews| 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..953292d6b221ea4595cb26c0270a2ece89074501 100644 |
| --- a/chrome/browser/extensions/api/image_writer_private/operation.h |
| +++ b/chrome/browser/extensions/api/image_writer_private/operation.h |
| @@ -12,6 +12,7 @@ |
| #include "base/task/cancelable_task_tracker.h" |
| #include "base/timer/timer.h" |
| #include "chrome/browser/extensions/api/image_writer_private/image_writer_utils.h" |
| +#include "chrome/browser/image_writer_client.h" |
| #include "chrome/common/extensions/api/image_writer_private.h" |
| #include "third_party/zlib/google/zip_reader.h" |
| @@ -116,19 +117,19 @@ 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 |
|
Jorge Lucangeli Obes
2014/02/14 20:42:13
for the lifetime of... what?
Drew Haven
2014/02/14 23:00:57
Oops, the operation. E.g. one client per write/ve
|
| + void StartImageWriterClient(); |
| + |
| + // Stops the client. This must be called to ensure the utility process can |
| + // shutdown. |
| + void StopImageWriterClient(); |
| + |
| + // Reports progress from the client, transforming from bytes to percentage. |
| + virtual void WriteImageProgress(int64 total_bytes, int64 curr_bytes); |
| + |
| + scoped_refptr<ImageWriterClient> image_writer_client_; |
| #endif |
| #if defined(OS_CHROMEOS) |