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

Unified Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell_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_button_cell_unittest.mm
===================================================================
--- chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell_unittest.mm (revision 148477)
+++ chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell_unittest.mm (working copy)
@@ -5,6 +5,7 @@
#include "base/memory/scoped_nsobject.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
+#include "chrome/browser/bookmarks/bookmark_model_factory.h"
#import "chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.h"
#import "chrome/browser/ui/cocoa/bookmarks/bookmark_menu.h"
#include "chrome/browser/ui/cocoa/cocoa_profile_test.h"
@@ -95,7 +96,7 @@
[cell setMenu:[[[BookmarkMenu alloc] initWithTitle:@"foo"] autorelease]];
EXPECT_FALSE([cell menu]);
- BookmarkModel* model = profile()->GetBookmarkModel();
+ BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile());
const BookmarkNode* node = model->bookmark_bar_node();
[cell setEmpty:NO];
[cell setBookmarkNode:node];
@@ -108,7 +109,7 @@
}
TEST_F(BookmarkButtonCellTest, BookmarkNode) {
- BookmarkModel& model(*(profile()->GetBookmarkModel()));
+ BookmarkModel& model(*(BookmarkModelFactory::GetForProfile(profile())));
scoped_nsobject<BookmarkButtonCell> cell(
[[BookmarkButtonCell alloc] initTextCell:@"Testing"]);
@@ -157,7 +158,7 @@
// Subfolder arrow details.
TEST_F(BookmarkButtonCellTest, FolderArrow) {
- BookmarkModel* model = profile()->GetBookmarkModel();
+ BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile());
const BookmarkNode* bar = model->bookmark_bar_node();
const BookmarkNode* node = model->AddURL(bar, bar->child_count(),
ASCIIToUTF16("title"),
@@ -181,7 +182,7 @@
}
TEST_F(BookmarkButtonCellTest, VerticalTextOffset) {
- BookmarkModel* model = profile()->GetBookmarkModel();
+ BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile());
const BookmarkNode* bar = model->bookmark_bar_node();
const BookmarkNode* node = model->AddURL(bar, bar->child_count(),
ASCIIToUTF16("title"),

Powered by Google App Engine
This is Rietveld 408576698