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

Unified Diff: chrome/utility/image_writer/image_writer.h

Issue 294163008: Adds USB writing for OS X. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@list-devices
Patch Set: Fixes windows compilation. Created 6 years, 6 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
« no previous file with comments | « chrome/utility/image_writer/disk_unmounter_mac.cc ('k') | chrome/utility/image_writer/image_writer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/utility/image_writer/image_writer.h
diff --git a/chrome/utility/image_writer/image_writer.h b/chrome/utility/image_writer/image_writer.h
index 11bd154502d15a88fc265ad4ab3d45eca9cff30a..7c1225cac27641c3dc2e72640e14fdece299c372 100644
--- a/chrome/utility/image_writer/image_writer.h
+++ b/chrome/utility/image_writer/image_writer.h
@@ -5,11 +5,6 @@
#ifndef CHROME_UTILITY_IMAGE_WRITER_IMAGE_WRITER_H_
#define CHROME_UTILITY_IMAGE_WRITER_IMAGE_WRITER_H_
-#if defined(OS_WIN)
-#include <windows.h>
-#endif
-
-#include <string>
#include <vector>
#include "base/bind.h"
@@ -18,9 +13,16 @@
#include "base/files/file_path.h"
#include "base/memory/weak_ptr.h"
+#if defined(OS_WIN)
+#include <windows.h>
+#endif
+
namespace image_writer {
class ImageWriterHandler;
+#if defined(OS_MACOSX)
+class DiskUnmounterMac;
+#endif
// Manages a write within the utility thread. This class holds all the state
// around the writing and communicates with the ImageWriterHandler to dispatch
@@ -47,7 +49,7 @@ class ImageWriter : public base::SupportsWeakPtr<ImageWriter> {
bool IsValidDevice();
// Unmounts all volumes on the target device.
// This method has OS-specific implementations.
- bool UnmountVolumes();
+ void UnmountVolumes(const base::Closure& continuation);
// Return the current image path.
const base::FilePath& GetImagePath();
@@ -62,6 +64,7 @@ class ImageWriter : public base::SupportsWeakPtr<ImageWriter> {
// Initializes the files.
bool InitializeFiles();
+ bool OpenDevice();
// Work loops.
void WriteChunk();
@@ -79,6 +82,11 @@ class ImageWriter : public base::SupportsWeakPtr<ImageWriter> {
std::vector<HANDLE> volume_handles_;
#endif
+#if defined(OS_MACOSX)
+ friend class DiskUnmounterMac;
+ scoped_ptr<DiskUnmounterMac> unmounter_;
+#endif
+
ImageWriterHandler* handler_;
};
« no previous file with comments | « chrome/utility/image_writer/disk_unmounter_mac.cc ('k') | chrome/utility/image_writer/image_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698