| Index: chrome/browser/memory_purger.cc
|
| diff --git a/chrome/browser/memory_purger.cc b/chrome/browser/memory_purger.cc
|
| index 98ab3011652cfb788548ee695897a33380e4e56a..6edceffb081df6555dfa90e21737fce86b3adea2 100644
|
| --- a/chrome/browser/memory_purger.cc
|
| +++ b/chrome/browser/memory_purger.cc
|
| @@ -117,11 +117,10 @@ void MemoryPurger::PurgeBrowser() {
|
| history_service->UnloadBackend();
|
|
|
| // Unload all web databases (freeing memory used to cache sqlite).
|
| - WebDataServiceWrapper* wds_wrapper =
|
| - WebDataServiceFactory::GetForProfileIfExists(
|
| - profiles[i], Profile::EXPLICIT_ACCESS);
|
| - if (wds_wrapper && wds_wrapper->GetWebData())
|
| - wds_wrapper->GetWebData()->UnloadDatabase();
|
| + scoped_refptr<WebDataService> wds =
|
| + WebDataServiceFactory::GetWebDataServiceForProfileIfExists(profiles[i]);
|
| + if (wds)
|
| + wds->UnloadDatabase();
|
|
|
| BrowserContext::PurgeMemory(profiles[i]);
|
| }
|
|
|