OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "components/update_client/component_patcher_operation.h" | 5 #include "components/update_client/component_patcher_operation.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/files/file_util.h" | 11 #include "base/files/file_util.h" |
12 #include "base/files/memory_mapped_file.h" | 12 #include "base/files/memory_mapped_file.h" |
13 #include "base/location.h" | 13 #include "base/location.h" |
14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
15 #include "components/update_client/component_patcher.h" | 15 #include "components/update_client/component_patcher.h" |
16 #include "components/update_client/update_client.h" | 16 #include "components/update_client/update_client.h" |
17 #include "components/update_client/utils.h" | 17 #include "components/update_client/utils.h" |
18 #include "courgette/courgette.h" | 18 #include "courgette/courgette.h" |
19 #include "courgette/third_party/bsdiff.h" | 19 #include "courgette/third_party/bsdiff/bsdiff.h" |
20 | 20 |
21 namespace update_client { | 21 namespace update_client { |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 const char kOutput[] = "output"; | 25 const char kOutput[] = "output"; |
26 const char kSha256[] = "sha256"; | 26 const char kSha256[] = "sha256"; |
27 | 27 |
28 // The integer offset disambiguates between overlapping error ranges. | 28 // The integer offset disambiguates between overlapping error ranges. |
29 const int kCourgetteErrorOffset = 300; | 29 const int kCourgetteErrorOffset = 300; |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 } else { | 236 } else { |
237 callback.Run(ComponentUnpacker::kDeltaOperationFailure, | 237 callback.Run(ComponentUnpacker::kDeltaOperationFailure, |
238 result + kCourgetteErrorOffset); | 238 result + kCourgetteErrorOffset); |
239 } | 239 } |
240 } else { | 240 } else { |
241 NOTREACHED(); | 241 NOTREACHED(); |
242 } | 242 } |
243 } | 243 } |
244 | 244 |
245 } // namespace update_client | 245 } // namespace update_client |
OLD | NEW |