| Index: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
|
| diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
|
| index f06bf77cb6adc2bdd345eb1e516ee3c6c8df4642..4e3977570804a243dc7e8eca98db92780676db75 100644
|
| --- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
|
| +++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
|
| @@ -10,8 +10,6 @@
|
| #include "base/strings/sys_string_conversions.h"
|
| #include "chrome/browser/bookmarks/bookmark_model_factory.h"
|
| #include "chrome/browser/bookmarks/bookmark_stats.h"
|
| -#include "chrome/browser/bookmarks/chrome_bookmark_client.h"
|
| -#include "chrome/browser/bookmarks/chrome_bookmark_client_factory.h"
|
| #include "chrome/browser/prefs/incognito_mode_prefs.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/themes/theme_properties.h"
|
| @@ -259,8 +257,6 @@ void RecordAppLaunch(Profile* profile, GURL url) {
|
| browser_ = browser;
|
| initialWidth_ = initialWidth;
|
| bookmarkModel_ = BookmarkModelFactory::GetForProfile(browser_->profile());
|
| - bookmarkClient_ =
|
| - ChromeBookmarkClientFactory::GetForProfile(browser_->profile());
|
| buttons_.reset([[NSMutableArray alloc] init]);
|
| delegate_ = delegate;
|
| resizeDelegate_ = resizeDelegate;
|
| @@ -595,13 +591,13 @@ void RecordAppLaunch(Profile* profile, GURL url) {
|
| if (!node)
|
| return defaultImage_;
|
|
|
| - if (node == bookmarkClient_->managed_node()) {
|
| + if (node == bookmarkModel_->managed_node()) {
|
| // Most users never see this node, so the image is only loaded if needed.
|
| ResourceBundle& rb = ResourceBundle::GetSharedInstance();
|
| return rb.GetNativeImageNamed(IDR_BOOKMARK_BAR_FOLDER_MANAGED).ToNSImage();
|
| }
|
|
|
| - if (node == bookmarkClient_->supervised_node()) {
|
| + if (node == bookmarkModel_->supervised_node()) {
|
| // Most users never see this node, so the image is only loaded if needed.
|
| ResourceBundle& rb = ResourceBundle::GetSharedInstance();
|
| return rb.GetNativeImageNamed(
|
| @@ -631,7 +627,7 @@ void RecordAppLaunch(Profile* profile, GURL url) {
|
| - (BOOL)canEditBookmark:(const BookmarkNode*)node {
|
| // Don't allow edit/delete of the permanent nodes.
|
| if (node == nil || bookmarkModel_->is_permanent_node(node) ||
|
| - !bookmarkClient_->CanBeEditedByUser(node)) {
|
| + !bookmarkModel_->CanBeEditedByUser(node)) {
|
| return NO;
|
| }
|
| return YES;
|
| @@ -1292,7 +1288,7 @@ void RecordAppLaunch(Profile* profile, GURL url) {
|
| if (managedBookmarksButton_.get()) {
|
| // The node's title might have changed if the user signed in or out.
|
| // Make sure it's up to date now.
|
| - const BookmarkNode* node = bookmarkClient_->managed_node();
|
| + const BookmarkNode* node = bookmarkModel_->managed_node();
|
| NSString* title = base::SysUTF16ToNSString(node->GetTitle());
|
| NSCell* cell = [managedBookmarksButton_ cell];
|
| [cell setTitle:title];
|
| @@ -1303,7 +1299,7 @@ void RecordAppLaunch(Profile* profile, GURL url) {
|
| return;
|
| }
|
|
|
| - NSCell* cell = [self cellForBookmarkNode:bookmarkClient_->managed_node()];
|
| + NSCell* cell = [self cellForBookmarkNode:bookmarkModel_->managed_node()];
|
| managedBookmarksButton_.reset([self createCustomBookmarkButtonForCell:cell]);
|
| [managedBookmarksButton_ setAction:@selector(openBookmarkFolderFromButton:)];
|
| view_id_util::SetID(managedBookmarksButton_.get(), VIEW_ID_MANAGED_BOOKMARKS);
|
| @@ -1320,7 +1316,7 @@ void RecordAppLaunch(Profile* profile, GURL url) {
|
| return;
|
| }
|
|
|
| - NSCell* cell = [self cellForBookmarkNode:bookmarkClient_->supervised_node()];
|
| + NSCell* cell = [self cellForBookmarkNode:bookmarkModel_->supervised_node()];
|
| supervisedBookmarksButton_.reset(
|
| [self createCustomBookmarkButtonForCell:cell]);
|
| [supervisedBookmarksButton_
|
| @@ -2084,9 +2080,9 @@ static BOOL ValueInRangeInclusive(CGFloat low, CGFloat value, CGFloat high) {
|
| destIndex = [self indexForDragToPoint:point];
|
| }
|
|
|
| - if (!bookmarkClient_->CanBeEditedByUser(destParent))
|
| + if (!bookmarkModel_->CanBeEditedByUser(destParent))
|
| return NO;
|
| - if (!bookmarkClient_->CanBeEditedByUser(sourceNode))
|
| + if (!bookmarkModel_->CanBeEditedByUser(sourceNode))
|
| copy = YES;
|
|
|
| // Be sure we don't try and drop a folder into itself.
|
| @@ -2803,7 +2799,7 @@ static BOOL ValueInRangeInclusive(CGFloat low, CGFloat value, CGFloat high) {
|
| destIndex = [self indexForDragToPoint:point];
|
| }
|
|
|
| - if (!bookmarkClient_->CanBeEditedByUser(destParent))
|
| + if (!bookmarkModel_->CanBeEditedByUser(destParent))
|
| return NO;
|
|
|
| // Don't add the bookmarks if the destination index shows an error.
|
|
|