Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 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 | 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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 215 | 215 |
| 216 private: | 216 private: |
| 217 // This should never be constructed | 217 // This should never be constructed |
| 218 DISALLOW_IMPLICIT_CONSTRUCTORS(DeltaDiffGenerator); | 218 DISALLOW_IMPLICIT_CONSTRUCTORS(DeltaDiffGenerator); |
| 219 }; | 219 }; |
| 220 | 220 |
| 221 extern const char* const kBsdiffPath; | 221 extern const char* const kBsdiffPath; |
| 222 extern const char* const kBspatchPath; | 222 extern const char* const kBspatchPath; |
| 223 extern const char* const kDeltaMagic; | 223 extern const char* const kDeltaMagic; |
| 224 | 224 |
| 225 // Runs the bsdiff tool on two files and returns the resulting delta in | |
| 226 // 'out'. Returns true on success. | |
| 227 bool BsdiffFiles(const std::string& old_file, | |
|
adlr
2010/12/15 03:11:23
can these be static methods of DeltaDiffGenerator
thieule
2010/12/15 19:57:01
Done.
| |
| 228 const std::string& new_file, | |
| 229 std::vector<char>* out); | |
| 230 | |
| 231 // The blocks vector contains a reader and writer for each block on the | |
|
petkov
2010/12/15 18:40:32
s/blocks/|blocks|/
thieule
2010/12/15 19:57:01
Done.
| |
| 232 // filesystem that's being in-place updated. We populate the reader/writer | |
| 233 // fields of blocks by calling this function. | |
| 234 // For each block in 'operation' that is read or written, find that block | |
|
petkov
2010/12/15 18:40:32
s/'operation'/|operation|/
same for blocks, graph
thieule
2010/12/15 19:57:01
Done.
| |
| 235 // in 'blocks' and set the reader/writer field to the vertex passed. | |
| 236 // 'graph' is not strictly necessary, but useful for printing out | |
| 237 // error messages. | |
| 238 bool AddInstallOpToBlocksVector( | |
| 239 const DeltaArchiveManifest_InstallOperation& operation, | |
| 240 std::vector<DeltaDiffGenerator::Block>* blocks, | |
|
petkov
2010/12/15 18:40:32
it might be good, per style, to move |blocks| to b
thieule
2010/12/15 19:57:01
Done.
| |
| 241 const Graph& graph, | |
| 242 Vertex::Index vertex); | |
| 243 | |
| 225 }; // namespace chromeos_update_engine | 244 }; // namespace chromeos_update_engine |
| 226 | 245 |
| 227 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_DELTA_DIFF_GENERATOR_H__ | 246 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_DELTA_DIFF_GENERATOR_H__ |
| OLD | NEW |