OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/bookmarks/bookmark_utils.h" | 5 #include "chrome/browser/ui/bookmarks/bookmark_utils.h" |
6 | 6 |
7 #include "apps/app_launcher.h" | 7 #include "apps/app_launcher.h" |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 // changes the URL's meaning. | 269 // changes the URL's meaning. |
270 return net::FormatUrl( | 270 return net::FormatUrl( |
271 url, languages, | 271 url, languages, |
272 net::kFormatUrlOmitAll & ~net::kFormatUrlOmitUsernamePassword, | 272 net::kFormatUrlOmitAll & ~net::kFormatUrlOmitUsernamePassword, |
273 net::UnescapeRule::SPACES, NULL, NULL, NULL); | 273 net::UnescapeRule::SPACES, NULL, NULL, NULL); |
274 } | 274 } |
275 | 275 |
276 bool IsAppsShortcutEnabled(const Profile* profile) { | 276 bool IsAppsShortcutEnabled(const Profile* profile) { |
277 #if defined(USE_ASH) | 277 #if defined(USE_ASH) |
278 // Don't show the apps shortcut in ash when the app launcher is enabled. | 278 // Don't show the apps shortcut in ash when the app launcher is enabled. |
279 if (apps::WasAppLauncherEnabled()) | 279 if (apps::IsAppLauncherEnabled()) |
280 return false; | 280 return false; |
281 #endif | 281 #endif |
282 | 282 |
283 return chrome::IsInstantExtendedAPIEnabled() && !profile->IsOffTheRecord(); | 283 return chrome::IsInstantExtendedAPIEnabled() && !profile->IsOffTheRecord(); |
284 } | 284 } |
285 | 285 |
286 bool ShouldShowAppsShortcutInBookmarkBar(Profile* profile) { | 286 bool ShouldShowAppsShortcutInBookmarkBar(Profile* profile) { |
287 return IsAppsShortcutEnabled(profile) && | 287 return IsAppsShortcutEnabled(profile) && |
288 profile->GetPrefs()->GetBoolean(prefs::kShowAppsShortcutInBookmarkBar); | 288 profile->GetPrefs()->GetBoolean(prefs::kShowAppsShortcutInBookmarkBar); |
289 } | 289 } |
290 | 290 |
291 } // namespace chrome | 291 } // namespace chrome |
OLD | NEW |