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

Unified Diff: chrome/browser/importer/external_process_importer_host.cc

Issue 2216713002: Use BookmarkModelFactory::GetForBrowserContext everywhere (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bookmarks
Patch Set: Replace in .mm files Created 4 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
« no previous file with comments | « chrome/browser/history/history_service_factory.cc ('k') | chrome/browser/importer/profile_writer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/importer/external_process_importer_host.cc
diff --git a/chrome/browser/importer/external_process_importer_host.cc b/chrome/browser/importer/external_process_importer_host.cc
index 6552f7f268f8e8fbbbda7f0812216913e43979f8..9f68e8ad6df2bc0f5d9a2f984a866d76ada0ee43 100644
--- a/chrome/browser/importer/external_process_importer_host.cc
+++ b/chrome/browser/importer/external_process_importer_host.cc
@@ -12,6 +12,7 @@
#include "chrome/browser/importer/importer_lock_dialog.h"
#include "chrome/browser/importer/importer_progress_observer.h"
#include "chrome/browser/importer/in_process_importer_bridge.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "components/bookmarks/browser/bookmark_model.h"
#include "components/search_engines/template_url_service.h"
@@ -94,7 +95,7 @@ void ExternalProcessImporterHost::NotifyImportEnded() {
ExternalProcessImporterHost::~ExternalProcessImporterHost() {
if (installed_bookmark_observer_) {
DCHECK(profile_);
- BookmarkModelFactory::GetForProfile(profile_)->RemoveObserver(this);
+ BookmarkModelFactory::GetForBrowserContext(profile_)->RemoveObserver(this);
}
}
@@ -192,7 +193,7 @@ void ExternalProcessImporterHost::CheckForLoadedModels(uint16_t items) {
// BookmarkModel should be loaded before adding IE favorites. So we observe
// the BookmarkModel if needed, and start the task after it has been loaded.
if ((items & importer::FAVORITES) && !writer_->BookmarkModelIsLoaded()) {
- BookmarkModelFactory::GetForProfile(profile_)->AddObserver(this);
+ BookmarkModelFactory::GetForBrowserContext(profile_)->AddObserver(this);
waiting_for_bookmarkbar_model_ = true;
installed_bookmark_observer_ = true;
}
« no previous file with comments | « chrome/browser/history/history_service_factory.cc ('k') | chrome/browser/importer/profile_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698