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

Unified Diff: chrome/browser/extensions/unpacked_installer.cc

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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
« no previous file with comments | « chrome/browser/extensions/tab_helper.cc ('k') | chrome/browser/extensions/updater/extension_updater.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/unpacked_installer.cc
diff --git a/chrome/browser/extensions/unpacked_installer.cc b/chrome/browser/extensions/unpacked_installer.cc
index 0cc8be43d1852e83cf7716f27349caa9a310fe17..b394f000b67b10ab1161362c908f1459992b4cb1 100644
--- a/chrome/browser/extensions/unpacked_installer.cc
+++ b/chrome/browser/extensions/unpacked_installer.cc
@@ -133,12 +133,9 @@ bool UnpackedInstaller::LoadFromCommandLine(const base::FilePath& path_in,
std::string error;
installer_.set_extension(extension_file_util::LoadExtension(
- extension_path_,
- Manifest::COMMAND_LINE,
- GetFlags(),
- &error));
+ extension_path_, Manifest::COMMAND_LINE, GetFlags(), &error).get());
- if (!installer_.extension()) {
+ if (!installer_.extension().get()) {
ReportExtensionLoadError(error);
return false;
}
@@ -156,12 +153,11 @@ void UnpackedInstaller::ShowInstallPrompt() {
const ExtensionSet* disabled_extensions =
service_weak_->disabled_extensions();
- if (service_weak_->show_extensions_prompts() &&
- prompt_for_plugins_ &&
- PluginInfo::HasPlugins(installer_.extension()) &&
+ if (service_weak_->show_extensions_prompts() && prompt_for_plugins_ &&
+ PluginInfo::HasPlugins(installer_.extension().get()) &&
!disabled_extensions->Contains(installer_.extension()->id())) {
SimpleExtensionLoadPrompt* prompt = new SimpleExtensionLoadPrompt(
- installer_.extension(),
+ installer_.extension().get(),
installer_.profile(),
base::Bind(&UnpackedInstaller::CallCheckRequirements, this));
prompt->ShowPrompt();
@@ -244,12 +240,9 @@ void UnpackedInstaller::LoadWithFileAccess(int flags) {
std::string error;
installer_.set_extension(extension_file_util::LoadExtension(
- extension_path_,
- Manifest::UNPACKED,
- flags,
- &error));
+ extension_path_, Manifest::UNPACKED, flags, &error).get());
- if (!installer_.extension()) {
+ if (!installer_.extension().get()) {
BrowserThread::PostTask(
BrowserThread::UI,
FROM_HERE,
@@ -279,13 +272,12 @@ void UnpackedInstaller::ConfirmInstall() {
}
PermissionsUpdater perms_updater(service_weak_->profile());
- perms_updater.GrantActivePermissions(installer_.extension());
+ perms_updater.GrantActivePermissions(installer_.extension().get());
- service_weak_->OnExtensionInstalled(
- installer_.extension(),
- syncer::StringOrdinal(),
- false /* no requirement errors */,
- false /* don't wait for idle */);
+ service_weak_->OnExtensionInstalled(installer_.extension().get(),
+ syncer::StringOrdinal(),
+ false /* no requirement errors */,
+ false /* don't wait for idle */);
}
} // namespace extensions
« no previous file with comments | « chrome/browser/extensions/tab_helper.cc ('k') | chrome/browser/extensions/updater/extension_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698