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

Side by Side Diff: metadata.h

Issue 5684002: Add support for bsdiff of file system metadata blocks (Closed) Base URL: http://git.chromium.org/git/update_engine.git@master
Patch Set: Addressed code review feedbacks Created 10 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_METADATA_H__
6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_METADATA_H__
7
8 #include "update_engine/delta_diff_generator.h"
9 #include "update_engine/graph_types.h"
10
11 namespace chromeos_update_engine {
12
13 class Metadata {
14 public:
15 // Reads metadata from old image and new image and determines
16 // the smallest way to encode the metadata for the diff.
17 // If there's no change in the metadata, it creates a MOVE
18 // operation. If there is a change, the smallest of REPLACE, REPLACE_BZ,
19 // or BSDIFF wins. It writes the diff to data_fd and updates data_file_size
20 // accordingly. It also adds the required operation to the graph and adds the
21 // metadata extents to blocks.
22 // Returns true on success.
23 static bool DeltaReadMetadata(Graph* graph,
24 std::vector<DeltaDiffGenerator::Block>* blocks,
25 const std::string& old_image,
26 const std::string& new_image,
27 int data_fd,
28 off_t* data_file_size);
29
30 private:
31 // This should never be constructed.
32 DISALLOW_IMPLICIT_CONSTRUCTORS(Metadata);
33 };
34
35 }; // namespace chromeos_update_engine
36
37 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_METADATA_H__
OLDNEW
« no previous file with comments | « delta_performer_unittest.cc ('k') | metadata.cc » ('j') | test_utils.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698