Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(475)

Unified Diff: chrome/browser/extensions/api/bookmarks/bookmarks_api.cc

Issue 11827026: Overhaul JSON Schema Compiler to support a number of features required to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/bookmarks/bookmarks_api.cc
diff --git a/chrome/browser/extensions/api/bookmarks/bookmarks_api.cc b/chrome/browser/extensions/api/bookmarks/bookmarks_api.cc
index 08fa4ab369295250fff36de5360c77b637092828..77792946309ef28bfc0c6170fcd03e6f27035624 100644
--- a/chrome/browser/extensions/api/bookmarks/bookmarks_api.cc
+++ b/chrome/browser/extensions/api/bookmarks/bookmarks_api.cc
@@ -310,9 +310,8 @@ bool BookmarksGetTreeFunction::RunImpl() {
std::vector<linked_ptr<BookmarkTreeNode> > nodes;
BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile());
- if (params->id_or_id_list_type ==
- bookmarks::Get::Params::ID_OR_ID_LIST_ARRAY) {
- std::vector<std::string>* ids = params->id_or_id_list_array.get();
+ if (params->id_or_id_list.as_array) {
+ std::vector<std::string>* ids = params->id_or_id_list.as_array.get();
size_t count = ids->size();
EXTENSION_FUNCTION_VALIDATE(count > 0);
for (size_t i = 0; i < count; ++i) {
@@ -329,7 +328,7 @@ bool BookmarksGetTreeFunction::RunImpl() {
}
} else {
int64 id;
- if (!GetBookmarkIdAsInt64(*params->id_or_id_list_string, &id))
+ if (!GetBookmarkIdAsInt64(*params->id_or_id_list.as_string, &id))
return false;
const BookmarkNode* node = model->GetNodeByID(id);
if (!node) {
« no previous file with comments | « build/json_schema_compile.gypi ('k') | chrome/browser/extensions/api/content_settings/content_settings_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698