| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/ui/bookmarks/bookmark_editor.h" | 5 #include "chrome/browser/ui/bookmarks/bookmark_editor.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "grit/generated_resources.h" | 8 #include "chrome/grit/generated_resources.h" |
| 9 | 9 |
| 10 namespace { | 10 namespace { |
| 11 | 11 |
| 12 const BookmarkNode* CreateNewNode(BookmarkModel* model, | 12 const BookmarkNode* CreateNewNode(BookmarkModel* model, |
| 13 const BookmarkNode* parent, | 13 const BookmarkNode* parent, |
| 14 const BookmarkEditor::EditDetails& details, | 14 const BookmarkEditor::EditDetails& details, |
| 15 const base::string16& new_title, | 15 const base::string16& new_title, |
| 16 const GURL& new_url) { | 16 const GURL& new_url) { |
| 17 const BookmarkNode* node; | 17 const BookmarkNode* node; |
| 18 // When create the new one to right-clicked folder, add it to the next to the | 18 // When create the new one to right-clicked folder, add it to the next to the |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 DCHECK(node); | 157 DCHECK(node); |
| 158 | 158 |
| 159 if (new_parent != node->parent()) | 159 if (new_parent != node->parent()) |
| 160 model->Move(node, new_parent, new_parent->child_count()); | 160 model->Move(node, new_parent, new_parent->child_count()); |
| 161 if (node->is_url()) | 161 if (node->is_url()) |
| 162 model->SetURL(node, new_url); | 162 model->SetURL(node, new_url); |
| 163 model->SetTitle(node, new_title); | 163 model->SetTitle(node, new_title); |
| 164 | 164 |
| 165 return node; | 165 return node; |
| 166 } | 166 } |
| OLD | NEW |