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" | |
15 #include "base/path_service.h" | 14 #include "base/path_service.h" |
16 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
17 #include "chrome/browser/component_updater/component_patcher.h" | 16 #include "chrome/browser/component_updater/component_patcher.h" |
18 #include "chrome/browser/component_updater/component_updater_service.h" | 17 #include "chrome/browser/component_updater/component_updater_service.h" |
19 #include "chrome/common/chrome_utility_messages.h" | 18 #include "chrome/common/chrome_utility_messages.h" |
20 #include "chrome/common/extensions/extension_constants.h" | 19 #include "chrome/common/extensions/extension_constants.h" |
21 #include "content/public/browser/browser_thread.h" | 20 #include "content/public/browser/browser_thread.h" |
22 #include "content/public/browser/utility_process_host.h" | 21 #include "content/public/browser/utility_process_host.h" |
23 #include "courgette/courgette.h" | 22 #include "courgette/courgette.h" |
24 #include "courgette/third_party/bsdiff.h" | 23 #include "courgette/third_party/bsdiff.h" |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 if (error != ComponentUnpacker::kNone) { | 403 if (error != ComponentUnpacker::kNone) { |
405 error_code += strategy_->GetErrorOffset(); | 404 error_code += strategy_->GetErrorOffset(); |
406 } | 405 } |
407 callback_.Run(error, error_code); | 406 callback_.Run(error, error_code); |
408 // The callback is no longer needed - it is best to release it in case it | 407 // The callback is no longer needed - it is best to release it in case it |
409 // contains a reference to this object. | 408 // contains a reference to this object. |
410 callback_.Reset(); | 409 callback_.Reset(); |
411 } | 410 } |
412 | 411 |
413 } // namespace component_updater | 412 } // namespace component_updater |
OLD | NEW |