Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(558)

Side by Side Diff: chrome/browser/bookmarks/bookmark_utils.cc

Issue 6905044: Refactor preference syncing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Really fix. And rebase Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 617
618 // And notify the notification service. 618 // And notify the notification service.
619 Source<Profile> source(profile); 619 Source<Profile> source(profile);
620 NotificationService::current()->Notify( 620 NotificationService::current()->Notify(
621 NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED, 621 NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED,
622 source, 622 source,
623 NotificationService::NoDetails()); 623 NotificationService::NoDetails());
624 } 624 }
625 625
626 void RegisterUserPrefs(PrefService* prefs) { 626 void RegisterUserPrefs(PrefService* prefs) {
627 prefs->RegisterBooleanPref(prefs::kShowBookmarkBar, false); 627 prefs->RegisterBooleanPref(prefs::kShowBookmarkBar,
628 prefs->RegisterBooleanPref(prefs::kEditBookmarksEnabled, true); 628 false,
629 PrefService::SYNCABLE_PREF);
630 prefs->RegisterBooleanPref(prefs::kEditBookmarksEnabled,
631 true,
632 PrefService::UNSYNCABLE_PREF);
629 } 633 }
630 634
631 void GetURLAndTitleToBookmark(TabContents* tab_contents, 635 void GetURLAndTitleToBookmark(TabContents* tab_contents,
632 GURL* url, 636 GURL* url,
633 string16* title) { 637 string16* title) {
634 *url = tab_contents->GetURL(); 638 *url = tab_contents->GetURL();
635 *title = tab_contents->GetTitle(); 639 *title = tab_contents->GetTitle();
636 } 640 }
637 641
638 void GetURLsForOpenTabs(Browser* browser, 642 void GetURLsForOpenTabs(Browser* browser,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 return true; 681 return true;
678 682
679 for (int i = 0; i < node->child_count(); ++i) { 683 for (int i = 0; i < node->child_count(); ++i) {
680 if (NodeHasURLs(node->GetChild(i))) 684 if (NodeHasURLs(node->GetChild(i)))
681 return true; 685 return true;
682 } 686 }
683 return false; 687 return false;
684 } 688 }
685 689
686 } // namespace bookmark_utils 690 } // namespace bookmark_utils
OLDNEW
« no previous file with comments | « chrome/browser/background_contents_service.cc ('k') | chrome/browser/chromeos/audio_mixer_alsa.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698