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

Side by Side Diff: components/component_updater/default_component_installer.cc

Issue 2292463004: Fix DefaultComponentInstaller::FinishRegistration and group policy. (Closed)
Patch Set: nop Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | components/component_updater/default_component_installer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 CrxComponent crx; 328 CrxComponent crx;
329 installer_traits_->GetHash(&crx.pk_hash); 329 installer_traits_->GetHash(&crx.pk_hash);
330 crx.installer = this; 330 crx.installer = this;
331 crx.version = current_version_; 331 crx.version = current_version_;
332 crx.fingerprint = current_fingerprint_; 332 crx.fingerprint = current_fingerprint_;
333 crx.name = installer_traits_->GetName(); 333 crx.name = installer_traits_->GetName();
334 crx.installer_attributes = installer_traits_->GetInstallerAttributes(); 334 crx.installer_attributes = installer_traits_->GetInstallerAttributes();
335 crx.requires_network_encryption = 335 crx.requires_network_encryption =
336 installer_traits_->RequiresNetworkEncryption(); 336 installer_traits_->RequiresNetworkEncryption();
337 crx.handled_mime_types = installer_traits_->GetMimeTypes(); 337 crx.handled_mime_types = installer_traits_->GetMimeTypes();
338 crx.supports_group_policy_enable_component_updates =
339 installer_traits_->SupportsGroupPolicyEnabledComponentUpdates();
340
338 if (!cus->RegisterComponent(crx)) { 341 if (!cus->RegisterComponent(crx)) {
339 LOG(ERROR) << "Component registration failed for " 342 LOG(ERROR) << "Component registration failed for "
340 << installer_traits_->GetName(); 343 << installer_traits_->GetName();
341 return; 344 return;
342 } 345 }
343 346
344 if (!callback.is_null()) 347 if (!callback.is_null())
345 callback.Run(); 348 callback.Run();
346 349
347 if (!current_manifest_) { 350 if (!current_manifest_) {
348 DVLOG(1) << "No component found for " << installer_traits_->GetName(); 351 DVLOG(1) << "No component found for " << installer_traits_->GetName();
349 return; 352 return;
350 } 353 }
351 354
352 std::unique_ptr<base::DictionaryValue> manifest_copy( 355 std::unique_ptr<base::DictionaryValue> manifest_copy(
353 current_manifest_->DeepCopy()); 356 current_manifest_->DeepCopy());
354 ComponentReady(std::move(manifest_copy)); 357 ComponentReady(std::move(manifest_copy));
355 } 358 }
356 359
357 void DefaultComponentInstaller::ComponentReady( 360 void DefaultComponentInstaller::ComponentReady(
358 std::unique_ptr<base::DictionaryValue> manifest) { 361 std::unique_ptr<base::DictionaryValue> manifest) {
359 VLOG(1) << "Component ready, version " << current_version_.GetString() 362 VLOG(1) << "Component ready, version " << current_version_.GetString()
360 << " in " << current_install_dir_.value(); 363 << " in " << current_install_dir_.value();
361 installer_traits_->ComponentReady(current_version_, current_install_dir_, 364 installer_traits_->ComponentReady(current_version_, current_install_dir_,
362 std::move(manifest)); 365 std::move(manifest));
363 } 366 }
364 367
365 } // namespace component_updater 368 } // namespace component_updater
OLDNEW
« no previous file with comments | « no previous file | components/component_updater/default_component_installer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698