diff --git a/ash/common/shelf/wm_shelf.cc b/ash/common/shelf/wm_shelf.cc index 75bf105b16d6c..72de8ab0b6881 100644 --- a/ash/common/shelf/wm_shelf.cc +++ b/ash/common/shelf/wm_shelf.cc @@ -58,7 +58,7 @@ class WmShelf::AutoHideEventHandler : public ui::EventHandler { // WmShelf --------------------------------------------------------------------- -WmShelf::WmShelf() : time_last_auto_hide_change_(base::TimeTicks::Now()) {} +WmShelf::WmShelf() {} WmShelf::~WmShelf() {} @@ -213,19 +213,6 @@ void WmShelf::SetAutoHideBehavior(ShelfAutoHideBehavior auto_hide_behavior) { if (auto_hide_behavior_ == auto_hide_behavior) return; - // Force a stack dump when this method is invoked too frequently. - // This block is here temporary to help investigate http://crbug.com/665093 . - constexpr int kAutoHideRepeatInterval = 1000; - constexpr int kMaxAutoHideChanges = 20; - if ((base::TimeTicks::Now() - time_last_auto_hide_change_).InMilliseconds() < - kAutoHideRepeatInterval) { - if (++count_auto_hide_changes_ > kMaxAutoHideChanges) - CHECK(false); - } else { - count_auto_hide_changes_ = 0; - } - time_last_auto_hide_change_ = base::TimeTicks::Now(); - auto_hide_behavior_ = auto_hide_behavior; WmShell::Get()->shelf_controller()->NotifyShelfAutoHideBehaviorChanged(this); WmShell::Get()->NotifyShelfAutoHideBehaviorChanged( diff --git a/ash/common/shelf/wm_shelf.h b/ash/common/shelf/wm_shelf.h index 64b00620ac88c..ee88e94b1525b 100644 --- a/ash/common/shelf/wm_shelf.h +++ b/ash/common/shelf/wm_shelf.h @@ -11,7 +11,6 @@ #include "ash/common/shelf/shelf_layout_manager_observer.h" #include "ash/public/cpp/shelf_types.h" #include "base/observer_list.h" -#include "base/time/time.h" namespace gfx { class Rect; @@ -172,10 +171,6 @@ class ASH_EXPORT WmShelf : public ShelfLayoutManagerObserver { base::ObserverList observers_; - // Temporary. Used to investigate http://crbug.com/665093 . - base::TimeTicks time_last_auto_hide_change_; - int count_auto_hide_changes_ = 0; - // Forwards mouse and gesture events to ShelfLayoutManager for auto-hide. // TODO(mash): Facilitate simliar functionality in mash: crbug.com/631216 std::unique_ptr auto_hide_event_handler_; diff --git a/ash/shelf/shelf_layout_manager_unittest.cc b/ash/shelf/shelf_layout_manager_unittest.cc index 550307ec8f186..b5ee95f461350 100644 --- a/ash/shelf/shelf_layout_manager_unittest.cc +++ b/ash/shelf/shelf_layout_manager_unittest.cc @@ -581,10 +581,6 @@ void ShelfLayoutManagerTest::RunGestureDragTests(gfx::Vector2d delta) { EXPECT_EQ(SHELF_AUTO_HIDE, shelf->GetVisibilityState()); EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->GetAutoHideState()); EXPECT_EQ(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, shelf->auto_hide_behavior()); - - // Avoid a CHECK that makes sure SetAutoHideBehavior is not called too - // frequently. This is to help investigate http://crbug.com/665093 . - shelf->count_auto_hide_changes_ = 0; } // Makes sure SetVisible updates work area and widget appropriately.