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

Unified Diff: chrome/browser/extensions/api/bookmarks/bookmark_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: yoz 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/bookmark_api.cc
diff --git a/chrome/browser/extensions/api/bookmarks/bookmark_api.cc b/chrome/browser/extensions/api/bookmarks/bookmark_api.cc
index c0768138e02e0e33d039ded8ef06624d692b1780..29393656a66e97bda0e8b50e39dc4d7761414180 100644
--- a/chrome/browser/extensions/api/bookmarks/bookmark_api.cc
+++ b/chrome/browser/extensions/api/bookmarks/bookmark_api.cc
@@ -310,9 +310,8 @@ bool GetBookmarksFunction::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 GetBookmarksFunction::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) {

Powered by Google App Engine
This is Rietveld 408576698