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

Side by Side Diff: chrome/browser/component_updater/supervised_user_whitelist_installer.cc

Issue 1551503002: Convert Pass()→std::move() in //chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
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 "chrome/browser/component_updater/supervised_user_whitelist_installer.h " 5 #include "chrome/browser/component_updater/supervised_user_whitelist_installer.h "
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility>
8 9
9 #include "base/bind.h" 10 #include "base/bind.h"
10 #include "base/callback.h" 11 #include "base/callback.h"
11 #include "base/files/file_enumerator.h" 12 #include "base/files/file_enumerator.h"
12 #include "base/files/file_path.h" 13 #include "base/files/file_path.h"
13 #include "base/files/file_util.h" 14 #include "base/files/file_util.h"
14 #include "base/files/important_file_writer.h" 15 #include "base/files/important_file_writer.h"
15 #include "base/location.h" 16 #include "base/location.h"
16 #include "base/macros.h" 17 #include "base/macros.h"
17 #include "base/memory/weak_ptr.h" 18 #include "base/memory/weak_ptr.h"
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 void SupervisedUserWhitelistInstallerImpl::RegisterComponent( 347 void SupervisedUserWhitelistInstallerImpl::RegisterComponent(
347 const std::string& crx_id, 348 const std::string& crx_id,
348 const std::string& name, 349 const std::string& name,
349 const base::Closure& callback) { 350 const base::Closure& callback) {
350 scoped_ptr<ComponentInstallerTraits> traits( 351 scoped_ptr<ComponentInstallerTraits> traits(
351 new SupervisedUserWhitelistComponentInstallerTraits( 352 new SupervisedUserWhitelistComponentInstallerTraits(
352 crx_id, name, 353 crx_id, name,
353 base::Bind(&SupervisedUserWhitelistInstallerImpl::OnRawWhitelistReady, 354 base::Bind(&SupervisedUserWhitelistInstallerImpl::OnRawWhitelistReady,
354 weak_ptr_factory_.GetWeakPtr(), crx_id))); 355 weak_ptr_factory_.GetWeakPtr(), crx_id)));
355 scoped_refptr<DefaultComponentInstaller> installer( 356 scoped_refptr<DefaultComponentInstaller> installer(
356 new DefaultComponentInstaller(traits.Pass())); 357 new DefaultComponentInstaller(std::move(traits)));
357 installer->Register(cus_, callback); 358 installer->Register(cus_, callback);
358 } 359 }
359 360
360 void SupervisedUserWhitelistInstallerImpl::RegisterNewComponent( 361 void SupervisedUserWhitelistInstallerImpl::RegisterNewComponent(
361 const std::string& crx_id, 362 const std::string& crx_id,
362 const std::string& name) { 363 const std::string& name) {
363 RegisterComponent( 364 RegisterComponent(
364 crx_id, name, 365 crx_id, name,
365 base::Bind(&SupervisedUserWhitelistInstaller::TriggerComponentUpdate, 366 base::Bind(&SupervisedUserWhitelistInstaller::TriggerComponentUpdate,
366 &cus_->GetOnDemandUpdater(), crx_id)); 367 &cus_->GetOnDemandUpdater(), crx_id));
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 573
573 // static 574 // static
574 void SupervisedUserWhitelistInstaller::TriggerComponentUpdate( 575 void SupervisedUserWhitelistInstaller::TriggerComponentUpdate(
575 OnDemandUpdater* updater, 576 OnDemandUpdater* updater,
576 const std::string& crx_id) { 577 const std::string& crx_id) {
577 const bool result = updater->OnDemandUpdate(crx_id); 578 const bool result = updater->OnDemandUpdate(crx_id);
578 DCHECK(result); 579 DCHECK(result);
579 } 580 }
580 581
581 } // namespace component_updater 582 } // namespace component_updater
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698