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

Unified Diff: chrome/browser/profiles/profile_impl.cc

Issue 10701043: Make ShortcutsBackend a ProfileKeyedService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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/profiles/profile_impl.cc
===================================================================
--- chrome/browser/profiles/profile_impl.cc (revision 144929)
+++ chrome/browser/profiles/profile_impl.cc (working copy)
@@ -42,6 +42,7 @@
#include "chrome/browser/history/history.h"
#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/history/shortcuts_backend.h"
+#include "chrome/browser/history/shortcuts_backend_factory.h"
#include "chrome/browser/history/top_sites.h"
#include "chrome/browser/instant/instant_controller.h"
#include "chrome/browser/metrics/metrics_service.h"
@@ -796,13 +797,7 @@
}
history::ShortcutsBackend* ProfileImpl::GetShortcutsBackend() {
- // This is called on one thread only - UI, so no magic is needed to protect
- // against the multiple concurrent calls.
- if (!shortcuts_backend_.get()) {
- shortcuts_backend_ = new history::ShortcutsBackend(GetPath(), this);
- CHECK(shortcuts_backend_->Init());
- }
- return shortcuts_backend_.get();
+ return ShortcutsBackendFactory::GetForProfile(this).get();
}
DownloadManagerDelegate* ProfileImpl::GetDownloadManagerDelegate() {

Powered by Google App Engine
This is Rietveld 408576698