Commit 6aabbbf1 authored by vasilii's avatar vasilii Committed by Commit bot

Temporary make the call stack trace around PasswordStore::WrapModificationTask more useful.

The patch is to be reverted a few days later when we have a crash report with the new stack trace.

BUG=396900

Review URL: https://codereview.chromium.org/854593002

Cr-Commit-Position: refs/heads/master@{#311482}
parent 299f8665
...@@ -96,41 +96,28 @@ bool PasswordStore::Init(const syncer::SyncableService::StartSyncFlare& flare) { ...@@ -96,41 +96,28 @@ bool PasswordStore::Init(const syncer::SyncableService::StartSyncFlare& flare) {
void PasswordStore::AddLogin(const PasswordForm& form) { void PasswordStore::AddLogin(const PasswordForm& form) {
CheckForEmptyUsernameAndPassword(form); CheckForEmptyUsernameAndPassword(form);
ScheduleTask( ScheduleTask(base::Bind(&PasswordStore::AddLoginInternal, this, form));
base::Bind(&PasswordStore::WrapModificationTask, this,
base::Bind(&PasswordStore::AddLoginImpl, this, form)));
} }
void PasswordStore::UpdateLogin(const PasswordForm& form) { void PasswordStore::UpdateLogin(const PasswordForm& form) {
CheckForEmptyUsernameAndPassword(form); CheckForEmptyUsernameAndPassword(form);
ScheduleTask( ScheduleTask(base::Bind(&PasswordStore::UpdateLoginInternal, this, form));
base::Bind(&PasswordStore::WrapModificationTask, this,
base::Bind(&PasswordStore::UpdateLoginImpl, this, form)));
} }
void PasswordStore::RemoveLogin(const PasswordForm& form) { void PasswordStore::RemoveLogin(const PasswordForm& form) {
ScheduleTask( ScheduleTask(base::Bind(&PasswordStore::RemoveLoginInternal, this, form));
base::Bind(&PasswordStore::WrapModificationTask, this,
base::Bind(&PasswordStore::RemoveLoginImpl, this, form)));
} }
void PasswordStore::RemoveLoginsCreatedBetween(base::Time delete_begin, void PasswordStore::RemoveLoginsCreatedBetween(base::Time delete_begin,
base::Time delete_end) { base::Time delete_end) {
ScheduleTask( ScheduleTask(base::Bind(&PasswordStore::RemoveLoginsCreatedBetweenInternal,
base::Bind(&PasswordStore::WrapModificationTask, this, this, delete_begin, delete_end));
base::Bind(&PasswordStore::RemoveLoginsCreatedBetweenImpl,
this, delete_begin, delete_end)));
} }
void PasswordStore::RemoveLoginsSyncedBetween(base::Time delete_begin, void PasswordStore::RemoveLoginsSyncedBetween(base::Time delete_begin,
base::Time delete_end) { base::Time delete_end) {
ScheduleTask( ScheduleTask(base::Bind(&PasswordStore::RemoveLoginsSyncedBetweenInternal,
base::Bind(&PasswordStore::WrapModificationTask, this, delete_begin, delete_end));
this,
base::Bind(&PasswordStore::RemoveLoginsSyncedBetweenImpl,
this,
delete_begin,
delete_end)));
} }
void PasswordStore::GetLogins( void PasswordStore::GetLogins(
...@@ -271,6 +258,35 @@ void PasswordStore::WrapModificationTask(ModificationTask task) { ...@@ -271,6 +258,35 @@ void PasswordStore::WrapModificationTask(ModificationTask task) {
NotifyLoginsChanged(changes); NotifyLoginsChanged(changes);
} }
void PasswordStore::AddLoginInternal(const PasswordForm& form) {
PasswordStoreChangeList changes = AddLoginImpl(form);
NotifyLoginsChanged(changes);
}
void PasswordStore::UpdateLoginInternal(const PasswordForm& form) {
PasswordStoreChangeList changes = UpdateLoginImpl(form);
NotifyLoginsChanged(changes);
}
void PasswordStore::RemoveLoginInternal(const PasswordForm& form) {
PasswordStoreChangeList changes = RemoveLoginImpl(form);
NotifyLoginsChanged(changes);
}
void PasswordStore::RemoveLoginsCreatedBetweenInternal(base::Time delete_begin,
base::Time delete_end) {
PasswordStoreChangeList changes =
RemoveLoginsCreatedBetweenImpl(delete_begin, delete_end);
NotifyLoginsChanged(changes);
}
void PasswordStore::RemoveLoginsSyncedBetweenInternal(base::Time delete_begin,
base::Time delete_end) {
PasswordStoreChangeList changes =
RemoveLoginsSyncedBetweenImpl(delete_begin, delete_end);
NotifyLoginsChanged(changes);
}
#if defined(PASSWORD_MANAGER_ENABLE_SYNC) #if defined(PASSWORD_MANAGER_ENABLE_SYNC)
void PasswordStore::InitSyncableService( void PasswordStore::InitSyncableService(
const syncer::SyncableService::StartSyncFlare& flare) { const syncer::SyncableService::StartSyncFlare& flare) {
......
...@@ -277,6 +277,15 @@ class PasswordStore : protected PasswordStoreSync, ...@@ -277,6 +277,15 @@ class PasswordStore : protected PasswordStoreSync,
// method will actually modify the password store data. // method will actually modify the password store data.
virtual void WrapModificationTask(ModificationTask task); virtual void WrapModificationTask(ModificationTask task);
// Temporary specializations of WrapModificationTask for a better stack trace.
void AddLoginInternal(const autofill::PasswordForm& form);
void UpdateLoginInternal(const autofill::PasswordForm& form);
void RemoveLoginInternal(const autofill::PasswordForm& form);
void RemoveLoginsCreatedBetweenInternal(base::Time delete_begin,
base::Time delete_end);
void RemoveLoginsSyncedBetweenInternal(base::Time delete_begin,
base::Time delete_end);
// Copies |matched_forms| into the request's result vector, then calls // Copies |matched_forms| into the request's result vector, then calls
// |ForwardLoginsResult|. Temporarily used as an adapter between the API of // |ForwardLoginsResult|. Temporarily used as an adapter between the API of
// |GetLoginsImpl| and |PasswordStoreConsumer|. // |GetLoginsImpl| and |PasswordStoreConsumer|.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment