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

Unified Diff: chrome/browser/memory_purger.cc

Issue 10185008: Taking over issue 10006037: Moved WebDataService to ProfileKeyedService (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 7 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/memory_purger.cc
===================================================================
--- chrome/browser/memory_purger.cc (revision 136877)
+++ chrome/browser/memory_purger.cc (working copy)
@@ -15,6 +15,7 @@
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/webdata/web_data_service.h"
+#include "chrome/browser/webdata/web_data_service_factory.h"
#include "chrome/common/render_messages.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_widget_host.h"
@@ -114,9 +115,10 @@
history_service->UnloadBackend();
// Unload all web databases (freeing memory used to cache sqlite).
- WebDataService* web_data_service =
- profiles[i]->GetWebDataServiceWithoutCreating();
- if (web_data_service)
+ scoped_refptr<WebDataService> web_data_service =
+ WebDataServiceFactory::GetForProfileIfExists(
+ profiles[i], Profile::EXPLICIT_ACCESS);
+ if (web_data_service.get())
web_data_service->UnloadDatabase();
BrowserContext::PurgeMemory(profiles[i]);
« no previous file with comments | « chrome/browser/intents/web_intents_registry_unittest.cc ('k') | chrome/browser/password_manager/password_store_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698