Commit c382b8a5 authored by benwells@chromium.org's avatar benwells@chromium.org

[win] Remove app launcher install calls from app shortcut manager.

The launcher install is now done by the webstore, so this code is no longer
needed.

BUG=None


Review URL: https://chromiumcodereview.appspot.com/12208146

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182179 0039d316-1c4b-4281-b951-d872f2087c98
parent 0665ebe6
......@@ -22,11 +22,6 @@
#include "skia/ext/image_operations.h"
#include "ui/base/resource/resource_bundle.h"
#if defined(OS_WIN)
#include "chrome/browser/extensions/app_host_installer_win.h"
#include "chrome/installer/util/browser_distribution.h"
#endif
namespace extensions {
AppShortcutManager::AppShortcutManager(Profile* profile)
......@@ -50,20 +45,8 @@ void AppShortcutManager::Observe(int type,
details).ptr();
if (extension->is_platform_app() &&
extension->location() != Manifest::COMPONENT) {
#if defined(OS_WIN)
if (BrowserDistribution::GetDistribution()->AppHostIsSupported() &&
extensions::AppHostInstaller::GetInstallWithLauncher()) {
scoped_refptr<Extension> extension_ref(const_cast<Extension*>(
extension));
extensions::AppHostInstaller::EnsureAppHostInstalled(
base::Bind(&AppShortcutManager::OnAppHostInstallationComplete,
weak_factory_.GetWeakPtr(), extension_ref));
} else {
UpdateApplicationShortcuts(extension);
}
#else
UpdateApplicationShortcuts(extension);
#endif // defined(OS_WIN)
web_app::UpdateShortcutInfoAndIconForApp(*extension, profile_,
base::Bind(&web_app::UpdateAllShortcuts));
}
#endif // !defined(OS_MACOSX)
break;
......@@ -79,24 +62,6 @@ void AppShortcutManager::Observe(int type,
}
}
#if defined(OS_WIN)
void AppShortcutManager::OnAppHostInstallationComplete(
scoped_refptr<Extension> extension, bool app_host_install_success) {
if (!app_host_install_success) {
// Do not create shortcuts if App Host fails to install.
LOG(ERROR) << "Application Runtime installation failed.";
return;
}
UpdateApplicationShortcuts(extension);
}
#endif
void AppShortcutManager::UpdateApplicationShortcuts(
const Extension* extension) {
web_app::UpdateShortcutInfoAndIconForApp(*extension, profile_,
base::Bind(&web_app::UpdateAllShortcuts));
}
void AppShortcutManager::DeleteApplicationShortcuts(
const Extension* extension) {
ShellIntegration::ShortcutInfo delete_info =
......
......@@ -28,13 +28,6 @@ class AppShortcutManager : public content::NotificationObserver {
const content::NotificationDetails& details) OVERRIDE;
private:
void UpdateApplicationShortcuts(const Extension* extension);
#if defined(OS_WIN)
void OnAppHostInstallationComplete(scoped_refptr<Extension> extension,
bool app_host_install_success);
#endif
void DeleteApplicationShortcuts(const Extension* extension);
content::NotificationRegistrar registrar_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment