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

Side by Side Diff: chrome/browser/bookmarks/bookmark_extension_helpers.cc

Issue 10966025: Change bookmarkManager API from experimental to private. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: bookmarkManager->bookmarkManagerPrivate Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/bookmarks/bookmark_extension_helpers.h" 5 #include "chrome/browser/bookmarks/bookmark_extension_helpers.h"
6 6
7 #include <math.h> // For floor() 7 #include <math.h> // For floor()
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 15 matching lines...) Expand all
26 bool only_folders) { 26 bool only_folders) {
27 if (node->IsVisible()) { 27 if (node->IsVisible()) {
28 linked_ptr<BookmarkTreeNode> new_node( 28 linked_ptr<BookmarkTreeNode> new_node(
29 bookmark_extension_helpers::GetBookmarkTreeNode(node, 29 bookmark_extension_helpers::GetBookmarkTreeNode(node,
30 recurse, 30 recurse,
31 only_folders)); 31 only_folders));
32 nodes->push_back(new_node); 32 nodes->push_back(new_node);
33 } 33 }
34 } 34 }
35 35
36 // TODO(mwrosen): Remove this function once chrome.experimental.bookmarkManager 36 // TODO(mwrosen): Remove this function once chrome.bookmarkManagerPrivate is
37 // is refactored to use the JSON schema compiler. 37 // refactored to use the JSON schema compiler.
38 void AddNode(const BookmarkNode* node, 38 void AddNode(const BookmarkNode* node,
39 base::ListValue* list, 39 base::ListValue* list,
40 bool recurse, 40 bool recurse,
41 bool only_folders) { 41 bool only_folders) {
42 if (node->IsVisible()) { 42 if (node->IsVisible()) {
43 base::DictionaryValue* dict = bookmark_extension_helpers::GetNodeDictionary( 43 base::DictionaryValue* dict = bookmark_extension_helpers::GetNodeDictionary(
44 node, recurse, only_folders); 44 node, recurse, only_folders);
45 list->Append(dict); 45 list->Append(dict);
46 } 46 }
47 } 47 }
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 *error = keys::kFolderNotEmptyError; 180 *error = keys::kFolderNotEmptyError;
181 return false; 181 return false;
182 } 182 }
183 183
184 const BookmarkNode* parent = node->parent(); 184 const BookmarkNode* parent = node->parent();
185 model->Remove(parent, parent->GetIndexOf(node)); 185 model->Remove(parent, parent->GetIndexOf(node));
186 return true; 186 return true;
187 } 187 }
188 188
189 } // namespace bookmark_extension_helpers 189 } // namespace bookmark_extension_helpers
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/bookmark_extension_helpers.h ('k') | chrome/browser/bookmarks/bookmark_manager_extension_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698