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

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

Issue 1102733002: Remove most occurences of PrefRegistrySyncable::UNSYNCABLE_PREF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefs-add-reg-funcs
Patch Set: Created 5 years, 8 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
OLDNEW
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/bookmarks/bookmark_model_factory.h" 5 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/deferred_sequenced_task_runner.h" 8 #include "base/deferred_sequenced_task_runner.h"
9 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 return bookmark_model; 81 return bookmark_model;
82 } 82 }
83 83
84 void BookmarkModelFactory::RegisterProfilePrefs( 84 void BookmarkModelFactory::RegisterProfilePrefs(
85 user_prefs::PrefRegistrySyncable* registry) { 85 user_prefs::PrefRegistrySyncable* registry) {
86 // Don't sync this, as otherwise, due to a limitation in sync, it 86 // Don't sync this, as otherwise, due to a limitation in sync, it
87 // will cause a deadlock (see http://crbug.com/97955). If we truly 87 // will cause a deadlock (see http://crbug.com/97955). If we truly
88 // want to sync the expanded state of folders, it should be part of 88 // want to sync the expanded state of folders, it should be part of
89 // bookmark sync itself (i.e., a property of the sync folder nodes). 89 // bookmark sync itself (i.e., a property of the sync folder nodes).
90 registry->RegisterListPref(bookmarks::prefs::kBookmarkEditorExpandedNodes, 90 registry->RegisterListPref(bookmarks::prefs::kBookmarkEditorExpandedNodes,
91 new base::ListValue, 91 new base::ListValue);
92 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 92 registry->RegisterListPref(bookmarks::prefs::kManagedBookmarks);
93 registry->RegisterListPref( 93 registry->RegisterListPref(bookmarks::prefs::kSupervisedBookmarks);
94 bookmarks::prefs::kManagedBookmarks,
95 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
96 registry->RegisterListPref(
97 bookmarks::prefs::kSupervisedBookmarks,
98 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
99 } 94 }
100 95
101 content::BrowserContext* BookmarkModelFactory::GetBrowserContextToUse( 96 content::BrowserContext* BookmarkModelFactory::GetBrowserContextToUse(
102 content::BrowserContext* context) const { 97 content::BrowserContext* context) const {
103 return chrome::GetBrowserContextRedirectedInIncognito(context); 98 return chrome::GetBrowserContextRedirectedInIncognito(context);
104 } 99 }
105 100
106 bool BookmarkModelFactory::ServiceIsNULLWhileTesting() const { 101 bool BookmarkModelFactory::ServiceIsNULLWhileTesting() const {
107 return true; 102 return true;
108 } 103 }
OLDNEW
« no previous file with comments | « chrome/browser/background/background_contents_service_factory.cc ('k') | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698