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

Unified Diff: components/autofill/browser/personal_data_manager.cc

Issue 12851008: Create a common base class for all the webdatas (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to committed parent and head. Created 7 years, 9 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 | « components/autofill/browser/autocomplete_history_manager_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/browser/personal_data_manager.cc
diff --git a/components/autofill/browser/personal_data_manager.cc b/components/autofill/browser/personal_data_manager.cc
index 7317a6b8998305247638f9c842cbe7c3874d68ed..5743f03d4708e91c28abb3bee7134501c4657631 100644
--- a/components/autofill/browser/personal_data_manager.cc
+++ b/components/autofill/browser/personal_data_manager.cc
@@ -121,7 +121,7 @@ void PersonalDataManager::Init(BrowserContext* browser_context) {
browser_context_ = browser_context;
metric_logger_->LogIsAutofillEnabledAtStartup(IsAutofillEnabled());
- scoped_ptr<AutofillWebDataService> autofill_data(
+ scoped_refptr<AutofillWebDataService> autofill_data(
AutofillWebDataService::FromBrowserContext(browser_context_));
// WebDataService may not be available in tests.
@@ -197,7 +197,7 @@ void PersonalDataManager::Observe(int type,
DCHECK_EQ(type, chrome::NOTIFICATION_AUTOFILL_MULTIPLE_CHANGED);
if (DCHECK_IS_ON()) {
- scoped_ptr<AutofillWebDataService> autofill_data(
+ scoped_refptr<AutofillWebDataService> autofill_data(
AutofillWebDataService::FromBrowserContext(browser_context_));
DCHECK(autofill_data.get() &&
@@ -337,7 +337,7 @@ void PersonalDataManager::AddProfile(const AutofillProfile& profile) {
if (FindByGUID<AutofillProfile>(web_profiles_, profile.guid()))
return;
- scoped_ptr<AutofillWebDataService> autofill_data(
+ scoped_refptr<AutofillWebDataService> autofill_data(
AutofillWebDataService::FromBrowserContext(browser_context_));
if (!autofill_data.get())
return;
@@ -365,7 +365,7 @@ void PersonalDataManager::UpdateProfile(const AutofillProfile& profile) {
return;
}
- scoped_ptr<AutofillWebDataService> autofill_data(
+ scoped_refptr<AutofillWebDataService> autofill_data(
AutofillWebDataService::FromBrowserContext(browser_context_));
if (!autofill_data.get())
return;
@@ -398,7 +398,7 @@ void PersonalDataManager::AddCreditCard(const CreditCard& credit_card) {
if (FindByGUID<CreditCard>(credit_cards_, credit_card.guid()))
return;
- scoped_ptr<AutofillWebDataService> autofill_data(
+ scoped_refptr<AutofillWebDataService> autofill_data(
AutofillWebDataService::FromBrowserContext(browser_context_));
if (!autofill_data.get())
return;
@@ -426,7 +426,7 @@ void PersonalDataManager::UpdateCreditCard(const CreditCard& credit_card) {
return;
}
- scoped_ptr<AutofillWebDataService> autofill_data(
+ scoped_refptr<AutofillWebDataService> autofill_data(
AutofillWebDataService::FromBrowserContext(browser_context_));
if (!autofill_data.get())
return;
@@ -448,7 +448,7 @@ void PersonalDataManager::RemoveByGUID(const std::string& guid) {
if (!is_credit_card && !is_profile)
return;
- scoped_ptr<AutofillWebDataService> autofill_data(
+ scoped_refptr<AutofillWebDataService> autofill_data(
AutofillWebDataService::FromBrowserContext(browser_context_));
if (!autofill_data.get())
return;
@@ -720,7 +720,7 @@ void PersonalDataManager::SetProfiles(std::vector<AutofillProfile>* profiles) {
address_of<AutofillProfile>);
AutofillProfile::AdjustInferredLabels(&profile_pointers);
- scoped_ptr<AutofillWebDataService> autofill_data(
+ scoped_refptr<AutofillWebDataService> autofill_data(
AutofillWebDataService::FromBrowserContext(browser_context_));
if (!autofill_data.get())
return;
@@ -772,7 +772,7 @@ void PersonalDataManager::SetCreditCards(
std::mem_fun_ref(&CreditCard::IsEmpty)),
credit_cards->end());
- scoped_ptr<AutofillWebDataService> autofill_data(
+ scoped_refptr<AutofillWebDataService> autofill_data(
AutofillWebDataService::FromBrowserContext(browser_context_));
if (!autofill_data.get())
return;
@@ -812,7 +812,7 @@ void PersonalDataManager::SetCreditCards(
}
void PersonalDataManager::LoadProfiles() {
- scoped_ptr<AutofillWebDataService> autofill_data(
+ scoped_refptr<AutofillWebDataService> autofill_data(
AutofillWebDataService::FromBrowserContext(browser_context_));
if (!autofill_data.get()) {
NOTREACHED();
@@ -832,7 +832,7 @@ void PersonalDataManager::LoadAuxiliaryProfiles() {
#endif
void PersonalDataManager::LoadCreditCards() {
- scoped_ptr<AutofillWebDataService> autofill_data(
+ scoped_refptr<AutofillWebDataService> autofill_data(
AutofillWebDataService::FromBrowserContext(browser_context_));
if (!autofill_data.get()) {
NOTREACHED();
@@ -883,7 +883,7 @@ void PersonalDataManager::ReceiveLoadedCreditCards(
void PersonalDataManager::CancelPendingQuery(
WebDataServiceBase::Handle* handle) {
if (*handle) {
- scoped_ptr<AutofillWebDataService> autofill_data(
+ scoped_refptr<AutofillWebDataService> autofill_data(
AutofillWebDataService::FromBrowserContext(browser_context_));
if (!autofill_data.get()) {
NOTREACHED();
« no previous file with comments | « components/autofill/browser/autocomplete_history_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698