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

Unified Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc

Issue 2769323002: mash: Update shelf pin prefs in ShelfModelObserver overrides. (Closed)
Patch Set: Use ScopedPinSyncDisabler name suggestion. Created 3 years, 9 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/ui/ash/launcher/chrome_launcher_controller.cc
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
index 51355bcb57bd5dd6c755898c4e0fdd582bf3b799..cdc19ee7d9add07c09bc38fb83692d11846a4e24 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
@@ -5,7 +5,6 @@
#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
#include "ash/public/interfaces/constants.mojom.h"
-#include "base/auto_reset.h"
#include "base/memory/ptr_util.h"
#include "chrome/browser/chromeos/arc/arc_util.h"
#include "chrome/browser/extensions/extension_app_icon_loader.h"
@@ -102,6 +101,14 @@ void ChromeLauncherController::SetShelfBehaviorsFromPrefs() {
SetShelfAlignmentFromPrefs();
}
+ChromeLauncherController::ScopedPinSyncDisabler
+ChromeLauncherController::GetScopedPinSyncDisabler() {
+ // Only one temporary disabler should not exist at a time.
+ DCHECK(should_sync_pin_changes_);
+ return base::MakeUnique<base::AutoReset<bool>>(&should_sync_pin_changes_,
+ false);
+}
+
void ChromeLauncherController::SetLauncherControllerHelperForTest(
std::unique_ptr<LauncherControllerHelper> helper) {
launcher_controller_helper_ = std::move(helper);

Powered by Google App Engine
This is Rietveld 408576698