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

Unified Diff: chrome/browser/extensions/sandboxed_unpacker.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/sandboxed_unpacker.cc
diff --git a/chrome/browser/extensions/sandboxed_unpacker.cc b/chrome/browser/extensions/sandboxed_unpacker.cc
index b0a4ee7b97cddb6095ea678236bbf0eb6ab206a9..d32455db550aa8bf794a7444cb79ffe448ba68d6 100644
--- a/chrome/browser/extensions/sandboxed_unpacker.cc
+++ b/chrome/browser/extensions/sandboxed_unpacker.cc
@@ -328,8 +328,8 @@ void SandboxedUnpacker::OnProcessCrashed(int exit_code) {
void SandboxedUnpacker::StartProcessOnIOThread(
const base::FilePath& temp_crx_path) {
- UtilityProcessHost* host = UtilityProcessHost::Create(
- this, unpacker_io_task_runner_);
+ UtilityProcessHost* host =
+ UtilityProcessHost::Create(this, unpacker_io_task_runner_.get());
// Grant the subprocess access to the entire subdir the extension file is
// in, so that it can unpack to that dir.
host->SetExposedDir(temp_crx_path.DirName());
@@ -375,11 +375,9 @@ void SandboxedUnpacker::OnUnpackExtensionSucceeded(
Extension::REQUIRE_KEY | creation_flags_,
&utf8_error);
-
- if (!extension_) {
- ReportFailure(
- INVALID_MANIFEST,
- ASCIIToUTF16("Manifest is invalid: " + utf8_error));
+ if (!extension_.get()) {
+ ReportFailure(INVALID_MANIFEST,
+ ASCIIToUTF16("Manifest is invalid: " + utf8_error));
return;
}
@@ -582,10 +580,8 @@ void SandboxedUnpacker::ReportSuccess(
crx_path_, base::TimeTicks::Now() - unpack_start_time_);
// Client takes ownership of temporary directory and extension.
- client_->OnUnpackSuccess(temp_dir_.Take(),
- extension_root_,
- &original_manifest,
- extension_);
+ client_->OnUnpackSuccess(
+ temp_dir_.Take(), extension_root_, &original_manifest, extension_.get());
extension_ = NULL;
}
@@ -642,7 +638,7 @@ bool SandboxedUnpacker::RewriteImageFiles() {
// out our own versions of the parsed images, and we want to make sure the
// originals are gone for good.
std::set<base::FilePath> image_paths =
- extension_file_util::GetBrowserImagePaths(extension_);
+ extension_file_util::GetBrowserImagePaths(extension_.get());
if (image_paths.size() != images.size()) {
// Decoded images don't match what's in the manifest.
ReportFailure(
« no previous file with comments | « chrome/browser/extensions/requirements_checker.cc ('k') | chrome/browser/extensions/script_badge_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698