| 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 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 642 return node; | 642 return node; |
| 643 } | 643 } |
| 644 | 644 |
| 645 // Formerly in BookmarkBarView | 645 // Formerly in BookmarkBarView |
| 646 void ToggleWhenVisible(Profile* profile) { | 646 void ToggleWhenVisible(Profile* profile) { |
| 647 PrefService* prefs = profile->GetPrefs(); | 647 PrefService* prefs = profile->GetPrefs(); |
| 648 const bool always_show = !prefs->GetBoolean(prefs::kShowBookmarkBar); | 648 const bool always_show = !prefs->GetBoolean(prefs::kShowBookmarkBar); |
| 649 | 649 |
| 650 // The user changed when the bookmark bar is shown, update the preferences. | 650 // The user changed when the bookmark bar is shown, update the preferences. |
| 651 prefs->SetBoolean(prefs::kShowBookmarkBar, always_show); | 651 prefs->SetBoolean(prefs::kShowBookmarkBar, always_show); |
| 652 prefs->ScheduleSavePersistentPrefs(); | |
| 653 } | 652 } |
| 654 | 653 |
| 655 void RegisterUserPrefs(PrefService* prefs) { | 654 void RegisterUserPrefs(PrefService* prefs) { |
| 656 prefs->RegisterBooleanPref(prefs::kShowBookmarkBar, | 655 prefs->RegisterBooleanPref(prefs::kShowBookmarkBar, |
| 657 false, | 656 false, |
| 658 PrefService::SYNCABLE_PREF); | 657 PrefService::SYNCABLE_PREF); |
| 659 prefs->RegisterBooleanPref(prefs::kEditBookmarksEnabled, | 658 prefs->RegisterBooleanPref(prefs::kEditBookmarksEnabled, |
| 660 true, | 659 true, |
| 661 PrefService::UNSYNCABLE_PREF); | 660 PrefService::UNSYNCABLE_PREF); |
| 662 } | 661 } |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 779 void RecordBookmarkLaunch(BookmarkLaunchLocation location) { | 778 void RecordBookmarkLaunch(BookmarkLaunchLocation location) { |
| 780 #if defined(OS_WIN) | 779 #if defined(OS_WIN) |
| 781 // TODO(estade): do this on other platforms too. For now it's compiled out | 780 // TODO(estade): do this on other platforms too. For now it's compiled out |
| 782 // so that stats from platforms for which this is incompletely implemented | 781 // so that stats from platforms for which this is incompletely implemented |
| 783 // don't mix in with Windows, where it should be implemented exhaustively. | 782 // don't mix in with Windows, where it should be implemented exhaustively. |
| 784 UMA_HISTOGRAM_ENUMERATION("Bookmarks.LaunchLocation", location, LAUNCH_LIMIT); | 783 UMA_HISTOGRAM_ENUMERATION("Bookmarks.LaunchLocation", location, LAUNCH_LIMIT); |
| 785 #endif | 784 #endif |
| 786 } | 785 } |
| 787 | 786 |
| 788 } // namespace bookmark_utils | 787 } // namespace bookmark_utils |
| OLD | NEW |