OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_unpacker.h" | 5 #include "chrome/browser/component_updater/component_unpacker.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/file_util.h" | 11 #include "base/file_util.h" |
12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
13 #include "base/json/json_file_value_serializer.h" | 13 #include "base/json/json_file_value_serializer.h" |
14 #include "base/location.h" | 14 #include "base/location.h" |
15 #include "base/logging.h" | 15 #include "base/logging.h" |
16 #include "base/memory/scoped_handle.h" | 16 #include "base/memory/scoped_handle.h" |
17 #include "base/strings/string_number_conversions.h" | 17 #include "base/strings/string_number_conversions.h" |
18 #include "base/strings/stringprintf.h" | 18 #include "base/strings/stringprintf.h" |
19 #include "base/values.h" | 19 #include "base/values.h" |
20 #include "chrome/browser/component_updater/component_patcher.h" | 20 #include "chrome/browser/component_updater/component_patcher.h" |
21 #include "chrome/browser/component_updater/component_updater_service.h" | 21 #include "chrome/browser/component_updater/component_updater_service.h" |
22 #include "chrome/common/extensions/extension_constants.h" | |
23 #include "crypto/secure_hash.h" | 22 #include "crypto/secure_hash.h" |
24 #include "crypto/signature_verifier.h" | 23 #include "crypto/signature_verifier.h" |
| 24 #include "extensions/common/constants.h" |
25 #include "extensions/common/crx_file.h" | 25 #include "extensions/common/crx_file.h" |
26 #include "third_party/zlib/google/zip.h" | 26 #include "third_party/zlib/google/zip.h" |
27 | 27 |
28 using crypto::SecureHash; | 28 using crypto::SecureHash; |
29 | 29 |
30 namespace component_updater { | 30 namespace component_updater { |
31 | 31 |
32 namespace { | 32 namespace { |
33 | 33 |
34 // This class makes sure that the CRX digital signature is valid | 34 // This class makes sure that the CRX digital signature is valid |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 base::DeleteFile(unpack_diff_path_, true); | 266 base::DeleteFile(unpack_diff_path_, true); |
267 if (!unpack_path_.empty()) | 267 if (!unpack_path_.empty()) |
268 base::DeleteFile(unpack_path_, true); | 268 base::DeleteFile(unpack_path_, true); |
269 callback_.Run(error_, extended_error_); | 269 callback_.Run(error_, extended_error_); |
270 } | 270 } |
271 | 271 |
272 ComponentUnpacker::~ComponentUnpacker() { | 272 ComponentUnpacker::~ComponentUnpacker() { |
273 } | 273 } |
274 | 274 |
275 } // namespace component_updater | 275 } // namespace component_updater |
OLD | NEW |