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

Commit

Permalink
Merge pull request #254 from brave/importer-cr60
Browse files Browse the repository at this point in the history
Fix compile error after rebase to 60
  • Loading branch information
bridiver authored Jul 17, 2017
2 parents 4643329 + fef79d5 commit c30d8f4
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions brave/utility/importer/chrome_importer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task_scheduler/post_task.h"
#include "base/task_scheduler/task_traits.h"
#include "base/values.h"
#include "brave/common/importer/imported_cookie_entry.h"
#include "build/build_config.h"
Expand Down Expand Up @@ -295,14 +293,14 @@ void ChromeImporter::ImportPasswords() {
std::vector<std::unique_ptr<autofill::PasswordForm>> forms;
bool success = database.GetAutofillableLogins(&forms);
if (success) {
for (int i = 0; i < forms.size(); ++i) {
for (size_t i = 0; i < forms.size(); ++i) {
bridge_->SetPasswordForm(*forms[i].get());
}
}
std::vector<std::unique_ptr<autofill::PasswordForm>> blacklist;
success = database.GetBlacklistLogins(&blacklist);
if (success) {
for (int i = 0; i < blacklist.size(); ++i) {
for (size_t i = 0; i < blacklist.size(); ++i) {
bridge_->SetPasswordForm(*blacklist[i].get());
}
}
Expand All @@ -311,10 +309,7 @@ void ChromeImporter::ImportPasswords() {
source_path_.Append(
base::FilePath::StringType(FILE_PATH_LITERAL("Preferences")));
const base::Value *value;
scoped_refptr<base::SequencedTaskRunner> file_task_runner =
base::CreateSequencedTaskRunnerWithTraits(base::TaskTraits().MayBlock());
scoped_refptr<JsonPrefStore> prefs = new JsonPrefStore(
prefs_path, file_task_runner, std::unique_ptr<PrefFilter>());
scoped_refptr<JsonPrefStore> prefs = new JsonPrefStore(prefs_path);
int local_profile_id;
if (prefs->ReadPrefs() != PersistentPrefStore::PREF_READ_ERROR_NONE) {
return;
Expand Down Expand Up @@ -357,14 +352,14 @@ void ChromeImporter::ImportPasswords() {
std::vector<std::unique_ptr<autofill::PasswordForm>> forms;
bool success = backend->GetAutofillableLogins(&forms);
if (success) {
for (int i = 0; i < forms.size(); ++i) {
for (size_t i = 0; i < forms.size(); ++i) {
bridge_->SetPasswordForm(*forms[i].get());
}
}
std::vector<std::unique_ptr<autofill::PasswordForm>> blacklist;
success = backend->GetBlacklistLogins(&blacklist);
if (success) {
for (int i = 0; i < blacklist.size(); ++i) {
for (size_t i = 0; i < blacklist.size(); ++i) {
bridge_->SetPasswordForm(*blacklist[i].get());
}
}
Expand Down

0 comments on commit c30d8f4

Please sign in to comment.