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

Unified Diff: chrome/browser/apps/ephemeral_app_launcher.cc

Issue 507483003: Remove implicit conversions from scoped_refptr to T* in chrome/browser/apps/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile error and propagate rewrites Created 6 years, 4 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/apps/ephemeral_app_launcher.cc
diff --git a/chrome/browser/apps/ephemeral_app_launcher.cc b/chrome/browser/apps/ephemeral_app_launcher.cc
index 51b1908b91a73b2fd5491bff6c7948decaa1fcae..fb7a047f539318ae71299ce90ced2625cd846f8d 100644
--- a/chrome/browser/apps/ephemeral_app_launcher.cc
+++ b/chrome/browser/apps/ephemeral_app_launcher.cc
@@ -319,7 +319,7 @@ void EphemeralAppLauncher::CheckEphemeralInstallPermitted() {
install_checker_ = CreateInstallChecker();
DCHECK(install_checker_.get());
- install_checker_->set_extension(extension);
+ install_checker_->set_extension(extension.get());
install_checker_->Start(ExtensionInstallChecker::CHECK_BLACKLIST |
ExtensionInstallChecker::CHECK_REQUIREMENTS,
true,
@@ -404,15 +404,15 @@ bool EphemeralAppLauncher::CheckRequestorPermitted(
}
void EphemeralAppLauncher::OnManifestParsed() {
- const Extension* extension = GetLocalizedExtensionForDisplay();
- if (!extension) {
+ scoped_refptr<const Extension> extension = GetLocalizedExtensionForDisplay();
+ if (!extension.get()) {
AbortLaunch(webstore_install::INVALID_MANIFEST, kInvalidManifestError);
return;
}
webstore_install::Result result = webstore_install::OTHER_ERROR;
std::string error;
- if (!CheckCommonLaunchCriteria(profile(), extension, &result, &error)) {
+ if (!CheckCommonLaunchCriteria(profile(), extension.get(), &result, &error)) {
AbortLaunch(result, error);
return;
}
@@ -426,7 +426,7 @@ void EphemeralAppLauncher::OnManifestParsed() {
if (extension->is_hosted_app()) {
// Hosted apps do not need to be installed ephemerally. Just navigate to
// their launch url.
- if (LaunchHostedApp(extension))
+ if (LaunchHostedApp(extension.get()))
AbortLaunch(webstore_install::SUCCESS, std::string());
else
AbortLaunch(webstore_install::INVALID_MANIFEST, kInvalidManifestError);
« no previous file with comments | « chrome/browser/apps/drive/drive_app_provider_browsertest.cc ('k') | chrome/browser/apps/ephemeral_app_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698