summaryrefslogtreecommitdiffstats
path: root/chrome/browser/password_manager
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-10 15:52:27 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-10 15:52:27 +0000
commit43211582b1fa8c69136385250e7b0446cf364b5c (patch)
tree655ab01543012b6fd5699dee8fab92876959b7d9 /chrome/browser/password_manager
parentd43970a7ceee5fc5433787b0f28b64234a4039f2 (diff)
downloadchromium_src-43211582b1fa8c69136385250e7b0446cf364b5c.zip
chromium_src-43211582b1fa8c69136385250e7b0446cf364b5c.tar.gz
chromium_src-43211582b1fa8c69136385250e7b0446cf364b5c.tar.bz2
Moving notification types which are chrome specific to a new header file chrome_notification_types.h.
This file lives in chrome\common. The chrome specific notifications start from NOTIFICATION_CONTENT_END which defines the end of the enum used by content to define notification types. The notificaton_type.h file in content\common has been renamed to content_notification_types.h BUG=76698 Review URL: http://codereview.chromium.org/7327007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91972 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/password_manager')
-rw-r--r--chrome/browser/password_manager/password_store_default.cc9
-rw-r--r--chrome/browser/password_manager/password_store_default_unittest.cc9
-rw-r--r--chrome/browser/password_manager/password_store_mac.cc9
-rw-r--r--chrome/browser/password_manager/password_store_x.cc8
-rw-r--r--chrome/browser/password_manager/password_store_x_unittest.cc8
5 files changed, 23 insertions, 20 deletions
diff --git a/chrome/browser/password_manager/password_store_default.cc b/chrome/browser/password_manager/password_store_default.cc
index 0adf126..d3f66f4 100644
--- a/chrome/browser/password_manager/password_store_default.cc
+++ b/chrome/browser/password_manager/password_store_default.cc
@@ -13,6 +13,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/webdata/web_data_service.h"
#include "chrome/common/chrome_constants.h"
+#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
#include "content/browser/browser_thread.h"
#include "content/common/notification_service.h"
@@ -130,7 +131,7 @@ void PasswordStoreDefault::AddLoginImpl(const PasswordForm& form) {
PasswordStoreChangeList changes;
changes.push_back(PasswordStoreChange(PasswordStoreChange::ADD, form));
NotificationService::current()->Notify(
- NotificationType::LOGINS_CHANGED,
+ chrome::NOTIFICATION_LOGINS_CHANGED,
Source<PasswordStore>(this),
Details<PasswordStoreChangeList>(&changes));
}
@@ -141,7 +142,7 @@ void PasswordStoreDefault::UpdateLoginImpl(const PasswordForm& form) {
PasswordStoreChangeList changes;
changes.push_back(PasswordStoreChange(PasswordStoreChange::UPDATE, form));
NotificationService::current()->Notify(
- NotificationType::LOGINS_CHANGED,
+ chrome::NOTIFICATION_LOGINS_CHANGED,
Source<PasswordStore>(this),
Details<PasswordStoreChangeList>(&changes));
}
@@ -152,7 +153,7 @@ void PasswordStoreDefault::RemoveLoginImpl(const PasswordForm& form) {
PasswordStoreChangeList changes;
changes.push_back(PasswordStoreChange(PasswordStoreChange::REMOVE, form));
NotificationService::current()->Notify(
- NotificationType::LOGINS_CHANGED,
+ chrome::NOTIFICATION_LOGINS_CHANGED,
Source<PasswordStore>(this),
Details<PasswordStoreChangeList>(&changes));
}
@@ -170,7 +171,7 @@ void PasswordStoreDefault::RemoveLoginsCreatedBetweenImpl(
**it));
}
NotificationService::current()->Notify(
- NotificationType::LOGINS_CHANGED,
+ chrome::NOTIFICATION_LOGINS_CHANGED,
Source<PasswordStore>(this),
Details<PasswordStoreChangeList>(&changes));
}
diff --git a/chrome/browser/password_manager/password_store_default_unittest.cc b/chrome/browser/password_manager/password_store_default_unittest.cc
index 27bf5f8..06ec903 100644
--- a/chrome/browser/password_manager/password_store_default_unittest.cc
+++ b/chrome/browser/password_manager/password_store_default_unittest.cc
@@ -15,6 +15,7 @@
#include "chrome/browser/password_manager/password_store_default.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/webdata/web_data_service.h"
+#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/signaling_task.h"
#include "chrome/test/testing_profile.h"
@@ -83,7 +84,7 @@ class DBThreadObserverHelper :
void AddObserverTask(PasswordStore* password_store) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
registrar_.Add(&observer_,
- NotificationType::LOGINS_CHANGED,
+ chrome::NOTIFICATION_LOGINS_CHANGED,
Source<PasswordStore>(password_store));
done_event_.Signal();
}
@@ -462,7 +463,7 @@ TEST_F(PasswordStoreDefaultTest, Notifications) {
};
EXPECT_CALL(helper->observer(),
- Observe(NotificationType(NotificationType::LOGINS_CHANGED),
+ Observe(int(chrome::NOTIFICATION_LOGINS_CHANGED),
Source<PasswordStore>(store),
Property(&Details<const PasswordStoreChangeList>::ptr,
Pointee(ElementsAreArray(
@@ -486,7 +487,7 @@ TEST_F(PasswordStoreDefaultTest, Notifications) {
};
EXPECT_CALL(helper->observer(),
- Observe(NotificationType(NotificationType::LOGINS_CHANGED),
+ Observe(int(chrome::NOTIFICATION_LOGINS_CHANGED),
Source<PasswordStore>(store),
Property(&Details<const PasswordStoreChangeList>::ptr,
Pointee(ElementsAreArray(
@@ -505,7 +506,7 @@ TEST_F(PasswordStoreDefaultTest, Notifications) {
};
EXPECT_CALL(helper->observer(),
- Observe(NotificationType(NotificationType::LOGINS_CHANGED),
+ Observe(int(chrome::NOTIFICATION_LOGINS_CHANGED),
Source<PasswordStore>(store),
Property(&Details<const PasswordStoreChangeList>::ptr,
Pointee(ElementsAreArray(
diff --git a/chrome/browser/password_manager/password_store_mac.cc b/chrome/browser/password_manager/password_store_mac.cc
index 589b470..48182e5 100644
--- a/chrome/browser/password_manager/password_store_mac.cc
+++ b/chrome/browser/password_manager/password_store_mac.cc
@@ -20,6 +20,7 @@
#include "chrome/browser/keychain_mac.h"
#include "chrome/browser/password_manager/login_database.h"
#include "chrome/browser/password_manager/password_store_change.h"
+#include "chrome/common/chrome_notification_types.h"
#include "content/common/notification_service.h"
using webkit_glue::PasswordForm;
@@ -770,7 +771,7 @@ void PasswordStoreMac::AddLoginImpl(const PasswordForm& form) {
PasswordStoreChangeList changes;
changes.push_back(PasswordStoreChange(PasswordStoreChange::ADD, form));
NotificationService::current()->Notify(
- NotificationType::LOGINS_CHANGED,
+ chrome::NOTIFICATION_LOGINS_CHANGED,
Source<PasswordStore>(this),
Details<PasswordStoreChangeList>(&changes));
}
@@ -805,7 +806,7 @@ void PasswordStoreMac::UpdateLoginImpl(const PasswordForm& form) {
}
if (!changes.empty()) {
NotificationService::current()->Notify(
- NotificationType::LOGINS_CHANGED,
+ chrome::NOTIFICATION_LOGINS_CHANGED,
Source<PasswordStore>(this),
Details<PasswordStoreChangeList>(&changes));
}
@@ -836,7 +837,7 @@ void PasswordStoreMac::RemoveLoginImpl(const PasswordForm& form) {
PasswordStoreChangeList changes;
changes.push_back(PasswordStoreChange(PasswordStoreChange::REMOVE, form));
NotificationService::current()->Notify(
- NotificationType::LOGINS_CHANGED,
+ chrome::NOTIFICATION_LOGINS_CHANGED,
Source<PasswordStore>(this),
Details<PasswordStoreChangeList>(&changes));
}
@@ -870,7 +871,7 @@ void PasswordStoreMac::RemoveLoginsCreatedBetweenImpl(
**it));
}
NotificationService::current()->Notify(
- NotificationType::LOGINS_CHANGED,
+ chrome::NOTIFICATION_LOGINS_CHANGED,
Source<PasswordStore>(this),
Details<PasswordStoreChangeList>(&changes));
}
diff --git a/chrome/browser/password_manager/password_store_x.cc b/chrome/browser/password_manager/password_store_x.cc
index 46a7740..10d3d7a 100644
--- a/chrome/browser/password_manager/password_store_x.cc
+++ b/chrome/browser/password_manager/password_store_x.cc
@@ -34,7 +34,7 @@ void PasswordStoreX::AddLoginImpl(const PasswordForm& form) {
PasswordStoreChangeList changes;
changes.push_back(PasswordStoreChange(PasswordStoreChange::ADD, form));
NotificationService::current()->Notify(
- NotificationType::LOGINS_CHANGED,
+ chrome::LOGINS_CHANGED,
Source<PasswordStore>(this),
Details<PasswordStoreChangeList>(&changes));
allow_fallback_ = false;
@@ -49,7 +49,7 @@ void PasswordStoreX::UpdateLoginImpl(const PasswordForm& form) {
PasswordStoreChangeList changes;
changes.push_back(PasswordStoreChange(PasswordStoreChange::UPDATE, form));
NotificationService::current()->Notify(
- NotificationType::LOGINS_CHANGED,
+ chrome::LOGINS_CHANGED,
Source<PasswordStore>(this),
Details<PasswordStoreChangeList>(&changes));
allow_fallback_ = false;
@@ -64,7 +64,7 @@ void PasswordStoreX::RemoveLoginImpl(const PasswordForm& form) {
PasswordStoreChangeList changes;
changes.push_back(PasswordStoreChange(PasswordStoreChange::REMOVE, form));
NotificationService::current()->Notify(
- NotificationType::LOGINS_CHANGED,
+ chrome::LOGINS_CHANGED,
Source<PasswordStore>(this),
Details<PasswordStoreChangeList>(&changes));
allow_fallback_ = false;
@@ -88,7 +88,7 @@ void PasswordStoreX::RemoveLoginsCreatedBetweenImpl(
**it));
}
NotificationService::current()->Notify(
- NotificationType::LOGINS_CHANGED,
+ chrome::LOGINS_CHANGED,
Source<PasswordStore>(this),
Details<PasswordStoreChangeList>(&changes));
allow_fallback_ = false;
diff --git a/chrome/browser/password_manager/password_store_x_unittest.cc b/chrome/browser/password_manager/password_store_x_unittest.cc
index 74be072..1a6b9bd 100644
--- a/chrome/browser/password_manager/password_store_x_unittest.cc
+++ b/chrome/browser/password_manager/password_store_x_unittest.cc
@@ -78,7 +78,7 @@ class DBThreadObserverHelper
void AddObserverTask() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
registrar_.Add(&observer_,
- NotificationType::LOGINS_CHANGED,
+ chrome::LOGINS_CHANGED,
NotificationService::AllSources());
done_event_.Signal();
}
@@ -541,7 +541,7 @@ TEST_P(PasswordStoreXTest, Notifications) {
};
EXPECT_CALL(helper->observer(),
- Observe(NotificationType(NotificationType::LOGINS_CHANGED),
+ Observe(int(chrome::LOGINS_CHANGED),
NotificationService::AllSources(),
Property(&Details<const PasswordStoreChangeList>::ptr,
Pointee(ElementsAreArray(
@@ -565,7 +565,7 @@ TEST_P(PasswordStoreXTest, Notifications) {
};
EXPECT_CALL(helper->observer(),
- Observe(NotificationType(NotificationType::LOGINS_CHANGED),
+ Observe(int(chrome::LOGINS_CHANGED),
NotificationService::AllSources(),
Property(&Details<const PasswordStoreChangeList>::ptr,
Pointee(ElementsAreArray(
@@ -584,7 +584,7 @@ TEST_P(PasswordStoreXTest, Notifications) {
};
EXPECT_CALL(helper->observer(),
- Observe(NotificationType(NotificationType::LOGINS_CHANGED),
+ Observe(int(chrome::LOGINS_CHANGED),
NotificationService::AllSources(),
Property(&Details<const PasswordStoreChangeList>::ptr,
Pointee(ElementsAreArray(