OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/bookmarks/browser/bookmark_utils.h" | 5 #include "components/bookmarks/browser/bookmark_utils.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 if (nodes->size() == max_count) | 386 if (nodes->size() == max_count) |
387 return; | 387 return; |
388 } | 388 } |
389 } | 389 } |
390 | 390 |
391 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { | 391 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { |
392 registry->RegisterBooleanPref( | 392 registry->RegisterBooleanPref( |
393 prefs::kShowBookmarkBar, | 393 prefs::kShowBookmarkBar, |
394 false, | 394 false, |
395 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 395 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
396 registry->RegisterBooleanPref( | 396 registry->RegisterBooleanPref(prefs::kEditBookmarksEnabled, true); |
397 prefs::kEditBookmarksEnabled, | |
398 true, | |
399 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | |
400 registry->RegisterBooleanPref( | 397 registry->RegisterBooleanPref( |
401 prefs::kShowAppsShortcutInBookmarkBar, | 398 prefs::kShowAppsShortcutInBookmarkBar, |
402 true, | 399 true, |
403 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 400 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
404 registry->RegisterBooleanPref( | 401 registry->RegisterBooleanPref( |
405 prefs::kShowManagedBookmarksInBookmarkBar, | 402 prefs::kShowManagedBookmarksInBookmarkBar, |
406 true, | 403 true, |
407 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 404 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
408 } | 405 } |
409 | 406 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 bool HasDescendantsOf(const std::vector<const BookmarkNode*>& list, | 514 bool HasDescendantsOf(const std::vector<const BookmarkNode*>& list, |
518 const BookmarkNode* root) { | 515 const BookmarkNode* root) { |
519 for (const BookmarkNode* node : list) { | 516 for (const BookmarkNode* node : list) { |
520 if (IsDescendantOf(node, root)) | 517 if (IsDescendantOf(node, root)) |
521 return true; | 518 return true; |
522 } | 519 } |
523 return false; | 520 return false; |
524 } | 521 } |
525 | 522 |
526 } // namespace bookmarks | 523 } // namespace bookmarks |
OLD | NEW |