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

Unified Diff: chrome/browser/ui/toolbar/toolbar_actions_bar.cc

Issue 1086973004: [Extensions Mac] Implement developer mode warning on mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Avi's Created 5 years, 8 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/toolbar/toolbar_actions_bar.cc
diff --git a/chrome/browser/ui/toolbar/toolbar_actions_bar.cc b/chrome/browser/ui/toolbar/toolbar_actions_bar.cc
index 5f423e1964a59f1f4493ece571a608ee5a4af9a2..7a2751a2965b40c314f8e5068591df29dae2fc88 100644
--- a/chrome/browser/ui/toolbar/toolbar_actions_bar.cc
+++ b/chrome/browser/ui/toolbar/toolbar_actions_bar.cc
@@ -717,34 +717,6 @@ void ToolbarActionsBar::OnDragDrop(int dragged_index,
}
}
-bool ToolbarActionsBar::ShouldShowInfoBubble() {
- // If the redesign isn't running, or the user has already acknowledged it,
- // we don't show the bubble.
- PrefService* prefs = browser_->profile()->GetPrefs();
- if (!extensions::FeatureSwitch::extension_action_redesign()->IsEnabled() ||
- (prefs->HasPrefPath(prefs::kToolbarIconSurfacingBubbleAcknowledged) &&
- prefs->GetBoolean(prefs::kToolbarIconSurfacingBubbleAcknowledged)))
- return false;
-
- // We don't show more than once per day.
- if (prefs->HasPrefPath(prefs::kToolbarIconSurfacingBubbleLastShowTime)) {
- base::Time last_shown_time = base::Time::FromInternalValue(
- prefs->GetInt64(prefs::kToolbarIconSurfacingBubbleLastShowTime));
- if (base::Time::Now() - last_shown_time < base::TimeDelta::FromDays(1))
- return false;
- }
-
- if (!model_->RedesignIsShowingNewIcons()) {
- // We only show the bubble if there are any new icons present - otherwise,
- // the user won't see anything different, so we treat it as acknowledged.
- OnToolbarActionsBarBubbleClosed(
- ToolbarActionsBarBubbleDelegate::ACKNOWLEDGED);
- return false;
- }
-
- return true;
-}
-
void ToolbarActionsBar::MaybeShowExtensionBubble() {
scoped_ptr<extensions::ExtensionMessageBubbleController> controller =
ExtensionMessageBubbleFactory(browser_->profile()).GetController();
@@ -923,24 +895,6 @@ Browser* ToolbarActionsBar::GetBrowser() {
return browser_;
}
-void ToolbarActionsBar::OnToolbarActionsBarBubbleShown() {
- // Record the last time the bubble was shown.
- browser_->profile()->GetPrefs()->SetInt64(
- prefs::kToolbarIconSurfacingBubbleLastShowTime,
- base::Time::Now().ToInternalValue());
-}
-
-void ToolbarActionsBar::OnToolbarActionsBarBubbleClosed(CloseAction action) {
- if (action == ToolbarActionsBarBubbleDelegate::ACKNOWLEDGED) {
- PrefService* prefs = browser_->profile()->GetPrefs();
- prefs->SetBoolean(prefs::kToolbarIconSurfacingBubbleAcknowledged, true);
- // Once the bubble is acknowledged, we no longer need to store the last
- // show time.
- if (prefs->HasPrefPath(prefs::kToolbarIconSurfacingBubbleLastShowTime))
- prefs->ClearPref(prefs::kToolbarIconSurfacingBubbleLastShowTime);
- }
-}
-
void ToolbarActionsBar::ReorderActions() {
if (toolbar_actions_.empty())
return;
« no previous file with comments | « chrome/browser/ui/toolbar/toolbar_actions_bar.h ('k') | chrome/browser/ui/toolbar/toolbar_actions_bar_bubble_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698