| 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/component_updater/default_component_installer.h" | 5 #include "components/component_updater/default_component_installer.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 .AppendASCII(current_version_.GetString()); | 253 .AppendASCII(current_version_.GetString()); |
| 254 } | 254 } |
| 255 | 255 |
| 256 void DefaultComponentInstaller::FinishRegistration( | 256 void DefaultComponentInstaller::FinishRegistration( |
| 257 ComponentUpdateService* cus, | 257 ComponentUpdateService* cus, |
| 258 const base::Closure& callback) { | 258 const base::Closure& callback) { |
| 259 DCHECK(thread_checker_.CalledOnValidThread()); | 259 DCHECK(thread_checker_.CalledOnValidThread()); |
| 260 if (installer_traits_->CanAutoUpdate()) { | 260 if (installer_traits_->CanAutoUpdate()) { |
| 261 CrxComponent crx; | 261 CrxComponent crx; |
| 262 crx.name = installer_traits_->GetName(); | 262 crx.name = installer_traits_->GetName(); |
| 263 crx.requires_network_encryption = |
| 264 installer_traits_->RequiresNetworkEncryption(); |
| 263 crx.installer = this; | 265 crx.installer = this; |
| 264 crx.version = current_version_; | 266 crx.version = current_version_; |
| 265 crx.fingerprint = current_fingerprint_; | 267 crx.fingerprint = current_fingerprint_; |
| 266 installer_traits_->GetHash(&crx.pk_hash); | 268 installer_traits_->GetHash(&crx.pk_hash); |
| 267 if (!cus->RegisterComponent(crx)) { | 269 if (!cus->RegisterComponent(crx)) { |
| 268 NOTREACHED() << "Component registration failed for " | 270 NOTREACHED() << "Component registration failed for " |
| 269 << installer_traits_->GetName(); | 271 << installer_traits_->GetName(); |
| 270 return; | 272 return; |
| 271 } | 273 } |
| 272 | 274 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 283 } | 285 } |
| 284 | 286 |
| 285 void DefaultComponentInstaller::ComponentReady( | 287 void DefaultComponentInstaller::ComponentReady( |
| 286 scoped_ptr<base::DictionaryValue> manifest) { | 288 scoped_ptr<base::DictionaryValue> manifest) { |
| 287 VLOG(1) << "ComponentReady"; | 289 VLOG(1) << "ComponentReady"; |
| 288 installer_traits_->ComponentReady(current_version_, GetInstallDirectory(), | 290 installer_traits_->ComponentReady(current_version_, GetInstallDirectory(), |
| 289 std::move(manifest)); | 291 std::move(manifest)); |
| 290 } | 292 } |
| 291 | 293 |
| 292 } // namespace component_updater | 294 } // namespace component_updater |
| OLD | NEW |