Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / apps / ephemeral_app_launcher.cc
index 51b1908..ae4b13b 100644 (file)
@@ -291,7 +291,7 @@ bool EphemeralAppLauncher::LaunchHostedApp(const Extension* extension) const {
   chrome::ScopedTabbedBrowserDisplayer displayer(
       profile(), chrome::GetHostDesktopTypeForNativeWindow(parent_window_));
   chrome::NavigateParams params(
-      displayer.browser(), launch_url, content::PAGE_TRANSITION_AUTO_TOPLEVEL);
+      displayer.browser(), launch_url, ui::PAGE_TRANSITION_AUTO_TOPLEVEL);
   params.disposition = NEW_FOREGROUND_TAB;
   chrome::Navigate(&params);
   return 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);