| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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_updater_service.h" | 5 #include "chrome/browser/component_updater/component_updater_service.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 862 // calling the component specific installer. All that is handled by the | 862 // calling the component specific installer. All that is handled by the |
| 863 // |unpacker_|. If there is an error this function is in charge of deleting | 863 // |unpacker_|. If there is an error this function is in charge of deleting |
| 864 // the files created. | 864 // the files created. |
| 865 void CrxUpdateService::Install(scoped_ptr<CRXContext> context, | 865 void CrxUpdateService::Install(scoped_ptr<CRXContext> context, |
| 866 const base::FilePath& crx_path) { | 866 const base::FilePath& crx_path) { |
| 867 // This function owns the file at |crx_path| and the |context| object. | 867 // This function owns the file at |crx_path| and the |context| object. |
| 868 unpacker_ = new ComponentUnpacker(context->pk_hash, | 868 unpacker_ = new ComponentUnpacker(context->pk_hash, |
| 869 crx_path, | 869 crx_path, |
| 870 context->fingerprint, | 870 context->fingerprint, |
| 871 context->installer, | 871 context->installer, |
| 872 config_->InProcess(), | 872 config_->CreateDeltaUpdateOpFactory(), |
| 873 blocking_task_runner_); | 873 blocking_task_runner_); |
| 874 unpacker_->Unpack(base::Bind(&CrxUpdateService::EndUnpacking, | 874 unpacker_->Unpack(base::Bind(&CrxUpdateService::EndUnpacking, |
| 875 base::Unretained(this), | 875 base::Unretained(this), |
| 876 context->id, | 876 context->id, |
| 877 crx_path)); | 877 crx_path)); |
| 878 } | 878 } |
| 879 | 879 |
| 880 void CrxUpdateService::EndUnpacking(const std::string& component_id, | 880 void CrxUpdateService::EndUnpacking(const std::string& component_id, |
| 881 const base::FilePath& crx_path, | 881 const base::FilePath& crx_path, |
| 882 ComponentUnpacker::Error error, | 882 ComponentUnpacker::Error error, |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1097 } | 1097 } |
| 1098 | 1098 |
| 1099 // The component update factory. Using the component updater as a singleton | 1099 // The component update factory. Using the component updater as a singleton |
| 1100 // is the job of the browser process. | 1100 // is the job of the browser process. |
| 1101 ComponentUpdateService* ComponentUpdateServiceFactory(Configurator* config) { | 1101 ComponentUpdateService* ComponentUpdateServiceFactory(Configurator* config) { |
| 1102 DCHECK(config); | 1102 DCHECK(config); |
| 1103 return new CrxUpdateService(config); | 1103 return new CrxUpdateService(config); |
| 1104 } | 1104 } |
| 1105 | 1105 |
| 1106 } // namespace component_updater | 1106 } // namespace component_updater |
| OLD | NEW |