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

Unified Diff: chrome/browser/history/history_service_factory.cc

Issue 510033004: Minor history tweaks that I came across while looking at crashes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/history_service_factory.cc
diff --git a/chrome/browser/history/history_service_factory.cc b/chrome/browser/history/history_service_factory.cc
index 35f4493d3cedde8ef7673eeb11e49feeec5a0d2d..ff70c3c70837cc79fe058e087bc3dcc0f3ac2140 100644
--- a/chrome/browser/history/history_service_factory.cc
+++ b/chrome/browser/history/history_service_factory.cc
@@ -69,12 +69,11 @@ HistoryServiceFactory::~HistoryServiceFactory() {
KeyedService* HistoryServiceFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const {
Profile* profile = static_cast<Profile*>(context);
- HistoryService* history_service = new HistoryService(
- ChromeHistoryClientFactory::GetForProfile(profile), profile);
- if (!history_service->Init(profile->GetPath())) {
+ scoped_ptr<HistoryService> history_service(new HistoryService(
+ ChromeHistoryClientFactory::GetForProfile(profile), profile));
+ if (!history_service->Init(profile->GetPath()))
return NULL;
- }
- return history_service;
+ return history_service.release();
}
content::BrowserContext* HistoryServiceFactory::GetBrowserContextToUse(
« no previous file with comments | « chrome/browser/history/history_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698