Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(335)

Unified Diff: components/component_updater/default_component_installer.cc

Issue 2205693004: Rename and repurpose ComponentInstallerTraits::CanAutoUpdate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cus-gp
Patch Set: rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/component_updater/default_component_installer.cc
diff --git a/components/component_updater/default_component_installer.cc b/components/component_updater/default_component_installer.cc
index 4853b082ac14874b291a0a6116b2deb3003e23f7..3a0b9b778b845468f23cbd09454db360e5f21c58 100644
--- a/components/component_updater/default_component_installer.cc
+++ b/components/component_updater/default_component_installer.cc
@@ -325,27 +325,25 @@ void DefaultComponentInstaller::FinishRegistration(
VLOG(1) << __func__ << " for " << installer_traits_->GetName();
DCHECK(thread_checker_.CalledOnValidThread());
- if (installer_traits_->CanAutoUpdate()) {
- CrxComponent crx;
- installer_traits_->GetHash(&crx.pk_hash);
- crx.installer = this;
- crx.version = current_version_;
- crx.fingerprint = current_fingerprint_;
- crx.name = installer_traits_->GetName();
- crx.installer_attributes = installer_traits_->GetInstallerAttributes();
- crx.requires_network_encryption =
- installer_traits_->RequiresNetworkEncryption();
- crx.handled_mime_types = installer_traits_->GetMimeTypes();
- if (!cus->RegisterComponent(crx)) {
- LOG(ERROR) << "Component registration failed for "
- << installer_traits_->GetName();
- return;
- }
-
- if (!callback.is_null())
- callback.Run();
+ CrxComponent crx;
+ installer_traits_->GetHash(&crx.pk_hash);
+ crx.installer = this;
+ crx.version = current_version_;
+ crx.fingerprint = current_fingerprint_;
+ crx.name = installer_traits_->GetName();
+ crx.installer_attributes = installer_traits_->GetInstallerAttributes();
+ crx.requires_network_encryption =
+ installer_traits_->RequiresNetworkEncryption();
+ crx.handled_mime_types = installer_traits_->GetMimeTypes();
+ if (!cus->RegisterComponent(crx)) {
+ LOG(ERROR) << "Component registration failed for "
+ << installer_traits_->GetName();
+ return;
}
+ if (!callback.is_null())
+ callback.Run();
+
if (!current_manifest_) {
DVLOG(1) << "No component found for " << installer_traits_->GetName();
return;

Powered by Google App Engine
This is Rietveld 408576698