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

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

Issue 16172005: Clean up async app launcher enabled checks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test Created 7 years, 6 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 ebee14eafb30ae17443bf03f9be3d545f2e3a1a0..22d7a0a982812250abd069cf6c03bfcf009dad61 100644
--- a/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc
+++ b/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc
@@ -512,15 +512,8 @@ bool CompleteInstallFunction::RunImpl() {
void CompleteInstallFunction::AfterMaybeInstallAppLauncher(bool ok) {
if (!ok)
LOG(ERROR) << "Error installing app launcher";
- apps::GetIsAppLauncherEnabled(base::Bind(
- &CompleteInstallFunction::OnGetAppLauncherEnabled, this,
- approval_->extension_id));
-}
-
-void CompleteInstallFunction::OnGetAppLauncherEnabled(
- std::string id,
- bool app_launcher_enabled) {
- if (app_launcher_enabled) {
+ std::string id = approval_->extension_id;
+ if (apps::IsAppLauncherEnabled()) {
std::string name;
if (!approval_->manifest->value()->GetString(extension_manifest_keys::kName,
&name)) {
@@ -644,14 +637,9 @@ void GetWebGLStatusFunction::OnFeatureCheck(bool feature_allowed) {
}
bool GetIsLauncherEnabledFunction::RunImpl() {
- apps::GetIsAppLauncherEnabled(base::Bind(
- &GetIsLauncherEnabledFunction::OnIsLauncherCheckCompleted, this));
- return true;
-}
-
-void GetIsLauncherEnabledFunction::OnIsLauncherCheckCompleted(bool is_enabled) {
- SetResult(Value::CreateBooleanValue(is_enabled));
+ SetResult(Value::CreateBooleanValue(apps::IsAppLauncherEnabled()));
SendResponse(true);
+ return true;
}
} // namespace extensions
« no previous file with comments | « chrome/browser/extensions/api/webstore_private/webstore_private_api.h ('k') | chrome/browser/ui/bookmarks/bookmark_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698