| Index: chrome/browser/password_manager/password_store_factory.cc
|
| diff --git a/chrome/browser/password_manager/password_store_factory.cc b/chrome/browser/password_manager/password_store_factory.cc
|
| index a143c28ade0060238de2d7da5ee172954d82b450..e70b1cf8d3d16d613c270da1ff20434282a09389 100644
|
| --- a/chrome/browser/password_manager/password_store_factory.cc
|
| +++ b/chrome/browser/password_manager/password_store_factory.cc
|
| @@ -7,6 +7,7 @@
|
| #include "base/command_line.h"
|
| #include "base/environment.h"
|
| #include "chrome/browser/password_manager/login_database.h"
|
| +#include "chrome/browser/password_manager/password_store.h"
|
| #include "chrome/browser/password_manager/password_store_default.h"
|
| #include "chrome/browser/prefs/pref_service.h"
|
| #include "chrome/browser/profiles/profile_dependency_manager.h"
|
| @@ -40,7 +41,7 @@ const LocalProfileId kInvalidLocalProfileId =
|
| } // namespace
|
| #endif
|
|
|
| -PasswordStore* PasswordStoreFactory::GetForProfile(
|
| +scoped_refptr<PasswordStore> PasswordStoreFactory::GetForProfile(
|
| Profile* profile,
|
| Profile::ServiceAccessType sat) {
|
| if (sat == Profile::IMPLICIT_ACCESS && profile->IsOffTheRecord()) {
|
| @@ -48,8 +49,8 @@ PasswordStore* PasswordStoreFactory::GetForProfile(
|
| return NULL;
|
| }
|
|
|
| - return static_cast<PasswordStore*>(GetInstance()->GetBaseForProfile(
|
| - profile, true));
|
| + return static_cast<PasswordStore*>(
|
| + GetInstance()->GetServiceForProfile(profile, true).get());
|
| }
|
|
|
| // static
|
| @@ -91,8 +92,8 @@ LocalProfileId PasswordStoreFactory::GetLocalProfileId(
|
| }
|
| #endif // !defined(OS_MACOSX) && !defined(OS_CHROMEOS) && defined(OS_POSIX)
|
|
|
| -RefcountedProfileKeyedService* PasswordStoreFactory::BuildServiceInstanceFor(
|
| - Profile* profile) const {
|
| +scoped_refptr<RefcountedProfileKeyedService>
|
| +PasswordStoreFactory::BuildServiceInstanceFor(Profile* profile) const {
|
| scoped_refptr<PasswordStore> ps;
|
| FilePath login_db_file_path = profile->GetPath();
|
| login_db_file_path = login_db_file_path.Append(chrome::kLoginDataFileName);
|
| @@ -185,7 +186,7 @@ RefcountedProfileKeyedService* PasswordStoreFactory::BuildServiceInstanceFor(
|
| return NULL;
|
| }
|
|
|
| - return ps.release();
|
| + return ps;
|
| }
|
|
|
| void PasswordStoreFactory::RegisterUserPrefs(PrefService* prefs) {
|
|
|