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

Unified Diff: full_update_generator.h

Issue 4610001: AU: Speed up full update payload generation by running multiple threads. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git@master
Patch Set: doc strings Created 10 years, 1 month 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
Index: full_update_generator.h
diff --git a/full_update_generator.h b/full_update_generator.h
new file mode 100644
index 0000000000000000000000000000000000000000..4b9211c89c29921cf03fdb4919f6cb84cfc7ef19
--- /dev/null
+++ b/full_update_generator.h
@@ -0,0 +1,41 @@
+// Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_FULL_UPDATE_GENERATOR_H__
+#define CHROMEOS_PLATFORM_UPDATE_ENGINE_FULL_UPDATE_GENERATOR_H__
+
+#include <glib.h>
+
+#include "update_engine/graph_types.h"
+
+namespace chromeos_update_engine {
+
+class FullUpdateGenerator {
+ public:
+ // Given a new rootfs and kernel (|new_image|, |new_kernel_part|), reads them
+ // sequentially, creating a full update of chunk_size chunks. Populates
+ // |graph|, |kernel_ops|, and |final_order|, with data about the update
+ // operations, and writes relevant data to |fd|, updating |data_file_size| as
+ // it does. Only the first |image_size| bytes are read from |new_image|
+ // assuming that this is the actual file system.
+ static bool Run(
+ Graph* graph,
+ const std::string& new_kernel_part,
+ const std::string& new_image,
+ off_t image_size,
+ int fd,
+ off_t* data_file_size,
+ off_t chunk_size,
+ off_t block_size,
+ std::vector<DeltaArchiveManifest_InstallOperation>* kernel_ops,
+ std::vector<Vertex::Index>* final_order);
+
+ private:
+ // This should never be constructed.
+ DISALLOW_IMPLICIT_CONSTRUCTORS(FullUpdateGenerator);
+};
+
+} // namespace chromeos_update_engine
+
+#endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_FULL_UPDATE_GENERATOR_H__
« no previous file with comments | « delta_performer_unittest.cc ('k') | full_update_generator.cc » ('j') | full_update_generator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698