-
Notifications
You must be signed in to change notification settings - Fork 110
Enable importing passwords from Firefox #216
Conversation
importer_->Emit("add-password-form", imported_form); | ||
} | ||
PasswordStoreFactory::GetForProfile( | ||
ProfileManager::GetActiveUserProfile(), ServiceAccessType::EXPLICIT_ACCESS)->AddLogin(form); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should do null check of Profile*
c54c4d2
to
f2aa48a
Compare
while (s.Step() && !cancelled()) { | ||
autofill::PasswordForm form; | ||
base::string16 origin = s.ColumnString16(0); | ||
form.origin = GURL(base::StringPiece16(origin)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can directly use GURL(s.ColumnString16(0));
here
autofill::PasswordForm form; | ||
base::string16 origin = s.ColumnString16(0); | ||
form.origin = GURL(base::StringPiece16(origin)); | ||
form.signon_realm = base::UTF16ToUTF8(origin) + '/'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use form.origin.GetOrigin().spec()
would be better
f2aa48a
to
9481c08
Compare
if ((items & importer::PASSWORDS) && !cancelled()) { | ||
bridge_->NotifyItemStarted(importer::PASSWORDS); | ||
ImportPasswords(); | ||
- bridge_->NotifyItemEnded(importer::PASSWORDS); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we leaving out the notification for passwords?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see now, we also do part of the import in brave/utility/importer/firefox_importer.cc
Is this something we can upstream so we don't have to patch in the future?
++ |
Auditors: @darkdh
required by brave/browser-laptop#9433