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

Unified Diff: chrome/browser/extensions/api/webstore_private/webstore_private_api.cc

Issue 12207104: Refactor app_list_util.h into AppListService abstract base. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stray newline Created 7 years, 10 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/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 0e424b48ddc5c12c25ae07d9d603b40217c94c2b..616252b37608e6154b7eb4c64dc9fa7f5d3f0530 100644
--- a/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc
+++ b/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc
@@ -27,7 +27,7 @@
#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/browser/ui/app_list/app_list_service.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension_constants.h"
@@ -472,15 +472,13 @@ 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.
- chrome::NotifyAppListOfBeginExtensionInstall(
+ AppListService::Get()->OnBeginExtensionInstall(
profile(), id, name, approval_->installing_icon);
-#endif
}
// The extension will install through the normal extension install flow, but
@@ -507,9 +505,7 @@ void CompleteInstallFunction::OnExtensionInstallFailure(
const std::string& id,
const std::string& error,
WebstoreInstaller::FailureReason reason) {
-#if defined(ENABLE_APP_LIST)
- chrome::NotifyAppListOfExtensionInstallFailure(profile(), id);
-#endif
+ AppListService::Get()->OnExtensionInstallFailure(profile(), id);
if (test_webstore_installer_delegate) {
test_webstore_installer_delegate->OnExtensionInstallFailure(
id, error, reason);
@@ -525,10 +521,8 @@ void CompleteInstallFunction::OnExtensionInstallFailure(
void CompleteInstallFunction::OnExtensionDownloadProgress(
const std::string& id,
content::DownloadItem* item) {
-#if defined(ENABLE_APP_LIST)
- chrome::NotifyAppListOfDownloadProgress(profile(), id,
- item->PercentComplete());
-#endif
+ AppListService::Get()->OnDownloadProgress(
+ profile(), id, item->PercentComplete());
}
bool GetBrowserLoginFunction::RunImpl() {

Powered by Google App Engine
This is Rietveld 408576698