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

Unified Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_view_unittest.mm

Issue 10834161: Removing instances of profile_->GetBookmarkModel() as part of converting BookmarkModel to a PKS. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 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
Index: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_view_unittest.mm
===================================================================
--- chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_view_unittest.mm (revision 149630)
+++ chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_view_unittest.mm (working copy)
@@ -6,6 +6,7 @@
#include "base/string16.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
+#include "chrome/browser/bookmarks/bookmark_model_factory.h"
#include "chrome/browser/profiles/profile.h"
#import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.h"
#import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_view.h"
@@ -59,8 +60,8 @@
view_.reset([[BookmarkBarFolderView alloc] init]);
- mock_controller_.reset(GetMockController(YES,
- profile()->GetBookmarkModel()));
+ mock_controller_.reset(GetMockController(
+ YES, BookmarkModelFactory::GetForProfile(profile())));
mock_button_.reset(GetMockButton(mock_controller_.get()));
[view_ awakeFromNib];
@@ -118,7 +119,8 @@
}
id GetMockButton(id mock_controller) {
- BookmarkModel* bookmark_model = profile()->GetBookmarkModel();
+ BookmarkModel* bookmark_model =
+ BookmarkModelFactory::GetForProfile(profile());
const BookmarkNode* node =
bookmark_model->AddURL(bookmark_model->bookmark_bar_node(),
0,
@@ -156,8 +158,8 @@
other_profile->CreateBookmarkModel(true);
other_profile->BlockUntilBookmarkModelLoaded();
- mock_controller_.reset(GetMockController(YES,
- other_profile->GetBookmarkModel()));
+ mock_controller_.reset(GetMockController(
+ YES, BookmarkModelFactory::GetForProfile(other_profile)));
[view_ setController:mock_controller_];
id drag_info = GetFakeDragInfoForType(kBookmarkButtonDragType);
@@ -196,7 +198,8 @@
[mock_controller_ verify];
EXPECT_TRUE([view_ dropIndicatorShown]);
EXPECT_EQ([view_ dropIndicatorPosition], kFakeIndicatorPos);
- mock_controller_.reset(GetMockController(NO, profile()->GetBookmarkModel()));
+ mock_controller_.reset(GetMockController(
+ NO, BookmarkModelFactory::GetForProfile(profile())));
[view_ setController:mock_controller_];
[[[mock_controller_ expect] andReturnUnsignedInteger:NSDragOperationNone]
draggingEntered:drag_info];

Powered by Google App Engine
This is Rietveld 408576698