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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 VLOG(1) << __FUNCTION__ << " for " << installer_traits_->GetName(); | 325 VLOG(1) << __FUNCTION__ << " for " << installer_traits_->GetName(); |
326 DCHECK(thread_checker_.CalledOnValidThread()); | 326 DCHECK(thread_checker_.CalledOnValidThread()); |
327 | 327 |
328 if (installer_traits_->CanAutoUpdate()) { | 328 if (installer_traits_->CanAutoUpdate()) { |
329 CrxComponent crx; | 329 CrxComponent crx; |
330 installer_traits_->GetHash(&crx.pk_hash); | 330 installer_traits_->GetHash(&crx.pk_hash); |
331 crx.installer = this; | 331 crx.installer = this; |
332 crx.version = current_version_; | 332 crx.version = current_version_; |
333 crx.fingerprint = current_fingerprint_; | 333 crx.fingerprint = current_fingerprint_; |
334 crx.name = installer_traits_->GetName(); | 334 crx.name = installer_traits_->GetName(); |
335 crx.ap = installer_traits_->GetAp(); | 335 crx.installer_attributes = installer_traits_->GetInstallerAttributes(); |
336 crx.requires_network_encryption = | 336 crx.requires_network_encryption = |
337 installer_traits_->RequiresNetworkEncryption(); | 337 installer_traits_->RequiresNetworkEncryption(); |
338 if (!cus->RegisterComponent(crx)) { | 338 if (!cus->RegisterComponent(crx)) { |
339 LOG(ERROR) << "Component registration failed for " | 339 LOG(ERROR) << "Component registration failed for " |
340 << installer_traits_->GetName(); | 340 << installer_traits_->GetName(); |
341 return; | 341 return; |
342 } | 342 } |
343 | 343 |
344 if (!callback.is_null()) | 344 if (!callback.is_null()) |
345 callback.Run(); | 345 callback.Run(); |
(...skipping 11 matching lines...) Expand all Loading... |
357 | 357 |
358 void DefaultComponentInstaller::ComponentReady( | 358 void DefaultComponentInstaller::ComponentReady( |
359 std::unique_ptr<base::DictionaryValue> manifest) { | 359 std::unique_ptr<base::DictionaryValue> manifest) { |
360 VLOG(1) << "Component ready, version " << current_version_.GetString() | 360 VLOG(1) << "Component ready, version " << current_version_.GetString() |
361 << " in " << current_install_dir_.value(); | 361 << " in " << current_install_dir_.value(); |
362 installer_traits_->ComponentReady(current_version_, current_install_dir_, | 362 installer_traits_->ComponentReady(current_version_, current_install_dir_, |
363 std::move(manifest)); | 363 std::move(manifest)); |
364 } | 364 } |
365 | 365 |
366 } // namespace component_updater | 366 } // namespace component_updater |
OLD | NEW |