Commit fc6573c9 authored by Vaclav Brozek's avatar Vaclav Brozek Committed by Commit Bot

Remove obsolete TODO(vabr) from passwords

There are a few TODO(vabr) in the code. Some of them are about old
code-health improvements which proved to be unimportant enough to
consider, those are being removed in this CL. A few are still relevant
and have an associated bug filed, those are redirected to that bug
instead.

Bug: 908813, 397083, 415449, 543085
Change-Id: If506009ce54016f8a1d9680a90b6516b399af4aa
Reviewed-on: https://chromium-review.googlesource.com/c/1352186Reviewed-by: default avatarVadym Doroshenko <dvadym@chromium.org>
Commit-Queue: Vaclav Brozek <vabr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611292}
parent 354c0dd6
...@@ -75,8 +75,8 @@ using testing::Return; ...@@ -75,8 +75,8 @@ using testing::Return;
using testing::_; using testing::_;
namespace { namespace {
// TODO(vabr): Get rid of the mocked client in the client's own test, see // TODO(crbug.com/474577): Get rid of the mocked client in the client's own
// http://crbug.com/474577. // test.
class MockChromePasswordManagerClient : public ChromePasswordManagerClient { class MockChromePasswordManagerClient : public ChromePasswordManagerClient {
public: public:
MOCK_CONST_METHOD0(GetMainFrameCertStatus, net::CertStatus()); MOCK_CONST_METHOD0(GetMainFrameCertStatus, net::CertStatus());
......
...@@ -835,8 +835,6 @@ TEST_F(NativeBackendGnomeTest, PSLUpdatingStrictUpdateLogin) { ...@@ -835,8 +835,6 @@ TEST_F(NativeBackendGnomeTest, PSLUpdatingStrictUpdateLogin) {
} }
TEST_F(NativeBackendGnomeTest, PSLUpdatingStrictAddLogin) { TEST_F(NativeBackendGnomeTest, PSLUpdatingStrictAddLogin) {
// TODO(vabr): if AddLogin becomes no longer valid for existing logins, then
// just delete this test.
CheckPSLUpdate(UPDATE_BY_ADDLOGIN); CheckPSLUpdate(UPDATE_BY_ADDLOGIN);
} }
......
...@@ -707,8 +707,6 @@ TEST_F(NativeBackendLibsecretTest, PSLUpdatingStrictUpdateLogin) { ...@@ -707,8 +707,6 @@ TEST_F(NativeBackendLibsecretTest, PSLUpdatingStrictUpdateLogin) {
} }
TEST_F(NativeBackendLibsecretTest, PSLUpdatingStrictAddLogin) { TEST_F(NativeBackendLibsecretTest, PSLUpdatingStrictAddLogin) {
// TODO(vabr): if AddLogin becomes no longer valid for existing logins, then
// just delete this test.
CheckPSLUpdate(UPDATE_BY_ADDLOGIN); CheckPSLUpdate(UPDATE_BY_ADDLOGIN);
} }
......
...@@ -52,7 +52,6 @@ TEST_F(PasswordManagerInternalsServiceTest, ServiceActiveNonIncognito) { ...@@ -52,7 +52,6 @@ TEST_F(PasswordManagerInternalsServiceTest, ServiceActiveNonIncognito) {
ASSERT_TRUE(service); ASSERT_TRUE(service);
EXPECT_EQ(std::string(), service->RegisterReceiver(&receiver)); EXPECT_EQ(std::string(), service->RegisterReceiver(&receiver));
// TODO(vabr): Use a MockPasswordManagerClient to detect activity changes.
EXPECT_CALL(receiver, LogSavePasswordProgress(kTestText)).Times(1); EXPECT_CALL(receiver, LogSavePasswordProgress(kTestText)).Times(1);
service->ProcessLog(kTestText); service->ProcessLog(kTestText);
......
...@@ -735,7 +735,7 @@ void PasswordAutofillAgent::PasswordValueGatekeeper::ShowValue( ...@@ -735,7 +735,7 @@ void PasswordAutofillAgent::PasswordValueGatekeeper::ShowValue(
bool PasswordAutofillAgent::TextDidChangeInTextField( bool PasswordAutofillAgent::TextDidChangeInTextField(
const WebInputElement& element) { const WebInputElement& element) {
// TODO(vabr): Get a mutable argument instead. http://crbug.com/397083 // TODO(crbug.com/415449): Do this through const WebInputElement.
WebInputElement mutable_element = element; // We need a non-const. WebInputElement mutable_element = element; // We need a non-const.
mutable_element.SetAutofillState(WebAutofillState::kNotFilled); mutable_element.SetAutofillState(WebAutofillState::kNotFilled);
...@@ -754,7 +754,7 @@ void PasswordAutofillAgent::DidEndTextFieldEditing() { ...@@ -754,7 +754,7 @@ void PasswordAutofillAgent::DidEndTextFieldEditing() {
void PasswordAutofillAgent::UpdateStateForTextChange( void PasswordAutofillAgent::UpdateStateForTextChange(
const WebInputElement& element) { const WebInputElement& element) {
// TODO(vabr): Get a mutable argument instead. http://crbug.com/397083 // TODO(crbug.com/415449): Do this through const WebInputElement.
WebInputElement mutable_element = element; // We need a non-const. WebInputElement mutable_element = element; // We need a non-const.
if (element.IsTextField()) { if (element.IsTextField()) {
......
...@@ -28,11 +28,6 @@ struct PasswordForm; ...@@ -28,11 +28,6 @@ struct PasswordForm;
// //
// To use this class, the method SendLog needs to be overriden to send the logs // To use this class, the method SendLog needs to be overriden to send the logs
// for display as appropriate. // for display as appropriate.
//
// TODO(vabr): Logically, this class belongs to the password_manager component.
// But the PasswordAutofillAgent needs to use it, so until that agent is in a
// third component, shared by autofill and password_manager, this helper needs
// to stay in autofill as well.
class SavePasswordProgressLogger { class SavePasswordProgressLogger {
public: public:
// IDs of strings allowed in the logs: for security reasons, we only pass the // IDs of strings allowed in the logs: for security reasons, we only pass the
......
...@@ -597,10 +597,9 @@ void PasswordManager::AddObserverAndDeliverCredentials( ...@@ -597,10 +597,9 @@ void PasswordManager::AddObserverAndDeliverCredentials(
const PasswordForm& observed_form) { const PasswordForm& observed_form) {
observers_.AddObserver(observer); observers_.AddObserver(observer);
// The observers are responsible for filtering notifications by the observer
// signon_realm. Each notification is broadcasted to every observer.
observer->set_signon_realm(observed_form.signon_realm); observer->set_signon_realm(observed_form.signon_realm);
// TODO(vabr): Even though the observers do the realm check, this mechanism
// will still result in every observer being notified about every form. We
// could perhaps do better by registering an observer call-back instead.
std::vector<PasswordForm> observed_forms; std::vector<PasswordForm> observed_forms;
observed_forms.push_back(observed_form); observed_forms.push_back(observed_form);
......
...@@ -30,9 +30,9 @@ bool LastLoadWasTransactionalReauthPage(const GURL& last_load_url) { ...@@ -30,9 +30,9 @@ bool LastLoadWasTransactionalReauthPage(const GURL& last_load_url) {
GaiaUrls::GetInstance()->gaia_url().GetOrigin()) GaiaUrls::GetInstance()->gaia_url().GetOrigin())
return false; return false;
// TODO(vabr): GAIA stops using the "rart" URL param, and instead includes a // TODO(crbug.com/543085): GAIA stops using the "rart" URL param, and instead
// hidden form field with name "rart". http://crbug.com/543085 // includes a hidden form field with name "rart". "rart" is the transactional
// "rart" is the transactional reauth paramter. // reauth paramter.
std::string ignored_value; std::string ignored_value;
return net::GetValueForKeyInQuery(last_load_url, "rart", &ignored_value); return net::GetValueForKeyInQuery(last_load_url, "rart", &ignored_value);
} }
......
...@@ -34,8 +34,6 @@ class SyncCredentialsFilter : public CredentialsFilter { ...@@ -34,8 +34,6 @@ class SyncCredentialsFilter : public CredentialsFilter {
// commited entry URL for a check against GAIA reauth site. Uses the factory // commited entry URL for a check against GAIA reauth site. Uses the factory
// functions repeatedly to get the sync service and signin manager to pass // functions repeatedly to get the sync service and signin manager to pass
// them to sync_util methods. // them to sync_util methods.
// TODO(vabr): Could we safely just get a pointer to the services for the
// lifetime of the filter?
SyncCredentialsFilter( SyncCredentialsFilter(
const PasswordManagerClient* client, const PasswordManagerClient* client,
SyncServiceFactoryFunction sync_service_factory_function, SyncServiceFactoryFunction sync_service_factory_function,
......
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