summaryrefslogtreecommitdiffstats
path: root/chrome/browser/password_manager
diff options
context:
space:
mode:
authorchron@chromium.org <chron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-12 02:10:46 +0000
committerchron@chromium.org <chron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-12 02:10:46 +0000
commitab23dbedf7ff80bc6de6cb4da5d6d965f5525a4d (patch)
tree53ef4c5e622999b4185ee28f2e965c8ad9517325 /chrome/browser/password_manager
parent83a18417667c673f30ca30a59cbbec2dd54c82d9 (diff)
downloadchromium_src-ab23dbedf7ff80bc6de6cb4da5d6d965f5525a4d.zip
chromium_src-ab23dbedf7ff80bc6de6cb4da5d6d965f5525a4d.tar.gz
chromium_src-ab23dbedf7ff80bc6de6cb4da5d6d965f5525a4d.tar.bz2
Add token serialization to token_service.
The token service now supports serialization of tokens into the web database. The token service doesn't actually know the email of the user though, and it's assumed that whoever is using the token service does. Not sure whether that's a bad choice or not, open to suggestions. This CL adds a new DB table. Design comments / corrections are welcome. Testing in Chromium OS is in progress and not yet done. This CL will not be submitted prior to more Chromium OS testing. BUG=47092,47093 TEST=Unit tests included Review URL: http://codereview.chromium.org/3061025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55835 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/password_manager')
-rw-r--r--chrome/browser/password_manager/password_store_default_unittest.cc15
-rw-r--r--chrome/browser/password_manager/password_store_win_unittest.cc12
-rw-r--r--chrome/browser/password_manager/password_store_x_unittest.cc12
3 files changed, 5 insertions, 34 deletions
diff --git a/chrome/browser/password_manager/password_store_default_unittest.cc b/chrome/browser/password_manager/password_store_default_unittest.cc
index f5629a4..7b4ef0b 100644
--- a/chrome/browser/password_manager/password_store_default_unittest.cc
+++ b/chrome/browser/password_manager/password_store_default_unittest.cc
@@ -14,6 +14,7 @@
#include "chrome/browser/webdata/web_data_service.h"
#include "chrome/common/notification_service.h"
#include "chrome/common/pref_names.h"
+#include "chrome/test/signaling_task.h"
#include "chrome/test/testing_profile.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -41,17 +42,6 @@ class MockWebDataServiceConsumer : public WebDataServiceConsumer {
const WDTypedResult*));
};
-class SignalingTask : public Task {
- public:
- explicit SignalingTask(WaitableEvent* event) : event_(event) {
- }
- virtual void Run() {
- event_->Signal();
- }
- private:
- WaitableEvent* event_;
-};
-
class MockNotificationObserver : public NotificationObserver {
public:
MOCK_METHOD3(Observe, void(NotificationType,
@@ -243,7 +233,8 @@ TEST_F(PasswordStoreDefaultTest, Migration) {
// Initializing the PasswordStore should trigger a migration.
scoped_refptr<PasswordStoreDefault> store(
- new PasswordStoreDefault(login_db_.release(), profile_.get(), wds_.get()));
+ new PasswordStoreDefault(login_db_.release(),
+ profile_.get(), wds_.get()));
store->Init();
// Check that the migration preference has not been initialized;
diff --git a/chrome/browser/password_manager/password_store_win_unittest.cc b/chrome/browser/password_manager/password_store_win_unittest.cc
index 987c95e..6bdea02 100644
--- a/chrome/browser/password_manager/password_store_win_unittest.cc
+++ b/chrome/browser/password_manager/password_store_win_unittest.cc
@@ -17,6 +17,7 @@
#include "chrome/browser/password_manager/password_store_win.h"
#include "chrome/browser/password_manager/ie7_password.h"
#include "chrome/common/pref_names.h"
+#include "chrome/test/signaling_task.h"
#include "chrome/test/testing_profile.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -41,17 +42,6 @@ public:
void(WebDataService::Handle, const WDTypedResult*));
};
-class SignalingTask : public Task {
- public:
- explicit SignalingTask(WaitableEvent* event) : event_(event) {
- }
- virtual void Run() {
- event_->Signal();
- }
- private:
- WaitableEvent* event_;
-};
-
} // anonymous namespace
typedef std::vector<PasswordForm*> VectorOfForms;
diff --git a/chrome/browser/password_manager/password_store_x_unittest.cc b/chrome/browser/password_manager/password_store_x_unittest.cc
index a172503..b8f56db 100644
--- a/chrome/browser/password_manager/password_store_x_unittest.cc
+++ b/chrome/browser/password_manager/password_store_x_unittest.cc
@@ -14,6 +14,7 @@
#include "chrome/browser/webdata/web_data_service.h"
#include "chrome/common/notification_service.h"
#include "chrome/common/pref_names.h"
+#include "chrome/test/signaling_task.h"
#include "chrome/test/testing_profile.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -43,17 +44,6 @@ class MockWebDataServiceConsumer : public WebDataServiceConsumer {
const WDTypedResult*));
};
-class SignalingTask : public Task {
- public:
- explicit SignalingTask(WaitableEvent* event) : event_(event) {
- }
- virtual void Run() {
- event_->Signal();
- }
- private:
- WaitableEvent* event_;
-};
-
class MockNotificationObserver : public NotificationObserver {
public:
MOCK_METHOD3(Observe, void(NotificationType,