Commit c85791a3 authored by Marc Treib's avatar Marc Treib Committed by Commit Bot

Propagate 'from_account_store' flag to chrome://settings/passwords

The settings page still doesn't actually do anything with this
information (left for later CLs).

Bug: 1002063
Change-Id: Ib29e1d18d3d47e15fd44384fa7ebd40af26947de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1798352Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
Reviewed-by: default avatarVadym Doroshenko <dvadym@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#697142}
parent fe4f280e
...@@ -265,6 +265,8 @@ void PasswordsPrivateDelegateImpl::SetPasswordList( ...@@ -265,6 +265,8 @@ void PasswordsPrivateDelegateImpl::SetPasswordList(
IDS_PASSWORDS_VIA_FEDERATION, GetDisplayFederation(*form)))); IDS_PASSWORDS_VIA_FEDERATION, GetDisplayFederation(*form))));
} }
entry.from_account_store = form->IsUsingAccountStore();
current_entries_.push_back(std::move(entry)); current_entries_.push_back(std::move(entry));
} }
...@@ -292,6 +294,8 @@ void PasswordsPrivateDelegateImpl::SetPasswordExceptionList( ...@@ -292,6 +294,8 @@ void PasswordsPrivateDelegateImpl::SetPasswordExceptionList(
current_exception_entry.urls = CreateUrlCollectionFromForm(*form); current_exception_entry.urls = CreateUrlCollectionFromForm(*form);
current_exception_entry.id = exception_id_generator_.GenerateId( current_exception_entry.id = exception_id_generator_.GenerateId(
password_manager::CreateSortKey(*form)); password_manager::CreateSortKey(*form));
current_exception_entry.from_account_store = form->IsUsingAccountStore();
current_exceptions_.push_back(std::move(current_exception_entry)); current_exceptions_.push_back(std::move(current_exception_entry));
} }
......
...@@ -46,6 +46,10 @@ namespace passwordsPrivate { ...@@ -46,6 +46,10 @@ namespace passwordsPrivate {
// An index to refer back to a unique password entry record. // An index to refer back to a unique password entry record.
long id; long id;
// If true, the entry came from the Gaia-account-scoped password store
// rather than from the profile-scoped one.
boolean fromAccountStore;
}; };
dictionary ExceptionEntry { dictionary ExceptionEntry {
...@@ -54,6 +58,10 @@ namespace passwordsPrivate { ...@@ -54,6 +58,10 @@ namespace passwordsPrivate {
// An id to refer back to a unique exception entry record. // An id to refer back to a unique exception entry record.
long id; long id;
// If true, the entry came from the Gaia-account-scoped password store
// rather than from the profile-scoped one.
boolean fromAccountStore;
}; };
dictionary PasswordExportProgress { dictionary PasswordExportProgress {
......
...@@ -42,7 +42,8 @@ chrome.passwordsPrivate.UrlCollection; ...@@ -42,7 +42,8 @@ chrome.passwordsPrivate.UrlCollection;
* username: string, * username: string,
* numCharactersInPassword: number, * numCharactersInPassword: number,
* federationText: (string|undefined), * federationText: (string|undefined),
* id: number * id: number,
* fromAccountStore: boolean
* }} * }}
*/ */
chrome.passwordsPrivate.PasswordUiEntry; chrome.passwordsPrivate.PasswordUiEntry;
...@@ -50,7 +51,8 @@ chrome.passwordsPrivate.PasswordUiEntry; ...@@ -50,7 +51,8 @@ chrome.passwordsPrivate.PasswordUiEntry;
/** /**
* @typedef {{ * @typedef {{
* urls: !chrome.passwordsPrivate.UrlCollection, * urls: !chrome.passwordsPrivate.UrlCollection,
* id: number * id: number,
* fromAccountStore: boolean
* }} * }}
*/ */
chrome.passwordsPrivate.ExceptionEntry; chrome.passwordsPrivate.ExceptionEntry;
...@@ -75,8 +77,7 @@ chrome.passwordsPrivate.recordPasswordsPageAccessInSettings = function() {}; ...@@ -75,8 +77,7 @@ chrome.passwordsPrivate.recordPasswordsPageAccessInSettings = function() {};
* @param {string} new_username The new username. * @param {string} new_username The new username.
* @param {string=} new_password The new password. * @param {string=} new_password The new password.
*/ */
chrome.passwordsPrivate.changeSavedPassword = function( chrome.passwordsPrivate.changeSavedPassword = function(id, new_username, new_password) {};
id, new_username, new_password) {};
/** /**
* Removes the saved password corresponding to |id|. If no saved password for * Removes the saved password corresponding to |id|. If no saved password for
......
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