OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/component_updater/component_patcher_operation.h" | 5 #include "chrome/browser/component_updater/component_patcher_operation.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
11 #include "base/files/memory_mapped_file.h" | 11 #include "base/files/memory_mapped_file.h" |
12 #include "base/location.h" | 12 #include "base/location.h" |
13 #include "base/strings/string_number_conversions.h" | 13 #include "base/strings/string_number_conversions.h" |
14 #include "chrome/browser/component_updater/component_patcher.h" | 14 #include "chrome/browser/component_updater/component_patcher.h" |
15 #include "chrome/browser/component_updater/component_updater_service.h" | 15 #include "chrome/browser/component_updater/component_updater_service.h" |
16 #include "courgette/courgette.h" | 16 #include "courgette/courgette.h" |
17 #include "courgette/third_party/bsdiff.h" | 17 #include "courgette/third_party/bsdiff.h" |
18 #include "crypto/secure_hash.h" | 18 #include "crypto/secure_hash.h" |
19 #include "crypto/sha2.h" | 19 #include "crypto/sha2.h" |
20 #include "crypto/signature_verifier.h" | 20 #include "crypto/signature_verifier.h" |
21 #include "extensions/common/crx_file.h" | |
22 | 21 |
23 using crypto::SecureHash; | 22 using crypto::SecureHash; |
24 | 23 |
25 namespace component_updater { | 24 namespace component_updater { |
26 | 25 |
27 namespace { | 26 namespace { |
28 | 27 |
29 const char kOutput[] = "output"; | 28 const char kOutput[] = "output"; |
30 const char kSha256[] = "sha256"; | 29 const char kSha256[] = "sha256"; |
31 | 30 |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 } else { | 256 } else { |
258 callback.Run(ComponentUnpacker::kDeltaOperationFailure, | 257 callback.Run(ComponentUnpacker::kDeltaOperationFailure, |
259 result + kCourgetteErrorOffset); | 258 result + kCourgetteErrorOffset); |
260 } | 259 } |
261 } else { | 260 } else { |
262 NOTREACHED(); | 261 NOTREACHED(); |
263 } | 262 } |
264 } | 263 } |
265 | 264 |
266 } // namespace component_updater | 265 } // namespace component_updater |
OLD | NEW |