| 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(
|
|
|