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

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

Issue 16295003: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 7 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: chrome/browser/extensions/crx_installer.cc
diff --git a/chrome/browser/extensions/crx_installer.cc b/chrome/browser/extensions/crx_installer.cc
index a77682159a60b49d83af8ffb4931a9f44e879b28..aa6e3eab2ec696b9b8a74e8b14933b132a037a89 100644
--- a/chrome/browser/extensions/crx_installer.cc
+++ b/chrome/browser/extensions/crx_installer.cc
@@ -143,14 +143,13 @@ void CrxInstaller::InstallCrx(const base::FilePath& source_file) {
source_file_ = source_file;
scoped_refptr<SandboxedUnpacker> unpacker(
- new SandboxedUnpacker(
- source_file,
- content::ResourceDispatcherHost::Get() != NULL,
- install_source_,
- creation_flags_,
- install_directory_,
- installer_task_runner_,
- this));
+ new SandboxedUnpacker(source_file,
+ content::ResourceDispatcherHost::Get() != NULL,
+ install_source_,
+ creation_flags_,
+ install_directory_,
+ installer_task_runner_.get(),
+ this));
if (!installer_task_runner_->PostTask(
FROM_HERE,
@@ -175,12 +174,12 @@ void CrxInstaller::ConvertUserScriptOnFileThread() {
string16 error;
scoped_refptr<Extension> extension = ConvertUserScriptToExtension(
source_file_, download_url_, install_directory_, &error);
- if (!extension) {
+ if (!extension.get()) {
ReportFailureFromFileThread(CrxInstallerError(error));
return;
}
- OnUnpackSuccess(extension->path(), extension->path(), NULL, extension);
+ OnUnpackSuccess(extension->path(), extension->path(), NULL, extension.get());
}
void CrxInstaller::InstallWebApp(const WebApplicationInfo& web_app) {
@@ -199,7 +198,7 @@ void CrxInstaller::ConvertWebAppOnFileThread(
string16 error;
scoped_refptr<Extension> extension(
ConvertWebAppToExtension(web_app, base::Time::Now(), install_directory));
- if (!extension) {
+ if (!extension.get()) {
// Validation should have stopped any potential errors before getting here.
NOTREACHED() << "Could not convert web app to extension.";
return;
@@ -207,7 +206,7 @@ void CrxInstaller::ConvertWebAppOnFileThread(
// TODO(aa): conversion data gets lost here :(
- OnUnpackSuccess(extension->path(), extension->path(), NULL, extension);
+ OnUnpackSuccess(extension->path(), extension->path(), NULL, extension.get());
}
CrxInstallerError CrxInstaller::AllowInstall(const Extension* extension) {
« no previous file with comments | « chrome/browser/extensions/convert_web_app_unittest.cc ('k') | chrome/browser/extensions/event_router_forwarder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698