| 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_unpacker.h" | 5 #include "components/update_client/component_unpacker.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/base64.h" | 11 #include "base/base64.h" |
| 12 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
| 14 #include "base/files/file_util.h" | 14 #include "base/files/file_util.h" |
| 15 #include "base/files/scoped_file.h" | 15 #include "base/files/scoped_file.h" |
| 16 #include "base/json/json_file_value_serializer.h" | 16 #include "base/json/json_file_value_serializer.h" |
| 17 #include "base/location.h" | 17 #include "base/location.h" |
| 18 #include "base/logging.h" | 18 #include "base/logging.h" |
| 19 #include "base/macros.h" | 19 #include "base/macros.h" |
| 20 #include "base/numerics/safe_conversions.h" | 20 #include "base/numerics/safe_conversions.h" |
| 21 #include "base/strings/string_number_conversions.h" | 21 #include "base/strings/string_number_conversions.h" |
| 22 #include "base/strings/stringprintf.h" | 22 #include "base/strings/stringprintf.h" |
| 23 #include "base/values.h" | 23 #include "base/values.h" |
| 24 #include "components/crx_file/constants.h" | |
| 25 #include "components/crx_file/crx_file.h" | 24 #include "components/crx_file/crx_file.h" |
| 26 #include "components/update_client/component_patcher.h" | 25 #include "components/update_client/component_patcher.h" |
| 27 #include "components/update_client/component_patcher_operation.h" | 26 #include "components/update_client/component_patcher_operation.h" |
| 28 #include "components/update_client/update_client.h" | 27 #include "components/update_client/update_client.h" |
| 29 #include "crypto/secure_hash.h" | 28 #include "crypto/secure_hash.h" |
| 30 #include "crypto/sha2.h" | 29 #include "crypto/sha2.h" |
| 31 #include "third_party/zlib/google/zip.h" | 30 #include "third_party/zlib/google/zip.h" |
| 32 | 31 |
| 33 using crypto::SecureHash; | 32 using crypto::SecureHash; |
| 34 using crx_file::CrxFile; | 33 using crx_file::CrxFile; |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 if (!unpack_path_.empty()) | 206 if (!unpack_path_.empty()) |
| 208 base::DeleteFile(unpack_path_, true); | 207 base::DeleteFile(unpack_path_, true); |
| 209 task_runner_->PostTask(FROM_HERE, | 208 task_runner_->PostTask(FROM_HERE, |
| 210 base::Bind(callback_, error_, extended_error_)); | 209 base::Bind(callback_, error_, extended_error_)); |
| 211 } | 210 } |
| 212 | 211 |
| 213 ComponentUnpacker::~ComponentUnpacker() { | 212 ComponentUnpacker::~ComponentUnpacker() { |
| 214 } | 213 } |
| 215 | 214 |
| 216 } // namespace update_client | 215 } // namespace update_client |
| OLD | NEW |