Skip to content
This repository was archived by the owner on Jan 4, 2019. It is now read-only.

Enable importing passwords from Firefox #216

Merged
merged 1 commit into from
Jun 17, 2017

Conversation

evq
Copy link
Member

@evq evq commented Jun 13, 2017

Auditors: @darkdh
required by brave/browser-laptop#9433

@darkdh darkdh self-requested a review June 13, 2017 23:30
importer_->Emit("add-password-form", imported_form);
}
PasswordStoreFactory::GetForProfile(
ProfileManager::GetActiveUserProfile(), ServiceAccessType::EXPLICIT_ACCESS)->AddLogin(form);
Copy link
Member

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*

@evq evq force-pushed the feature/password-import branch from c54c4d2 to f2aa48a Compare June 14, 2017 21:21
while (s.Step() && !cancelled()) {
autofill::PasswordForm form;
base::string16 origin = s.ColumnString16(0);
form.origin = GURL(base::StringPiece16(origin));
Copy link
Member

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) + '/';
Copy link
Member

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

@evq evq force-pushed the feature/password-import branch from f2aa48a to 9481c08 Compare June 14, 2017 22:12
if ((items & importer::PASSWORDS) && !cancelled()) {
bridge_->NotifyItemStarted(importer::PASSWORDS);
ImportPasswords();
- bridge_->NotifyItemEnded(importer::PASSWORDS);
Copy link
Collaborator

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?

Copy link
Collaborator

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?

@bridiver bridiver added this to the 4.2.0 milestone Jun 17, 2017
@bridiver
Copy link
Collaborator

++

@bridiver bridiver merged commit 6bb549b into brave:master Jun 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants