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 @@ ...@@ -22,11 +22,6 @@
#include "skia/ext/image_operations.h" #include "skia/ext/image_operations.h"
#include "ui/base/resource/resource_bundle.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 { namespace extensions {
AppShortcutManager::AppShortcutManager(Profile* profile) AppShortcutManager::AppShortcutManager(Profile* profile)
...@@ -50,20 +45,8 @@ void AppShortcutManager::Observe(int type, ...@@ -50,20 +45,8 @@ void AppShortcutManager::Observe(int type,
details).ptr(); details).ptr();
if (extension->is_platform_app() && if (extension->is_platform_app() &&
extension->location() != Manifest::COMPONENT) { extension->location() != Manifest::COMPONENT) {
#if defined(OS_WIN) web_app::UpdateShortcutInfoAndIconForApp(*extension, profile_,
if (BrowserDistribution::GetDistribution()->AppHostIsSupported() && base::Bind(&web_app::UpdateAllShortcuts));
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)
} }
#endif // !defined(OS_MACOSX) #endif // !defined(OS_MACOSX)
break; break;
...@@ -79,24 +62,6 @@ void AppShortcutManager::Observe(int type, ...@@ -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( void AppShortcutManager::DeleteApplicationShortcuts(
const Extension* extension) { const Extension* extension) {
ShellIntegration::ShortcutInfo delete_info = ShellIntegration::ShortcutInfo delete_info =
......
...@@ -28,13 +28,6 @@ class AppShortcutManager : public content::NotificationObserver { ...@@ -28,13 +28,6 @@ class AppShortcutManager : public content::NotificationObserver {
const content::NotificationDetails& details) OVERRIDE; const content::NotificationDetails& details) OVERRIDE;
private: 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); void DeleteApplicationShortcuts(const Extension* extension);
content::NotificationRegistrar registrar_; 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