summaryrefslogtreecommitdiffstats
path: root/chrome/browser/password_manager
diff options
context:
space:
mode:
authorrlp@chromium.org <rlp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-11 03:54:15 +0000
committerrlp@chromium.org <rlp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-11 03:54:15 +0000
commitba30c18a957290ff02ab9872a1a9dd8c4ee2f14a (patch)
treeb7e5213fb01b0f422bb2fd0eb7da523c08de717a /chrome/browser/password_manager
parent2a6f339074bff557adb5253d7165b493a5d758ee (diff)
downloadchromium_src-ba30c18a957290ff02ab9872a1a9dd8c4ee2f14a.zip
chromium_src-ba30c18a957290ff02ab9872a1a9dd8c4ee2f14a.tar.gz
chromium_src-ba30c18a957290ff02ab9872a1a9dd8c4ee2f14a.tar.bz2
Taking over issue 10006037.
Moved WebDataService to ProfileKeyedService James: chrome\browser\ui\intents Peter: chrome\browser\ui\search_engines chrome\browser\search_engines Nicolas: chrome\browser\sync Rachel/Elliot: chrome\browser\profiles and the whole cl BUG=112234 TEST=unit-tests TBR=jhawkins@chromium.org,pkasting@chromium.org,zea@chromium.org,erg@chromium.org,isherman@chromium.org Review URL: https://chromiumcodereview.appspot.com/10185008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136499 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/password_manager')
-rw-r--r--chrome/browser/password_manager/password_store_factory.cc9
-rw-r--r--chrome/browser/password_manager/password_store_win_unittest.cc9
2 files changed, 10 insertions, 8 deletions
diff --git a/chrome/browser/password_manager/password_store_factory.cc b/chrome/browser/password_manager/password_store_factory.cc
index 3878b63..57a135c 100644
--- a/chrome/browser/password_manager/password_store_factory.cc
+++ b/chrome/browser/password_manager/password_store_factory.cc
@@ -11,6 +11,8 @@
#include "chrome/browser/password_manager/password_store_default.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile_dependency_manager.h"
+#include "chrome/browser/webdata/web_data_service.h"
+#include "chrome/browser/webdata/web_data_service_factory.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
@@ -63,10 +65,7 @@ PasswordStoreFactory::PasswordStoreFactory()
: RefcountedProfileKeyedServiceFactory(
"PasswordStore",
ProfileDependencyManager::GetInstance()) {
- // TODO(erg): We must always depend on WebDB; we don't want the dependency
- // graph to be different based on platform.
- //
- // DependsOn(WebDataServiceFactory::GetInstance());
+ DependsOn(WebDataServiceFactory::GetInstance());
}
PasswordStoreFactory::~PasswordStoreFactory() {}
@@ -108,7 +107,7 @@ PasswordStoreFactory::BuildServiceInstanceFor(Profile* profile) const {
#if defined(OS_WIN)
ps = new PasswordStoreWin(
login_db, profile,
- profile->GetWebDataService(Profile::IMPLICIT_ACCESS));
+ WebDataServiceFactory::GetForProfile(profile, Profile::IMPLICIT_ACCESS));
#elif defined(OS_MACOSX)
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseMockKeychain)) {
ps = new PasswordStoreMac(new crypto::MockKeychain(), login_db);
diff --git a/chrome/browser/password_manager/password_store_win_unittest.cc b/chrome/browser/password_manager/password_store_win_unittest.cc
index 0d03e20..ddcfa60 100644
--- a/chrome/browser/password_manager/password_store_win_unittest.cc
+++ b/chrome/browser/password_manager/password_store_win_unittest.cc
@@ -120,8 +120,12 @@ class PasswordStoreWinTest : public testing::Test {
virtual void TearDown() {
if (store_.get())
store_->ShutdownOnUIThread();
- if (wds_.get())
- wds_->Shutdown();
+ wds_->ShutdownOnUIThread();
+ wds_ = NULL;
+ base::WaitableEvent done(false, false);
+ BrowserThread::PostTask(BrowserThread::DB, FROM_HERE,
+ base::Bind(&base::WaitableEvent::Signal, base::Unretained(&done)));
+ done.Wait();
MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
MessageLoop::current()->Run();
db_thread_.Stop();
@@ -250,7 +254,6 @@ TEST_F(PasswordStoreWinTest, DISABLED_OutstandingWDSQueries) {
// Release the PSW and the WDS before the query can return.
store_->ShutdownOnUIThread();
store_ = NULL;
- wds_->Shutdown();
wds_ = NULL;
MessageLoop::current()->RunAllPending();