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

Side by Side Diff: src/platform/update_engine/delta_diff_generator.h

Issue 1819002: AU: delta compress the kernel partition (Closed) Base URL: ssh://git@chromiumos-git/chromeos
Patch Set: fixes for review Created 10 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/platform/update_engine/delta_diff_generator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 CHROMEOS_PLATFORM_UPDATE_ENGINE_DELTA_DIFF_GENERATOR_H__ 5 #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_DELTA_DIFF_GENERATOR_H__
6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_DELTA_DIFF_GENERATOR_H__ 6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_DELTA_DIFF_GENERATOR_H__
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 22 matching lines...) Expand all
33 // Generally, there will be a vector of Block objects whose length 33 // Generally, there will be a vector of Block objects whose length
34 // is the number of blocks on the install partition. 34 // is the number of blocks on the install partition.
35 Block() : reader(Vertex::kInvalidIndex), writer(Vertex::kInvalidIndex) {} 35 Block() : reader(Vertex::kInvalidIndex), writer(Vertex::kInvalidIndex) {}
36 Vertex::Index reader; 36 Vertex::Index reader;
37 Vertex::Index writer; 37 Vertex::Index writer;
38 }; 38 };
39 39
40 // This is the only function that external users of the class should call. 40 // This is the only function that external users of the class should call.
41 // old_image and new_image are paths to two image files. They should be 41 // old_image and new_image are paths to two image files. They should be
42 // mounted read-only at paths old_root and new_root respectively. 42 // mounted read-only at paths old_root and new_root respectively.
43 // {old,new}_kernel_part are paths to the old and new kernel partition
44 // images, respectively.
43 // output_path is the filename where the delta update should be written. 45 // output_path is the filename where the delta update should be written.
44 // Returns true on success. 46 // Returns true on success.
45 static bool GenerateDeltaUpdateFile(const std::string& old_root, 47 static bool GenerateDeltaUpdateFile(const std::string& old_root,
46 const std::string& old_image, 48 const std::string& old_image,
47 const std::string& new_root, 49 const std::string& new_root,
48 const std::string& new_image, 50 const std::string& new_image,
51 const std::string& old_kernel_part,
52 const std::string& new_kernel_part,
49 const std::string& output_path); 53 const std::string& output_path);
50 54
51 // These functions are public so that the unit tests can access them: 55 // These functions are public so that the unit tests can access them:
52 56
53 // Reads old_filename (if it exists) and a new_filename and determines 57 // Reads old_filename (if it exists) and a new_filename and determines
54 // the smallest way to encode this file for the diff. It stores 58 // the smallest way to encode this file for the diff. It stores
55 // necessary data in out_data and fills in out_op. 59 // necessary data in out_data and fills in out_op.
56 // If there's no change in old and new files, it creates a MOVE 60 // If there's no change in old and new files, it creates a MOVE
57 // operation. If there is a change, or the old file doesn't exist, 61 // operation. If there is a change, or the old file doesn't exist,
58 // the smallest of REPLACE, REPLACE_BZ, or BSDIFF wins. 62 // the smallest of REPLACE, REPLACE_BZ, or BSDIFF wins.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 DISALLOW_IMPLICIT_CONSTRUCTORS(DeltaDiffGenerator); 115 DISALLOW_IMPLICIT_CONSTRUCTORS(DeltaDiffGenerator);
112 }; 116 };
113 117
114 extern const char* const kBsdiffPath; 118 extern const char* const kBsdiffPath;
115 extern const char* const kBspatchPath; 119 extern const char* const kBspatchPath;
116 extern const char* const kDeltaMagic; 120 extern const char* const kDeltaMagic;
117 121
118 }; // namespace chromeos_update_engine 122 }; // namespace chromeos_update_engine
119 123
120 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_DELTA_DIFF_GENERATOR_H__ 124 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_DELTA_DIFF_GENERATOR_H__
OLDNEW
« no previous file with comments | « no previous file | src/platform/update_engine/delta_diff_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698