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

Side by Side Diff: chrome/browser/extensions/crx_installer.cc

Issue 1549233002: Convert Pass()→std::move() in //chrome/browser/extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/extensions/crx_installer.h" 5 #include "chrome/browser/extensions/crx_installer.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <utility>
9 10
10 #include "base/bind.h" 11 #include "base/bind.h"
11 #include "base/files/file_util.h" 12 #include "base/files/file_util.h"
12 #include "base/files/scoped_temp_dir.h" 13 #include "base/files/scoped_temp_dir.h"
13 #include "base/lazy_instance.h" 14 #include "base/lazy_instance.h"
14 #include "base/macros.h" 15 #include "base/macros.h"
15 #include "base/metrics/histogram.h" 16 #include "base/metrics/histogram.h"
16 #include "base/sequenced_task_runner.h" 17 #include "base/sequenced_task_runner.h"
17 #include "base/strings/string_util.h" 18 #include "base/strings/string_util.h"
18 #include "base/strings/stringprintf.h" 19 #include "base/strings/stringprintf.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 ExtensionService* frontend) { 90 ExtensionService* frontend) {
90 return new CrxInstaller(frontend->AsWeakPtr(), 91 return new CrxInstaller(frontend->AsWeakPtr(),
91 scoped_ptr<ExtensionInstallPrompt>(), 92 scoped_ptr<ExtensionInstallPrompt>(),
92 NULL); 93 NULL);
93 } 94 }
94 95
95 // static 96 // static
96 scoped_refptr<CrxInstaller> CrxInstaller::Create( 97 scoped_refptr<CrxInstaller> CrxInstaller::Create(
97 ExtensionService* frontend, 98 ExtensionService* frontend,
98 scoped_ptr<ExtensionInstallPrompt> client) { 99 scoped_ptr<ExtensionInstallPrompt> client) {
99 return new CrxInstaller(frontend->AsWeakPtr(), client.Pass(), NULL); 100 return new CrxInstaller(frontend->AsWeakPtr(), std::move(client), NULL);
100 } 101 }
101 102
102 // static 103 // static
103 scoped_refptr<CrxInstaller> CrxInstaller::Create( 104 scoped_refptr<CrxInstaller> CrxInstaller::Create(
104 ExtensionService* service, 105 ExtensionService* service,
105 scoped_ptr<ExtensionInstallPrompt> client, 106 scoped_ptr<ExtensionInstallPrompt> client,
106 const WebstoreInstaller::Approval* approval) { 107 const WebstoreInstaller::Approval* approval) {
107 return new CrxInstaller(service->AsWeakPtr(), client.Pass(), approval); 108 return new CrxInstaller(service->AsWeakPtr(), std::move(client), approval);
108 } 109 }
109 110
110 CrxInstaller::CrxInstaller(base::WeakPtr<ExtensionService> service_weak, 111 CrxInstaller::CrxInstaller(base::WeakPtr<ExtensionService> service_weak,
111 scoped_ptr<ExtensionInstallPrompt> client, 112 scoped_ptr<ExtensionInstallPrompt> client,
112 const WebstoreInstaller::Approval* approval) 113 const WebstoreInstaller::Approval* approval)
113 : install_directory_(service_weak->install_directory()), 114 : install_directory_(service_weak->install_directory()),
114 install_source_(Manifest::INTERNAL), 115 install_source_(Manifest::INTERNAL),
115 approved_(false), 116 approved_(false),
116 hash_check_failed_(false), 117 hash_check_failed_(false),
117 expected_manifest_check_level_( 118 expected_manifest_check_level_(
(...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after
916 ExtensionInstallPrompt::GetReEnablePromptTypeForExtension( 917 ExtensionInstallPrompt::GetReEnablePromptTypeForExtension(
917 service->profile(), extension()); 918 service->profile(), extension());
918 client_->ShowDialog( 919 client_->ShowDialog(
919 this, extension(), nullptr, 920 this, extension(), nullptr,
920 make_scoped_ptr(new ExtensionInstallPrompt::Prompt(type)), 921 make_scoped_ptr(new ExtensionInstallPrompt::Prompt(type)),
921 ExtensionInstallPrompt::GetDefaultShowDialogCallback()); 922 ExtensionInstallPrompt::GetDefaultShowDialogCallback());
922 } 923 }
923 } 924 }
924 925
925 } // namespace extensions 926 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/chrome_extensions_browser_client.cc ('k') | chrome/browser/extensions/crx_installer_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698