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

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

Issue 9665007: Profile refactoring: Remove all PasswordStore code from the Profile interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Win and Mac Created 8 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
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 6cb173d452d44f6018d3ab02ade8ff81c05ded78..76f4b17f2caaddb56b01e0c271834bac248a6753 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -69,6 +69,7 @@
#include "chrome/browser/notifications/notification_ui_manager.h"
#include "chrome/browser/password_manager/password_store.h"
#include "chrome/browser/password_manager/password_store_change.h"
+#include "chrome/browser/password_manager/password_store_factory.h"
#include "chrome/browser/platform_util.h"
#include "chrome/browser/plugin_prefs.h"
#include "chrome/browser/prefs/pref_service.h"
@@ -3982,8 +3983,8 @@ void TestingAutomationProvider::AddSavedPassword(
GetPasswordFormFromDict(*password_dict);
// Use IMPLICIT_ACCESS since new passwords aren't added in incognito mode.
- PasswordStore* password_store =
- browser->profile()->GetPasswordStore(Profile::IMPLICIT_ACCESS);
+ PasswordStore* password_store = PasswordStoreFactory::GetForProfile(
+ browser->profile(), Profile::IMPLICIT_ACCESS);
// The password store does not exist for an incognito window.
if (password_store == NULL) {
@@ -4028,8 +4029,8 @@ void TestingAutomationProvider::RemoveSavedPassword(
GetPasswordFormFromDict(*password_dict);
// Use EXPLICIT_ACCESS since passwords can be removed in incognito mode.
- PasswordStore* password_store =
- browser->profile()->GetPasswordStore(Profile::EXPLICIT_ACCESS);
+ PasswordStore* password_store = PasswordStoreFactory::GetForProfile(
+ browser->profile(), Profile::EXPLICIT_ACCESS);
if (password_store == NULL) {
AutomationJSONReply(this, reply_message).SendError(
"Unable to get password store.");
@@ -4054,8 +4055,8 @@ void TestingAutomationProvider::GetSavedPasswords(
IPC::Message* reply_message) {
// Use EXPLICIT_ACCESS since saved passwords can be retrieved in
// incognito mode.
- PasswordStore* password_store =
- browser->profile()->GetPasswordStore(Profile::EXPLICIT_ACCESS);
+ PasswordStore* password_store = PasswordStoreFactory::GetForProfile(
+ browser->profile(), Profile::EXPLICIT_ACCESS);
if (password_store == NULL) {
AutomationJSONReply reply(this, reply_message);
« no previous file with comments | « no previous file | chrome/browser/browsing_data_remover.cc » ('j') | chrome/browser/password_manager/password_store_default.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698