Chromium Code Reviews| Index: chrome/browser/extensions/api/webstore_private/webstore_private_api.cc |
| diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc b/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc |
| index 8fd924e61bd6aeaa41213bceeb792e04fdbadf60..283aca7e62e38ef1469ff0dd224e8e388a3a8610 100644 |
| --- a/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc |
| +++ b/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc |
| @@ -20,6 +20,8 @@ |
| #include "chrome/browser/extensions/extension_prefs.h" |
| #include "chrome/browser/extensions/extension_service.h" |
| #include "chrome/browser/extensions/extension_system.h" |
| +#include "chrome/browser/extensions/install_tracker.h" |
| +#include "chrome/browser/extensions/install_tracker_factory.h" |
| #include "chrome/browser/extensions/webstore_installer.h" |
| #include "chrome/browser/gpu/gpu_feature_checker.h" |
| #include "chrome/browser/profiles/profile_manager.h" |
| @@ -27,15 +29,16 @@ |
| #include "chrome/browser/signin/token_service_factory.h" |
| #include "chrome/browser/sync/profile_sync_service.h" |
| #include "chrome/browser/sync/profile_sync_service_factory.h" |
| -#include "chrome/browser/ui/app_list/app_list_util.h" |
| #include "chrome/common/chrome_notification_types.h" |
| #include "chrome/common/chrome_switches.h" |
| +#include "chrome/common/extensions/extension.h" |
| #include "chrome/common/extensions/extension_constants.h" |
| #include "chrome/common/extensions/extension_l10n_util.h" |
| #include "chrome/common/extensions/extension_manifest_constants.h" |
| #include "chrome/common/pref_names.h" |
| #include "content/public/browser/gpu_data_manager.h" |
| #include "content/public/browser/notification_details.h" |
| +#include "content/public/browser/notification_service.h" |
|
benwells
2013/02/21 06:15:38
nit: remove notification_service.h
koz (OOO until 15th September)
2013/02/25 02:39:28
Done.
|
| #include "content/public/browser/notification_source.h" |
| #include "content/public/browser/web_contents.h" |
| #include "extensions/common/error_utils.h" |
| @@ -475,17 +478,14 @@ void CompleteInstallFunction::OnGetAppLauncherEnabled( |
| bool app_launcher_enabled) { |
| if (app_launcher_enabled) { |
| std::string name; |
| -#if defined(ENABLE_APP_LIST) |
| if (!approval_->parsed_manifest->GetString(extension_manifest_keys::kName, |
| &name)) { |
| NOTREACHED(); |
| } |
| - // Tell the app list about the install that we just started. |
| - if (is_app_) { |
| - chrome::NotifyAppListOfBeginExtensionInstall( |
| - profile(), id, name, approval_->installing_icon); |
| - } |
| -#endif |
| + extensions::InstallTracker* tracker = |
| + extensions::InstallTrackerFactory::GetForProfile(profile()); |
| + tracker->OnBeginExtensionInstall( |
| + id, name, approval_->installing_icon, is_app_); |
| } |
| // The extension will install through the normal extension install flow, but |
| @@ -512,10 +512,9 @@ void CompleteInstallFunction::OnExtensionInstallFailure( |
| const std::string& id, |
| const std::string& error, |
| WebstoreInstaller::FailureReason reason) { |
| -#if defined(ENABLE_APP_LIST) |
| - if (is_app_) |
| - chrome::NotifyAppListOfExtensionInstallFailure(profile(), id); |
| -#endif |
| + extensions::InstallTracker* tracker = |
| + extensions::InstallTrackerFactory::GetForProfile(profile()); |
| + tracker->OnInstallFailure(id); |
| if (test_webstore_installer_delegate) { |
| test_webstore_installer_delegate->OnExtensionInstallFailure( |
| id, error, reason); |
| @@ -531,12 +530,9 @@ void CompleteInstallFunction::OnExtensionInstallFailure( |
| void CompleteInstallFunction::OnExtensionDownloadProgress( |
| const std::string& id, |
| content::DownloadItem* item) { |
| -#if defined(ENABLE_APP_LIST) |
| - if (is_app_) { |
| - chrome::NotifyAppListOfDownloadProgress(profile(), id, |
| - item->PercentComplete()); |
| - } |
| -#endif |
| + extensions::InstallTracker* tracker = |
| + extensions::InstallTrackerFactory::GetForProfile(profile()); |
| + tracker->OnDownloadProgress(id, item->PercentComplete()); |
| } |
| bool GetBrowserLoginFunction::RunImpl() { |