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

Side by Side Diff: chrome/browser/ui/extensions/extension_toolbar_icon_surfacing_bubble_delegate.cc

Issue 1658793002: Update chrome for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/extensions/extension_toolbar_icon_surfacing_bubble_d elegate.h" 5 #include "chrome/browser/ui/extensions/extension_toolbar_icon_surfacing_bubble_d elegate.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/prefs/pref_service.h"
9 #include "base/time/time.h" 8 #include "base/time/time.h"
10 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/ui/toolbar/toolbar_actions_model.h" 10 #include "chrome/browser/ui/toolbar/toolbar_actions_model.h"
12 #include "chrome/common/pref_names.h" 11 #include "chrome/common/pref_names.h"
12 #include "components/prefs/pref_service.h"
13 #include "extensions/common/feature_switch.h" 13 #include "extensions/common/feature_switch.h"
14 #include "grit/chromium_strings.h" 14 #include "grit/chromium_strings.h"
15 #include "grit/generated_resources.h" 15 #include "grit/generated_resources.h"
16 #include "ui/base/l10n/l10n_util.h" 16 #include "ui/base/l10n/l10n_util.h"
17 17
18 namespace { 18 namespace {
19 19
20 void AcknowledgeInPrefs(PrefService* prefs) { 20 void AcknowledgeInPrefs(PrefService* prefs) {
21 prefs->SetBoolean(prefs::kToolbarIconSurfacingBubbleAcknowledged, true); 21 prefs->SetBoolean(prefs::kToolbarIconSurfacingBubbleAcknowledged, true);
22 // Once the bubble is acknowledged, we no longer need to store the last 22 // Once the bubble is acknowledged, we no longer need to store the last
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 prefs::kToolbarIconSurfacingBubbleLastShowTime, 97 prefs::kToolbarIconSurfacingBubbleLastShowTime,
98 base::Time::Now().ToInternalValue()); 98 base::Time::Now().ToInternalValue());
99 } 99 }
100 100
101 void ExtensionToolbarIconSurfacingBubbleDelegate::OnBubbleClosed( 101 void ExtensionToolbarIconSurfacingBubbleDelegate::OnBubbleClosed(
102 CloseAction action) { 102 CloseAction action) {
103 if (action == CLOSE_EXECUTE) 103 if (action == CLOSE_EXECUTE)
104 AcknowledgeInPrefs(profile_->GetPrefs()); 104 AcknowledgeInPrefs(profile_->GetPrefs());
105 ToolbarActionsModel::Get(profile_)->StopHighlighting(); 105 ToolbarActionsModel::Get(profile_)->StopHighlighting();
106 } 106 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/exclusive_access/fullscreen_controller.cc ('k') | chrome/browser/ui/find_bar/find_bar_host_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698