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

Unified Diff: chrome/browser/password_manager/password_store_x_unittest.cc

Issue 16296002: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 7 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/password_manager/password_store_x_unittest.cc
diff --git a/chrome/browser/password_manager/password_store_x_unittest.cc b/chrome/browser/password_manager/password_store_x_unittest.cc
index 6be0ab94b1907e8a45e04a336d301f32e83856db..a6b5bc3f750eebb5b5eef71c5d706fe0619d4ad2 100644
--- a/chrome/browser/password_manager/password_store_x_unittest.cc
+++ b/chrome/browser/password_manager/password_store_x_unittest.cc
@@ -342,18 +342,18 @@ TEST_P(PasswordStoreXTest, Notifications) {
scoped_ptr<PasswordForm> form(CreatePasswordFormFromData(form_data));
scoped_refptr<DBThreadObserverHelper> helper = new DBThreadObserverHelper;
- helper->Init(store);
+ helper->Init(store.get());
const PasswordStoreChange expected_add_changes[] = {
PasswordStoreChange(PasswordStoreChange::ADD, *form),
};
- EXPECT_CALL(helper->observer(),
+ EXPECT_CALL(
+ helper->observer(),
Observe(int(chrome::NOTIFICATION_LOGINS_CHANGED),
- content::Source<PasswordStore>(store),
+ content::Source<PasswordStore>(store.get()),
Property(&content::Details<const PasswordStoreChangeList>::ptr,
- Pointee(ElementsAreArray(
- expected_add_changes)))));
+ Pointee(ElementsAreArray(expected_add_changes)))));
// Adding a login should trigger a notification.
store->AddLogin(*form);
@@ -372,12 +372,12 @@ TEST_P(PasswordStoreXTest, Notifications) {
PasswordStoreChange(PasswordStoreChange::UPDATE, *form),
};
- EXPECT_CALL(helper->observer(),
+ EXPECT_CALL(
+ helper->observer(),
Observe(int(chrome::NOTIFICATION_LOGINS_CHANGED),
- content::Source<PasswordStore>(store),
+ content::Source<PasswordStore>(store.get()),
Property(&content::Details<const PasswordStoreChangeList>::ptr,
- Pointee(ElementsAreArray(
- expected_update_changes)))));
+ Pointee(ElementsAreArray(expected_update_changes)))));
// Updating the login with the new password should trigger a notification.
store->UpdateLogin(*form);
@@ -391,12 +391,12 @@ TEST_P(PasswordStoreXTest, Notifications) {
PasswordStoreChange(PasswordStoreChange::REMOVE, *form),
};
- EXPECT_CALL(helper->observer(),
+ EXPECT_CALL(
+ helper->observer(),
Observe(int(chrome::NOTIFICATION_LOGINS_CHANGED),
- content::Source<PasswordStore>(store),
+ content::Source<PasswordStore>(store.get()),
Property(&content::Details<const PasswordStoreChangeList>::ptr,
- Pointee(ElementsAreArray(
- expected_delete_changes)))));
+ Pointee(ElementsAreArray(expected_delete_changes)))));
// Deleting the login should trigger a notification.
store->RemoveLogin(*form);
@@ -407,7 +407,7 @@ TEST_P(PasswordStoreXTest, Notifications) {
done.Wait();
// Public in PasswordStore, protected in PasswordStoreX.
- static_cast<PasswordStore*>(store)->ShutdownOnUIThread();
+ static_cast<PasswordStore*>(store.get())->ShutdownOnUIThread();
}
TEST_P(PasswordStoreXTest, NativeMigration) {
@@ -544,7 +544,7 @@ TEST_P(PasswordStoreXTest, NativeMigration) {
STLDeleteElements(&expected_blacklisted);
// Public in PasswordStore, protected in PasswordStoreX.
- static_cast<PasswordStore*>(store)->ShutdownOnUIThread();
+ static_cast<PasswordStore*>(store.get())->ShutdownOnUIThread();
}
INSTANTIATE_TEST_CASE_P(NoBackend,
« no previous file with comments | « chrome/browser/password_manager/password_store_factory.cc ('k') | chrome/browser/plugins/plugin_status_pref_setter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698