OLD | NEW |
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 Loading... |
81 | 81 |
82 void BookmarkModelFactory::RegisterProfilePrefs( | 82 void BookmarkModelFactory::RegisterProfilePrefs( |
83 user_prefs::PrefRegistrySyncable* registry) { | 83 user_prefs::PrefRegistrySyncable* registry) { |
84 // Don't sync this, as otherwise, due to a limitation in sync, it | 84 // Don't sync this, as otherwise, due to a limitation in sync, it |
85 // will cause a deadlock (see http://crbug.com/97955). If we truly | 85 // will cause a deadlock (see http://crbug.com/97955). If we truly |
86 // want to sync the expanded state of folders, it should be part of | 86 // want to sync the expanded state of folders, it should be part of |
87 // bookmark sync itself (i.e., a property of the sync folder nodes). | 87 // bookmark sync itself (i.e., a property of the sync folder nodes). |
88 registry->RegisterListPref(prefs::kBookmarkEditorExpandedNodes, | 88 registry->RegisterListPref(prefs::kBookmarkEditorExpandedNodes, |
89 new base::ListValue, | 89 new base::ListValue, |
90 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 90 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 91 registry->RegisterListPref( |
| 92 prefs::kManagedBookmarks, |
| 93 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
91 } | 94 } |
92 | 95 |
93 content::BrowserContext* BookmarkModelFactory::GetBrowserContextToUse( | 96 content::BrowserContext* BookmarkModelFactory::GetBrowserContextToUse( |
94 content::BrowserContext* context) const { | 97 content::BrowserContext* context) const { |
95 return chrome::GetBrowserContextRedirectedInIncognito(context); | 98 return chrome::GetBrowserContextRedirectedInIncognito(context); |
96 } | 99 } |
97 | 100 |
98 bool BookmarkModelFactory::ServiceIsNULLWhileTesting() const { | 101 bool BookmarkModelFactory::ServiceIsNULLWhileTesting() const { |
99 return true; | 102 return true; |
100 } | 103 } |
OLD | NEW |