OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // The main idea in Courgette is to do patching *under a tranformation*. The | 5 // The main idea in Courgette is to do patching *under a tranformation*. The |
6 // input is transformed into a new representation, patching occurs in the new | 6 // input is transformed into a new representation, patching occurs in the new |
7 // repesentation, and then the tranform is reversed to get the patched data. | 7 // repesentation, and then the tranform is reversed to get the patched data. |
8 // | 8 // |
9 // The idea is applied to pieces (or 'elements') of the whole (or 'ensemble'). | 9 // The idea is applied to pieces (or 'elements') of the whole (or 'ensemble'). |
10 // Each of the elements has to go through the same set of steps in lock-step. | 10 // Each of the elements has to go through the same set of steps in lock-step. |
11 | 11 |
12 // This file contains the code to create the patch. | 12 // This file contains the code to create the patch. |
13 | 13 |
14 | 14 |
15 #include "courgette/ensemble.h" | 15 #include "courgette/ensemble.h" |
16 | 16 |
| 17 #include <limits> |
17 #include <vector> | 18 #include <vector> |
18 #include <limits> | |
19 | 19 |
20 #include "base/basictypes.h" | 20 #include "base/basictypes.h" |
21 #include "base/logging.h" | 21 #include "base/logging.h" |
22 #include "base/time.h" | 22 #include "base/time/time.h" |
23 | 23 |
24 #include "courgette/third_party/bsdiff.h" | |
25 #include "courgette/crc.h" | 24 #include "courgette/crc.h" |
26 #include "courgette/difference_estimator.h" | 25 #include "courgette/difference_estimator.h" |
27 #include "courgette/streams.h" | |
28 #include "courgette/region.h" | 26 #include "courgette/region.h" |
29 #include "courgette/simple_delta.h" | 27 #include "courgette/simple_delta.h" |
| 28 #include "courgette/streams.h" |
| 29 #include "courgette/third_party/bsdiff.h" |
30 | 30 |
31 #include "courgette/patcher_x86_32.h" | 31 #include "courgette/patcher_x86_32.h" |
32 #include "courgette/patch_generator_x86_32.h" | 32 #include "courgette/patch_generator_x86_32.h" |
33 | 33 |
34 namespace courgette { | 34 namespace courgette { |
35 | 35 |
36 TransformationPatchGenerator::TransformationPatchGenerator( | 36 TransformationPatchGenerator::TransformationPatchGenerator( |
37 Element* old_element, | 37 Element* old_element, |
38 Element* new_element, | 38 Element* new_element, |
39 TransformationPatcher* patcher) | 39 TransformationPatcher* patcher) |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 return C_STREAM_ERROR; | 437 return C_STREAM_ERROR; |
438 } | 438 } |
439 | 439 |
440 VLOG(1) << "done GenerateEnsemblePatch " | 440 VLOG(1) << "done GenerateEnsemblePatch " |
441 << (base::Time::Now() - start_time).InSecondsF() << "s"; | 441 << (base::Time::Now() - start_time).InSecondsF() << "s"; |
442 | 442 |
443 return C_OK; | 443 return C_OK; |
444 } | 444 } |
445 | 445 |
446 } // namespace | 446 } // namespace |
OLD | NEW |