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

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

Issue 10827060: 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, 5 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_view_unittest.mm
===================================================================
--- chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view_unittest.mm (revision 148477)
+++ chrome/browser/ui/cocoa/bookmarks/bookmark_bar_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_controller.h"
#import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view.h"
@@ -212,7 +213,8 @@
[view_ setController:info.get()];
[info reset];
- BookmarkModel* bookmark_model = profile()->GetBookmarkModel();
+ BookmarkModel* bookmark_model =
+ BookmarkModelFactory::GetForProfile(profile());
const BookmarkNode* node =
bookmark_model->AddURL(bookmark_model->bookmark_bar_node(),
0,
@@ -251,7 +253,8 @@
other_profile->CreateBookmarkModel(true);
other_profile->BlockUntilBookmarkModelLoaded();
- BookmarkModel* bookmark_model = profile()->GetBookmarkModel();
+ BookmarkModel* bookmark_model =
+ BookmarkModelFactory::GetForProfile(profile());
const BookmarkNode* node =
bookmark_model->AddURL(bookmark_model->bookmark_bar_node(),
0,
@@ -268,7 +271,7 @@
[info setDraggingSource:dragged_button.get()];
[info setDragDataType:kBookmarkButtonDragType];
[info setButton:dragged_button.get()];
- [info setBookmarkModel:other_profile->GetBookmarkModel()];
+ [info setBookmarkModel:BookmarkModelFactory::GetForProfile(other_profile)];
EXPECT_EQ([view_ draggingEntered:(id)info.get()], NSDragOperationMove);
EXPECT_TRUE([view_ performDragOperation:(id)info.get()]);
EXPECT_TRUE([info dragButtonToPong]);

Powered by Google App Engine
This is Rietveld 408576698