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/bind.h" | 10 #include "base/bind.h" |
11 #include "base/file_util.h" | 11 #include "base/file_util.h" |
12 #include "base/files/memory_mapped_file.h" | 12 #include "base/files/memory_mapped_file.h" |
13 #include "base/json/json_file_value_serializer.h" | 13 #include "base/json/json_file_value_serializer.h" |
14 #include "base/memory/scoped_handle.h" | 14 #include "base/memory/scoped_handle.h" |
15 #include "base/path_service.h" | 15 #include "base/path_service.h" |
16 #include "base/strings/string_number_conversions.h" | 16 #include "base/strings/string_number_conversions.h" |
17 #include "chrome/browser/component_updater/component_patcher.h" | 17 #include "chrome/browser/component_updater/component_patcher.h" |
18 #include "chrome/browser/component_updater/component_updater_service.h" | 18 #include "chrome/browser/component_updater/component_updater_service.h" |
19 #include "chrome/common/chrome_utility_messages.h" | 19 #include "chrome/common/chrome_utility_messages.h" |
20 #include "chrome/common/extensions/extension_constants.h" | 20 #include "chrome/common/extensions/extension_constants.h" |
21 #include "content/public/browser/browser_thread.h" | 21 #include "content/public/browser/browser_thread.h" |
22 #include "content/public/browser/utility_process_host.h" | 22 #include "content/public/browser/utility_process_host.h" |
23 #include "courgette/courgette.h" | 23 #include "courgette/courgette.h" |
24 #include "courgette/third_party/bsdiff.h" | 24 #include "courgette/third_party/bsdiff.h" |
25 #include "crypto/secure_hash.h" | 25 #include "crypto/secure_hash.h" |
26 #include "crypto/sha2.h" | 26 #include "crypto/sha2.h" |
27 #include "crypto/signature_verifier.h" | 27 #include "crypto/signature_verifier.h" |
28 #include "extensions/common/crx_file.h" | 28 #include "extensions/common/crx_file.h" |
29 #include "ipc/ipc_message_macros.h" | 29 #include "ipc/ipc_message_macros.h" |
30 #include "third_party/zlib/google/zip.h" | |
31 | 30 |
32 using crypto::SecureHash; | 31 using crypto::SecureHash; |
33 | 32 |
34 namespace component_updater { | 33 namespace component_updater { |
35 | 34 |
36 namespace { | 35 namespace { |
37 | 36 |
38 const char kInput[] = "input"; | 37 const char kInput[] = "input"; |
39 const char kOp[] = "op"; | 38 const char kOp[] = "op"; |
40 const char kOutput[] = "output"; | 39 const char kOutput[] = "output"; |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 if (error != ComponentUnpacker::kNone) { | 399 if (error != ComponentUnpacker::kNone) { |
401 error_code += strategy_->GetErrorOffset(); | 400 error_code += strategy_->GetErrorOffset(); |
402 } | 401 } |
403 callback_.Run(error, error_code); | 402 callback_.Run(error, error_code); |
404 // The callback is no longer needed - it is best to release it in case it | 403 // The callback is no longer needed - it is best to release it in case it |
405 // contains a reference to this object. | 404 // contains a reference to this object. |
406 callback_.Reset(); | 405 callback_.Reset(); |
407 } | 406 } |
408 | 407 |
409 } // namespace component_updater | 408 } // namespace component_updater |
OLD | NEW |