| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/bookmarks/bookmark_utils.h" | 5 #include "chrome/browser/bookmarks/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/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 | 616 |
| 617 // And notify the notification service. | 617 // And notify the notification service. |
| 618 Source<Profile> source(profile); | 618 Source<Profile> source(profile); |
| 619 NotificationService::current()->Notify( | 619 NotificationService::current()->Notify( |
| 620 NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED, | 620 NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED, |
| 621 source, | 621 source, |
| 622 NotificationService::NoDetails()); | 622 NotificationService::NoDetails()); |
| 623 } | 623 } |
| 624 | 624 |
| 625 void RegisterUserPrefs(PrefService* prefs) { | 625 void RegisterUserPrefs(PrefService* prefs) { |
| 626 prefs->RegisterBooleanPref(prefs::kShowBookmarkBar, false); | 626 prefs->RegisterBooleanPref(prefs::kShowBookmarkBar, |
| 627 prefs->RegisterBooleanPref(prefs::kEditBookmarksEnabled, true); | 627 false, |
| 628 true /* sync pref */); |
| 629 prefs->RegisterBooleanPref(prefs::kEditBookmarksEnabled, |
| 630 true, |
| 631 false /* don't sync pref */); |
| 628 } | 632 } |
| 629 | 633 |
| 630 void GetURLAndTitleToBookmark(TabContents* tab_contents, | 634 void GetURLAndTitleToBookmark(TabContents* tab_contents, |
| 631 GURL* url, | 635 GURL* url, |
| 632 string16* title) { | 636 string16* title) { |
| 633 *url = tab_contents->GetURL(); | 637 *url = tab_contents->GetURL(); |
| 634 *title = tab_contents->GetTitle(); | 638 *title = tab_contents->GetTitle(); |
| 635 } | 639 } |
| 636 | 640 |
| 637 void GetURLsForOpenTabs(Browser* browser, | 641 void GetURLsForOpenTabs(Browser* browser, |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 676 return true; | 680 return true; |
| 677 | 681 |
| 678 for (int i = 0; i < node->child_count(); ++i) { | 682 for (int i = 0; i < node->child_count(); ++i) { |
| 679 if (NodeHasURLs(node->GetChild(i))) | 683 if (NodeHasURLs(node->GetChild(i))) |
| 680 return true; | 684 return true; |
| 681 } | 685 } |
| 682 return false; | 686 return false; |
| 683 } | 687 } |
| 684 | 688 |
| 685 } // namespace bookmark_utils | 689 } // namespace bookmark_utils |
| OLD | NEW |