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