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 <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
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/json/json_file_value_serializer.h" | 12 #include "base/json/json_file_value_serializer.h" |
13 #include "base/memory/scoped_handle.h" | 13 #include "base/memory/scoped_handle.h" |
14 #include "base/path_service.h" | 14 #include "base/path_service.h" |
15 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
16 #include "chrome/browser/component_updater/component_patcher.h" | 16 #include "chrome/browser/component_updater/component_patcher.h" |
17 #include "chrome/browser/component_updater/component_updater_service.h" | 17 #include "chrome/browser/component_updater/component_updater_service.h" |
18 #include "chrome/common/extensions/extension_constants.h" | 18 #include "chrome/common/extensions/extension_constants.h" |
19 #include "crypto/secure_hash.h" | 19 #include "crypto/secure_hash.h" |
20 #include "crypto/sha2.h" | 20 #include "crypto/sha2.h" |
21 #include "crypto/signature_verifier.h" | 21 #include "crypto/signature_verifier.h" |
22 #include "extensions/common/crx_file.h" | 22 #include "extensions/common/crx_file.h" |
23 #include "third_party/zlib/google/zip.h" | |
24 | 23 |
25 using crypto::SecureHash; | 24 using crypto::SecureHash; |
26 | 25 |
27 namespace component_updater { | 26 namespace component_updater { |
28 | 27 |
29 namespace { | 28 namespace { |
30 | 29 |
31 const char kInput[] = "input"; | 30 const char kInput[] = "input"; |
32 const char kOp[] = "op"; | 31 const char kOp[] = "op"; |
33 const char kOutput[] = "output"; | 32 const char kOutput[] = "output"; |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 int* error) { | 215 int* error) { |
217 *error = 0; | 216 *error = 0; |
218 return patcher->Patch(ComponentPatcher::kPatchTypeCourgette, | 217 return patcher->Patch(ComponentPatcher::kPatchTypeCourgette, |
219 input_abs_path_, | 218 input_abs_path_, |
220 patch_abs_path_, | 219 patch_abs_path_, |
221 output_abs_path_, | 220 output_abs_path_, |
222 error); | 221 error); |
223 } | 222 } |
224 | 223 |
225 } // namespace component_updater | 224 } // namespace component_updater |
OLD | NEW |