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

Unified Diff: chrome/browser/ui/bookmarks/bookmark_utils.cc

Issue 1697223002: Remove HostDesktopType from c/b/ui/bookmarks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-21
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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/bookmarks/bookmark_utils.cc
diff --git a/chrome/browser/ui/bookmarks/bookmark_utils.cc b/chrome/browser/ui/bookmarks/bookmark_utils.cc
index e6ca171ba529a218f89d8ce9c702c90d9415f5b5..1d74552122fe8e9d784bf2ea40fe6add3ddad754 100644
--- a/chrome/browser/ui/bookmarks/bookmark_utils.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_utils.cc
@@ -140,24 +140,22 @@ base::string16 FormatBookmarkURLForDisplay(const GURL& url,
net::UnescapeRule::SPACES, nullptr, nullptr, nullptr);
}
-bool IsAppsShortcutEnabled(Profile* profile,
- chrome::HostDesktopType host_desktop_type) {
+bool IsAppsShortcutEnabled(Profile* profile) {
// Legacy supervised users can not have apps installed currently so there's no
// need to show the apps shortcut.
if (profile->IsLegacySupervised())
return false;
+#if defined(USE_ASH)
// Don't show the apps shortcut in ash since the app launcher is enabled.
- if (host_desktop_type == chrome::HOST_DESKTOP_TYPE_ASH)
- return false;
+ return false;
+#endif
sky 2016/02/16 02:58:04 Similar comment about #else.
scottmg 2016/02/17 03:12:33 Done.
return search::IsInstantExtendedAPIEnabled() && !profile->IsOffTheRecord();
}
-bool ShouldShowAppsShortcutInBookmarkBar(
- Profile* profile,
- chrome::HostDesktopType host_desktop_type) {
- return IsAppsShortcutEnabled(profile, host_desktop_type) &&
+bool ShouldShowAppsShortcutInBookmarkBar(Profile* profile) {
+ return IsAppsShortcutEnabled(profile) &&
profile->GetPrefs()->GetBoolean(
bookmarks::prefs::kShowAppsShortcutInBookmarkBar);
}
« no previous file with comments | « chrome/browser/ui/bookmarks/bookmark_utils.h ('k') | chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698