summaryrefslogtreecommitdiffstats
path: root/chrome/browser/bookmarks
diff options
context:
space:
mode:
authorthomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-19 16:44:07 +0000
committerthomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-19 16:44:07 +0000
commitbaf4f92f544b0dacfe94519988086ec9fe56377d (patch)
tree1750a5a2c469158ad870a7db90585bf3dcb31962 /chrome/browser/bookmarks
parent3214ef107c098d34a2c6201f2d253302bcaa6295 (diff)
downloadchromium_src-baf4f92f544b0dacfe94519988086ec9fe56377d.zip
chromium_src-baf4f92f544b0dacfe94519988086ec9fe56377d.tar.gz
chromium_src-baf4f92f544b0dacfe94519988086ec9fe56377d.tar.bz2
Add NOTREACHED for someone trying to change the title on the bookmark bar folder or other bookmarks folders.
TEST=none BUG=25067 Review URL: http://codereview.chromium.org/293006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29409 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/bookmarks')
-rw-r--r--chrome/browser/bookmarks/bookmark_model.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/bookmarks/bookmark_model.cc b/chrome/browser/bookmarks/bookmark_model.cc
index 6b3e368..6899c5b 100644
--- a/chrome/browser/bookmarks/bookmark_model.cc
+++ b/chrome/browser/bookmarks/bookmark_model.cc
@@ -223,6 +223,11 @@ void BookmarkModel::SetTitle(const BookmarkNode* node,
if (node->GetTitle() == title)
return;
+ if (node == bookmark_bar_node_ || node == other_node_) {
+ NOTREACHED();
+ return;
+ }
+
// The title index doesn't support changing the title, instead we remove then
// add it back.
index_->Remove(node);