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

Unified Diff: chrome/browser/browsing_data/browsing_data_remover.cc

Issue 72613006: Eliminate AutofillWebDataService::FromBrowserContext(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Response to reviews Created 7 years, 1 month 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/browsing_data/browsing_data_remover.cc
diff --git a/chrome/browser/browsing_data/browsing_data_remover.cc b/chrome/browser/browsing_data/browsing_data_remover.cc
index 52bb028a19846567e4ef6c9ed3034ee2604129ae..c4fe1568467d0986a613478f8c4b7a5b2dde0068 100644
--- a/chrome/browser/browsing_data/browsing_data_remover.cc
+++ b/chrome/browser/browsing_data/browsing_data_remover.cc
@@ -48,6 +48,7 @@
#include "chrome/browser/sessions/session_service_factory.h"
#include "chrome/browser/sessions/tab_restore_service.h"
#include "chrome/browser/sessions/tab_restore_service_factory.h"
+#include "chrome/browser/webdata/web_data_service_factory.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#if defined(OS_CHROMEOS)
@@ -352,7 +353,8 @@ void BrowsingDataRemover::RemoveImpl(int remove_mask,
// which these profiles and credit cards were learned. These are a form of
// history, so clear them as well.
scoped_refptr<autofill::AutofillWebDataService> web_data_service =
- autofill::AutofillWebDataService::FromBrowserContext(profile_);
+ WebDataServiceFactory::GetAutofillWebDataForProfile(
+ profile_, Profile::EXPLICIT_ACCESS);
if (web_data_service.get()) {
waiting_for_clear_autofill_origin_urls_ = true;
web_data_service->RemoveOriginURLsModifiedBetween(
@@ -493,7 +495,8 @@ void BrowsingDataRemover::RemoveImpl(int remove_mask,
if (remove_mask & REMOVE_FORM_DATA) {
content::RecordAction(UserMetricsAction("ClearBrowsingData_Autofill"));
scoped_refptr<autofill::AutofillWebDataService> web_data_service =
- autofill::AutofillWebDataService::FromBrowserContext(profile_);
+ WebDataServiceFactory::GetAutofillWebDataForProfile(
+ profile_, Profile::EXPLICIT_ACCESS);
if (web_data_service.get()) {
waiting_for_clear_form_ = true;

Powered by Google App Engine
This is Rietveld 408576698