diff options
author | sdefresne@chromium.org <sdefresne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-10 17:03:21 +0000 |
---|---|---|
committer | sdefresne@chromium.org <sdefresne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-10 17:03:21 +0000 |
commit | 42c42826138bfd45fc8f27d87a3fc89693881332 (patch) | |
tree | 8656f6206868e27c60188694937f58caff6d9f07 /components | |
parent | e0bd6c12d6709a8301d416950c4ef5518d55337a (diff) | |
download | chromium_src-42c42826138bfd45fc8f27d87a3fc89693881332.zip chromium_src-42c42826138bfd45fc8f27d87a3fc89693881332.tar.gz chromium_src-42c42826138bfd45fc8f27d87a3fc89693881332.tar.bz2 |
Create bookmarks component with names of bookmark preferences
Introduce a new bookmarks component and update DEPS for chrome/browser
and chrome/chrome_browser.gypi.
Move names of bookmark preferences from chrome/common/pref_names.{cc,h}
to components/bookmarks/core/common/bookmark_pref_names.{cc,h} and add
an include in chrome/common/pref_names.h to limit modification to the
client files.
BUG=360613
TBR=sky
Review URL: https://codereview.chromium.org/228393004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263016 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components')
-rw-r--r-- | components/bookmarks.gypi | 22 | ||||
-rw-r--r-- | components/bookmarks/DEPS | 5 | ||||
-rw-r--r-- | components/bookmarks/OWNERS | 8 | ||||
-rw-r--r-- | components/bookmarks/core/common/bookmark_pref_names.cc | 30 | ||||
-rw-r--r-- | components/bookmarks/core/common/bookmark_pref_names.h | 21 | ||||
-rw-r--r-- | components/components.gyp | 1 | ||||
-rw-r--r-- | components/components_tests.gyp | 3 |
7 files changed, 90 insertions, 0 deletions
diff --git a/components/bookmarks.gypi b/components/bookmarks.gypi new file mode 100644 index 0000000..2a6da83 --- /dev/null +++ b/components/bookmarks.gypi @@ -0,0 +1,22 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +{ + 'targets': [ + { + 'target_name': 'bookmarks_core_common', + 'type': 'static_library', + 'include_dirs': [ + '..', + ], + 'dependencies': [ + '../base/base.gyp:base', + ], + 'sources': [ + 'bookmarks/core/common/bookmark_pref_names.cc', + 'bookmarks/core/common/bookmark_pref_names.h', + ], + }, + ], +} diff --git a/components/bookmarks/DEPS b/components/bookmarks/DEPS new file mode 100644 index 0000000..a1d5db6 --- /dev/null +++ b/components/bookmarks/DEPS @@ -0,0 +1,5 @@ +include_rules = [ + # Bookmarks is a component that is not allowed to uses content/ so that it + # can be shared on iOS. + "-content", +] diff --git a/components/bookmarks/OWNERS b/components/bookmarks/OWNERS new file mode 100644 index 0000000..5b65cff6 --- /dev/null +++ b/components/bookmarks/OWNERS @@ -0,0 +1,8 @@ +brettw@chromium.org +sky@chromium.org + +# Temporary owner, for refactoring changes only. +blundell@chromium.org + +# Temporary owner, for refactoring changes only. +droger@chromium.org diff --git a/components/bookmarks/core/common/bookmark_pref_names.cc b/components/bookmarks/core/common/bookmark_pref_names.cc new file mode 100644 index 0000000..9138643 --- /dev/null +++ b/components/bookmarks/core/common/bookmark_pref_names.cc @@ -0,0 +1,30 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "components/bookmarks/core/common/bookmark_pref_names.h" + +namespace prefs { + +// Boolean which specifies the ids of the bookmark nodes that are expanded in +// the bookmark editor. +const char kBookmarkEditorExpandedNodes[] = "bookmark_editor.expanded_nodes"; + +// Boolean that is true when bookmark prompt is enabled. +const char kBookmarkPromptEnabled[] = "bookmark_prompt_enabled"; + +// Number of times bookmark prompt displayed. +const char kBookmarkPromptImpressionCount[] = + "bookmark_prompt_impression_count"; + +// Boolean which specifies whether the bookmark bar is visible on all tabs. +const char kShowBookmarkBar[] = "bookmark_bar.show_on_all_tabs"; + +// Modifying bookmarks is completely disabled when this is set to false. +const char kEditBookmarksEnabled[] = "bookmarks.editing_enabled"; + +// Boolean which specifies whether the apps shortcut is visible on the bookmark +// bar. +const char kShowAppsShortcutInBookmarkBar[] = "bookmark_bar.show_apps_shortcut"; + +} // namespace prefs diff --git a/components/bookmarks/core/common/bookmark_pref_names.h b/components/bookmarks/core/common/bookmark_pref_names.h new file mode 100644 index 0000000..94473d1 --- /dev/null +++ b/components/bookmarks/core/common/bookmark_pref_names.h @@ -0,0 +1,21 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Constants for the names of various bookmarks preferences. + +#ifndef COMPONENTS_BOOKMARKS_CORE_COMMON_BOOKMARK_PREF_NAMES_H_ +#define COMPONENTS_BOOKMARKS_CORE_COMMON_BOOKMARK_PREF_NAMES_H_ + +namespace prefs { + +extern const char kBookmarkEditorExpandedNodes[]; +extern const char kBookmarkPromptEnabled[]; +extern const char kBookmarkPromptImpressionCount[]; +extern const char kShowBookmarkBar[]; +extern const char kEditBookmarksEnabled[]; +extern const char kShowAppsShortcutInBookmarkBar[]; + +} // namespace prefs + +#endif // COMPONENTS_BOOKMARKS_CORE_COMMON_BOOKMARK_PREF_NAMES_H_ diff --git a/components/components.gyp b/components/components.gyp index b0f52a1..c51d286 100644 --- a/components/components.gyp +++ b/components/components.gyp @@ -12,6 +12,7 @@ 'includes': [ 'auto_login_parser.gypi', 'autofill.gypi', + 'bookmarks.gypi', 'breakpad.gypi', 'cloud_devices.gypi', 'cronet.gypi', diff --git a/components/components_tests.gyp b/components/components_tests.gyp index e8836a4..4983e5f 100644 --- a/components/components_tests.gyp +++ b/components/components_tests.gyp @@ -179,6 +179,9 @@ 'components_strings.gyp:components_strings', '../third_party/libphonenumber/libphonenumber.gyp:libphonenumber', + # Dependencies of bookmarks + 'components.gyp:bookmarks_core_common', + # Dependencies of cloud_devices 'components.gyp:cloud_devices', |