| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/extensions/extension_bookmark_helpers.h" | 5 #include "chrome/browser/extensions/extension_bookmark_helpers.h" |
| 6 | 6 |
| 7 #include "base/string_number_conversions.h" | 7 #include "base/string_number_conversions.h" |
| 8 #include "base/values.h" |
| 9 #include "chrome/browser/bookmarks/bookmark_model.h" |
| 8 #include "chrome/browser/extensions/extension_bookmarks_module_constants.h" | 10 #include "chrome/browser/extensions/extension_bookmarks_module_constants.h" |
| 9 | 11 |
| 10 namespace keys = extension_bookmarks_module_constants; | 12 namespace keys = extension_bookmarks_module_constants; |
| 11 | 13 |
| 12 // Helper functions. | 14 // Helper functions. |
| 13 namespace extension_bookmark_helpers { | 15 namespace extension_bookmark_helpers { |
| 14 | 16 |
| 15 DictionaryValue* GetNodeDictionary(const BookmarkNode* node, | 17 DictionaryValue* GetNodeDictionary(const BookmarkNode* node, |
| 16 bool recurse, | 18 bool recurse, |
| 17 bool only_folders) { | 19 bool only_folders) { |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 return false; | 100 return false; |
| 99 } | 101 } |
| 100 | 102 |
| 101 const BookmarkNode* parent = node->GetParent(); | 103 const BookmarkNode* parent = node->GetParent(); |
| 102 int index = parent->IndexOfChild(node); | 104 int index = parent->IndexOfChild(node); |
| 103 model->Remove(parent, index); | 105 model->Remove(parent, index); |
| 104 return true; | 106 return true; |
| 105 } | 107 } |
| 106 | 108 |
| 107 } | 109 } |
| OLD | NEW |