diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-26 06:05:40 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-26 06:05:40 +0000 |
commit | f93914857eb403a7aecf9154d14efae2703077e9 (patch) | |
tree | 816be10bf84bf1e7dca953092b23975ada90eb59 /chrome/browser/extensions/extension_bookmarks_module_constants.cc | |
parent | ab49e2e3c7f3fef9ebbf9749e8bf06765f644c21 (diff) | |
download | chromium_src-f93914857eb403a7aecf9154d14efae2703077e9.zip chromium_src-f93914857eb403a7aecf9154d14efae2703077e9.tar.gz chromium_src-f93914857eb403a7aecf9154d14efae2703077e9.tar.bz2 |
Separate out the string constants used for extension API function
names, function parameter keys, error messages and event names so that
they can be reused when writing extension UI tests.
Original review: http://codereview.chromium.org/113771
Review URL: http://codereview.chromium.org/113831
Patch from Joi Sigurdsson <joi.sigurdsson@gmail.com>.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16867 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_bookmarks_module_constants.cc')
-rwxr-xr-x | chrome/browser/extensions/extension_bookmarks_module_constants.cc | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/chrome/browser/extensions/extension_bookmarks_module_constants.cc b/chrome/browser/extensions/extension_bookmarks_module_constants.cc new file mode 100755 index 0000000..9b3bc31 --- /dev/null +++ b/chrome/browser/extensions/extension_bookmarks_module_constants.cc @@ -0,0 +1,43 @@ +// Copyright (c) 2009 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 "chrome/browser/extensions/extension_bookmarks_module_constants.h" + +namespace extension_bookmarks_module_constants { + +const wchar_t kIdKey[] = L"id"; +const wchar_t kIndexKey[] = L"index"; +const wchar_t kParentIdKey[] = L"parentId"; +const wchar_t kOldIndexKey[] = L"oldIndex"; +const wchar_t kOldParentIdKey[] = L"oldParentId"; +const wchar_t kUrlKey[] = L"url"; +const wchar_t kTitleKey[] = L"title"; +const wchar_t kChildrenIdsKey[] = L"childrenIds"; +const wchar_t kChildrenKey[] = L"childrenIds"; +const wchar_t kRecursiveKey[] = L"recursive"; + +const char kNoNodeError[] = "Can't find bookmark for id."; +const char kNoParentError[] = "Can't find parent bookmark for id."; +const char kFolderNotEmptyError[] = + "Can't remove non-empty folder (use recursive to force)."; +const char kInvalidIndexError[] = "Index out of bounds."; +const char kInvalidUrlError[] = "Invalid URL."; +const char kModifySpecialError[] = "Can't modify the root bookmark folders."; + +const char kOnBookmarkAdded[] = "bookmark-added"; +const char kOnBookmarkRemoved[] = "bookmark-removed"; +const char kOnBookmarkChanged[] = "bookmark-changed"; +const char kOnBookmarkMoved[] = "bookmark-moved"; +const char kOnBookmarkChildrenReordered[] = "bookmark-children-reordered"; + +const char kGetBookmarksFunction[] = "GetBookmarks"; +const char kGetBookmarkChildrenFunction[] = "GetBookmarkChildren"; +const char kGetBookmarkTreeFunction[] = "GetBookmarkTree"; +const char kSearchBookmarksFunction[] = "SearchBookmarks"; +const char kRemoveBookmarkFunction[] = "RemoveBookmark"; +const char kCreateBookmarkFunction[] = "CreateBookmark"; +const char kMoveBookmarkFunction[] = "MoveBookmark"; +const char kSetBookmarkTitleFunction[] = "SetBookmarkTitle"; + +} // namespace extension_bookmarks_module_constants |