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

Unified Diff: chrome/browser/chromeos/extensions/wallpaper_private_api.cc

Issue 2017113002: [Extensions] DCHECK that ExtensionFunctions respond (and only once) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/chromeos/extensions/wallpaper_private_api.cc
diff --git a/chrome/browser/chromeos/extensions/wallpaper_private_api.cc b/chrome/browser/chromeos/extensions/wallpaper_private_api.cc
index 2523b82dd1595524d6bddc14792dacfaeb9d2b21..bb5cf3f1406447b713b9431eebedd77ad95f981c 100644
--- a/chrome/browser/chromeos/extensions/wallpaper_private_api.cc
+++ b/chrome/browser/chromeos/extensions/wallpaper_private_api.cc
@@ -725,7 +725,6 @@ bool WallpaperPrivateSetCustomWallpaperLayoutFunction::RunAsync() {
wallpaper_manager->GetLoggedInUserWallpaperInfo(&info);
if (info.type != user_manager::User::CUSTOMIZED) {
SetError("Only custom wallpaper can change layout.");
- SendResponse(false);
return false;
}
info.layout = wallpaper_api_util::GetLayoutEnum(
@@ -751,10 +750,11 @@ WallpaperPrivateMinimizeInactiveWindowsFunction::
~WallpaperPrivateMinimizeInactiveWindowsFunction() {
}
-bool WallpaperPrivateMinimizeInactiveWindowsFunction::RunAsync() {
+ExtensionFunction::ResponseAction
+WallpaperPrivateMinimizeInactiveWindowsFunction::Run() {
WindowStateManager::MinimizeInactiveWindows(
user_manager::UserManager::Get()->GetActiveUser()->username_hash());
- return true;
+ return RespondNow(NoArguments());
}
WallpaperPrivateRestoreMinimizedWindowsFunction::
@@ -765,10 +765,11 @@ WallpaperPrivateRestoreMinimizedWindowsFunction::
~WallpaperPrivateRestoreMinimizedWindowsFunction() {
}
-bool WallpaperPrivateRestoreMinimizedWindowsFunction::RunAsync() {
+ExtensionFunction::ResponseAction
+WallpaperPrivateRestoreMinimizedWindowsFunction::Run() {
WindowStateManager::RestoreWindows(
user_manager::UserManager::Get()->GetActiveUser()->username_hash());
- return true;
+ return RespondNow(NoArguments());
}
WallpaperPrivateGetThumbnailFunction::WallpaperPrivateGetThumbnailFunction() {
@@ -791,7 +792,6 @@ bool WallpaperPrivateGetThumbnailFunction::RunAsync() {
} else {
if (!IsOEMDefaultWallpaper()) {
SetError("No OEM wallpaper.");
- SendResponse(false);
return false;
}

Powered by Google App Engine
This is Rietveld 408576698