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

Unified Diff: chrome/browser/bookmarks/bookmark_html_writer.cc

Issue 10821097: 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/bookmarks/bookmark_html_writer.cc
===================================================================
--- chrome/browser/bookmarks/bookmark_html_writer.cc (revision 149452)
+++ chrome/browser/bookmarks/bookmark_html_writer.cc (working copy)
@@ -19,6 +19,7 @@
#include "base/values.h"
#include "chrome/browser/bookmarks/bookmark_codec.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
+#include "chrome/browser/bookmarks/bookmark_model_factory.h"
#include "chrome/browser/history/history_types.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_notification_types.h"
@@ -399,9 +400,10 @@
}
void BookmarkFaviconFetcher::ExportBookmarks() {
- ExtractUrls(profile_->GetBookmarkModel()->bookmark_bar_node());
- ExtractUrls(profile_->GetBookmarkModel()->other_node());
- ExtractUrls(profile_->GetBookmarkModel()->mobile_node());
+ ExtractUrls(BookmarkModelFactory::GetForProfile(
+ profile_)->bookmark_bar_node());
+ ExtractUrls(BookmarkModelFactory::GetForProfile(profile_)->other_node());
+ ExtractUrls(BookmarkModelFactory::GetForProfile(profile_)->mobile_node());
if (!bookmark_urls_.empty())
FetchNextFavicon();
else
@@ -437,7 +439,8 @@
BrowserThread::PostTask(
BrowserThread::FILE, FROM_HERE,
base::Bind(&Writer::DoWrite,
- new Writer(codec.Encode(profile_->GetBookmarkModel()),
+ new Writer(codec.Encode(BookmarkModelFactory::GetForProfile(
+ profile_)),
path_, favicons_map_.release(), observer_)));
if (fetcher != NULL) {
MessageLoop::current()->DeleteSoon(FROM_HERE, fetcher);
« no previous file with comments | « chrome/browser/bookmarks/bookmark_extension_api.cc ('k') | chrome/browser/bookmarks/bookmark_html_writer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698