Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
Make ChromeBookmarkClient::CanSetPermanentNodeTitle say true for the …
Browse files Browse the repository at this point in the history
…supervised node.

The title can actually change when switching to a different translation, which would trigger a NOTREACHED in BookmarkModel::SetTitle.

BUG=459448

Review URL: https://codereview.chromium.org/946363002

Cr-Commit-Position: refs/heads/master@{#317587}
  • Loading branch information
treib authored and Commit bot committed Feb 23, 2015
1 parent dda74d8 commit 2d81cac
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions chrome/browser/bookmarks/chrome_bookmark_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,13 @@ bookmarks::LoadExtraCallback ChromeBookmarkClient::GetLoadExtraNodesCallback() {
bool ChromeBookmarkClient::CanSetPermanentNodeTitle(
const BookmarkNode* permanent_node) {
// The |managed_node_| can have its title updated if the user signs in or
// out, since the name of the managed domain can appear in it. The
// |supervised_node_| has a fixed title which can never be updated.
// out, since the name of the managed domain can appear in it.
// Also, both |managed_node_| and |supervised_node_| can have their title
// updated on locale changes (crbug.com/459448).
return (!bookmarks::IsDescendantOf(permanent_node, managed_node_) &&
!bookmarks::IsDescendantOf(permanent_node, supervised_node_)) ||
permanent_node == managed_node_;
permanent_node == managed_node_ ||
permanent_node == supervised_node_;
}

bool ChromeBookmarkClient::CanSyncNode(const BookmarkNode* node) {
Expand Down

0 comments on commit 2d81cac

Please sign in to comment.