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

Unified Diff: chrome/browser/bookmarks/bookmark_utils.h

Issue 149140: Have the ApplyEdit* bookmark utilities return the BookmarkNode pointer... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/bookmarks/bookmark_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/bookmarks/bookmark_utils.h
===================================================================
--- chrome/browser/bookmarks/bookmark_utils.h (revision 19826)
+++ chrome/browser/bookmarks/bookmark_utils.h (working copy)
@@ -142,22 +142,28 @@
const std::wstring& languages);
// Modifies a bookmark node (assuming that there's no magic that needs to be
-// done regarding moving from one folder to another).
-void ApplyEditsWithNoGroupChange(BookmarkModel* model,
- const BookmarkNode* parent,
- const BookmarkNode* node,
- const std::wstring& new_title,
- const GURL& new_url,
- BookmarkEditor::Handler* handler);
+// done regarding moving from one folder to another). If the URL changed or a
+// new node is explicitly being added, returns a pointer to the new node that
+// was created. Otherwise the return value is identically |node|.
+const BookmarkNode* ApplyEditsWithNoGroupChange(
+ BookmarkModel* model,
+ const BookmarkNode* parent,
+ const BookmarkNode* node,
+ const std::wstring& new_title,
+ const GURL& new_url,
+ BookmarkEditor::Handler* handler);
// Modifies a bookmark node assuming that the parent of the node may have
-// changed and the node will need to be removed and reinserted.
-void ApplyEditsWithPossibleGroupChange(BookmarkModel* model,
- const BookmarkNode* new_parent,
- const BookmarkNode* node,
- const std::wstring& new_title,
- const GURL& new_url,
- BookmarkEditor::Handler* handler);
+// changed and the node will need to be removed and reinserted. If the URL
+// changed or a new node is explicitly being added, returns a pointer to the
+// new node that was created. Otherwise the return value is identically |node|.
+const BookmarkNode* ApplyEditsWithPossibleGroupChange(
+ BookmarkModel* model,
+ const BookmarkNode* new_parent,
+ const BookmarkNode* node,
+ const std::wstring& new_title,
+ const GURL& new_url,
+ BookmarkEditor::Handler* handler);
// Toggles whether the bookmark bar is shown only on the new tab page or on
// all tabs. This is a preference modifier, not a visual modifier.
« no previous file with comments | « no previous file | chrome/browser/bookmarks/bookmark_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698