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

Side by Side Diff: chrome/browser/extensions/api/image_writer_private/operation.h

Issue 109793006: Adds ImageWriterPrivate.destroyPartitions operation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes up DBusThreadManager initialization. Created 7 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_OPERATION_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_OPERATION_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_OPERATION_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_OPERATION_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/md5.h" 9 #include "base/md5.h"
10 #include "base/memory/ref_counted_memory.h" 10 #include "base/memory/ref_counted_memory.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 int progress_offset, 103 int progress_offset,
104 int progress_scale, 104 int progress_scale,
105 const base::Callback<void(scoped_ptr<std::string>)>& callback); 105 const base::Callback<void(scoped_ptr<std::string>)>& callback);
106 106
107 base::WeakPtr<OperationManager> manager_; 107 base::WeakPtr<OperationManager> manager_;
108 const ExtensionId extension_id_; 108 const ExtensionId extension_id_;
109 109
110 base::FilePath image_path_; 110 base::FilePath image_path_;
111 const std::string storage_unit_id_; 111 const std::string storage_unit_id_;
112 112
113 // Whether or not to run the final verification step.
114 bool verify_write_;
115
113 private: 116 private:
114 friend class base::RefCountedThreadSafe<Operation>; 117 friend class base::RefCountedThreadSafe<Operation>;
115 118
116 // TODO(haven): Clean up these switches. http://crbug.com/292956 119 // TODO(haven): Clean up these switches. http://crbug.com/292956
117 #if defined(OS_LINUX) && !defined(CHROMEOS) 120 #if defined(OS_LINUX) && !defined(CHROMEOS)
118 void WriteRun(); 121 void WriteRun();
119 void WriteChunk(scoped_ptr<image_writer_utils::ImageReader> reader, 122 void WriteChunk(scoped_ptr<image_writer_utils::ImageReader> reader,
120 scoped_ptr<image_writer_utils::ImageWriter> writer, 123 scoped_ptr<image_writer_utils::ImageWriter> writer,
121 int64 bytes_written); 124 int64 bytes_written);
122 bool WriteCleanUp(scoped_ptr<image_writer_utils::ImageReader> reader, 125 bool WriteCleanUp(scoped_ptr<image_writer_utils::ImageReader> reader,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 164
162 // CleanUp operations that must be run. All these functions are run on the 165 // CleanUp operations that must be run. All these functions are run on the
163 // FILE thread. 166 // FILE thread.
164 std::vector<base::Closure> cleanup_functions_; 167 std::vector<base::Closure> cleanup_functions_;
165 }; 168 };
166 169
167 } // namespace image_writer 170 } // namespace image_writer
168 } // namespace extensions 171 } // namespace extensions
169 172
170 #endif // CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_OPERATION_H_ 173 #endif // CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_OPERATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698