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

Unified Diff: chrome/utility/image_writer/image_writer_handler.cc

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/image_writer.cc ('k') | chrome/utility/image_writer/image_writer_mac.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_handler.cc
diff --git a/chrome/utility/image_writer/image_writer_handler.cc b/chrome/utility/image_writer/image_writer_handler.cc
index 2fe78c9d242f42cb589900c78b3c943e1b42df4d..7d641eb6113efffceba34dce2d2ab2481b57eb76 100644
--- a/chrome/utility/image_writer/image_writer_handler.cc
+++ b/chrome/utility/image_writer/image_writer_handler.cc
@@ -2,10 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "chrome/utility/image_writer/image_writer_handler.h"
+
#include "base/files/file_path.h"
#include "chrome/common/chrome_utility_messages.h"
#include "chrome/utility/image_writer/error_messages.h"
-#include "chrome/utility/image_writer/image_writer_handler.h"
#include "content/public/utility/utility_thread.h"
namespace image_writer {
@@ -64,12 +65,8 @@ void ImageWriterHandler::OnWriteStart(const base::FilePath& image,
return;
}
- if (!image_writer_->UnmountVolumes()) {
- SendFailed(error::kUnmountVolumes);
- return;
- }
-
- image_writer_->Write();
+ image_writer_->UnmountVolumes(
+ base::Bind(&ImageWriter::Write, image_writer_->AsWeakPtr()));
}
void ImageWriterHandler::OnVerifyStart(const base::FilePath& image,
« no previous file with comments | « chrome/utility/image_writer/image_writer.cc ('k') | chrome/utility/image_writer/image_writer_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698