Chromium Code Reviews| Index: components/bookmarks/browser/bookmark_model.cc |
| diff --git a/components/bookmarks/browser/bookmark_model.cc b/components/bookmarks/browser/bookmark_model.cc |
| index 5709533dba2d0be60f7f29ded432599ba10be75a..e9e1ded106f8ad8f87f997e1a17a70de968bcafd 100644 |
| --- a/components/bookmarks/browser/bookmark_model.cc |
| +++ b/components/bookmarks/browser/bookmark_model.cc |
| @@ -15,6 +15,7 @@ |
| #include "base/metrics/histogram_macros.h" |
| #include "base/profiler/scoped_tracker.h" |
| #include "base/strings/string_util.h" |
| +#include "base/values.h" |
| #include "components/bookmarks/browser/bookmark_expanded_state_tracker.h" |
| #include "components/bookmarks/browser/bookmark_index.h" |
| #include "components/bookmarks/browser/bookmark_match.h" |
| @@ -22,7 +23,9 @@ |
| #include "components/bookmarks/browser/bookmark_node_data.h" |
| #include "components/bookmarks/browser/bookmark_storage.h" |
| #include "components/bookmarks/browser/bookmark_utils.h" |
| +#include "components/bookmarks/common/bookmark_pref_names.h" |
| #include "components/favicon_base/favicon_types.h" |
| +#include "components/pref_registry/pref_registry_syncable.h" |
| #include "grit/components_strings.h" |
| #include "ui/base/l10n/l10n_util.h" |
| #include "ui/gfx/favicon_size.h" |
| @@ -119,6 +122,19 @@ BookmarkModel::~BookmarkModel() { |
| } |
| } |
| +// static |
| +void BookmarkModel::RegisterProfilePrefs( |
|
tfarina
2015/07/10 17:29:06
Why does this needs to me a static method on Bookm
sdefresne
2015/07/16 07:23:33
Does not have to be a static method on BookmarkMod
|
| + user_prefs::PrefRegistrySyncable* registry) { |
| + // Don't sync this, as otherwise, due to a limitation in sync, it |
| + // will cause a deadlock (see http://crbug.com/97955). If we truly |
| + // want to sync the expanded state of folders, it should be part of |
| + // bookmark sync itself (i.e., a property of the sync folder nodes). |
| + registry->RegisterListPref(bookmarks::prefs::kBookmarkEditorExpandedNodes, |
| + new base::ListValue); |
| + registry->RegisterListPref(bookmarks::prefs::kManagedBookmarks); |
| + registry->RegisterListPref(bookmarks::prefs::kSupervisedBookmarks); |
| +} |
| + |
| void BookmarkModel::Shutdown() { |
| if (loaded_) |
| return; |