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 "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 // important not to drop any username/password, or unescape anything that | 311 // important not to drop any username/password, or unescape anything that |
312 // changes the URL's meaning. | 312 // changes the URL's meaning. |
313 return net::FormatUrl( | 313 return net::FormatUrl( |
314 url, languages, | 314 url, languages, |
315 net::kFormatUrlOmitAll & ~net::kFormatUrlOmitUsernamePassword, | 315 net::kFormatUrlOmitAll & ~net::kFormatUrlOmitUsernamePassword, |
316 net::UnescapeRule::SPACES, NULL, NULL, NULL); | 316 net::UnescapeRule::SPACES, NULL, NULL, NULL); |
317 } | 317 } |
318 | 318 |
319 bool IsAppsShortcutEnabled(Profile* profile, | 319 bool IsAppsShortcutEnabled(Profile* profile, |
320 chrome::HostDesktopType host_desktop_type) { | 320 chrome::HostDesktopType host_desktop_type) { |
321 // Managed users can not have apps installed currently so there's no need to | 321 // Supervised users can not have apps installed currently so there's no need |
322 // show the apps shortcut. | 322 // to show the apps shortcut. |
323 if (profile->IsManaged()) | 323 if (profile->IsSupervised()) |
324 return false; | 324 return false; |
325 | 325 |
326 // Don't show the apps shortcut in ash since the app launcher is enabled. | 326 // Don't show the apps shortcut in ash since the app launcher is enabled. |
327 if (host_desktop_type == chrome::HOST_DESKTOP_TYPE_ASH) | 327 if (host_desktop_type == chrome::HOST_DESKTOP_TYPE_ASH) |
328 return false; | 328 return false; |
329 | 329 |
330 return chrome::IsInstantExtendedAPIEnabled() && !profile->IsOffTheRecord(); | 330 return chrome::IsInstantExtendedAPIEnabled() && !profile->IsOffTheRecord(); |
331 } | 331 } |
332 | 332 |
333 bool ShouldShowAppsShortcutInBookmarkBar( | 333 bool ShouldShowAppsShortcutInBookmarkBar( |
(...skipping 21 matching lines...) Expand all Loading... |
355 i != extension_set.end(); | 355 i != extension_set.end(); |
356 ++i) { | 356 ++i) { |
357 if (extensions::CommandService::RemovesBookmarkOpenPagesShortcut(*i)) | 357 if (extensions::CommandService::RemovesBookmarkOpenPagesShortcut(*i)) |
358 return true; | 358 return true; |
359 } | 359 } |
360 | 360 |
361 return false; | 361 return false; |
362 } | 362 } |
363 | 363 |
364 } // namespace chrome | 364 } // namespace chrome |
OLD | NEW |