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

Unified Diff: chrome/browser/automation/testing_automation_provider.cc

Issue 7967024: Profile shouldn't own PersonalDataManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addresses isherman #11 Created 9 years, 3 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 | « chrome/browser/autofill/personal_data_manager_unittest.cc ('k') | chrome/browser/browsing_data_remover.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/automation/testing_automation_provider.cc
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index 71f1eac11174b98dae71ea7744705355676193f2..3a01fbc0075e241080b6d1f77398cbf7933b7363 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -29,6 +29,7 @@
#include "chrome/browser/autofill/autofill_manager.h"
#include "chrome/browser/autofill/credit_card.h"
#include "chrome/browser/autofill/personal_data_manager.h"
+#include "chrome/browser/autofill/personal_data_manager_factory.h"
#include "chrome/browser/automation/automation_browser_tracker.h"
#include "chrome/browser/automation/automation_provider_json.h"
#include "chrome/browser/automation/automation_provider_list.h"
@@ -4398,8 +4399,8 @@ void TestingAutomationProvider::GetAutofillProfile(
TabContentsWrapper* tab_contents =
browser->GetTabContentsWrapperAt(tab_index);
if (tab_contents) {
- PersonalDataManager* pdm = tab_contents->profile()->GetOriginalProfile()
- ->GetPersonalDataManager();
+ PersonalDataManager* pdm = PersonalDataManagerFactory::GetForProfile(
+ tab_contents->profile()->GetOriginalProfile());
if (pdm) {
std::vector<AutofillProfile*> autofill_profiles = pdm->profiles();
std::vector<CreditCard*> credit_cards = pdm->credit_cards();
@@ -4466,7 +4467,7 @@ void TestingAutomationProvider::FillAutofillProfile(
if (tab_contents) {
PersonalDataManager* pdm =
- tab_contents->profile()->GetPersonalDataManager();
+ PersonalDataManagerFactory::GetForProfile(tab_contents->profile());
if (pdm) {
if (profiles || cards) {
// This observer will delete itself.
@@ -4526,8 +4527,8 @@ void TestingAutomationProvider::SubmitAutofillForm(
return;
}
- PersonalDataManager* pdm = tab_contents->profile()->GetOriginalProfile()
- ->GetPersonalDataManager();
+ PersonalDataManager* pdm = PersonalDataManagerFactory::GetForProfile(
+ tab_contents->profile()->GetOriginalProfile());
if (!pdm) {
AutomationJSONReply(this, reply_message)
.SendError("No PersonalDataManager.");
« no previous file with comments | « chrome/browser/autofill/personal_data_manager_unittest.cc ('k') | chrome/browser/browsing_data_remover.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698