Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(261)

Unified Diff: chrome/browser/sync/glue/password_model_associator.cc

Issue 11000016: Move forms/ out of webkit/. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Response to review Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/glue/password_model_associator.cc
diff --git a/chrome/browser/sync/glue/password_model_associator.cc b/chrome/browser/sync/glue/password_model_associator.cc
index 219de0d79b497f3e7734cc3df6aca65acecfe623..958c9d2379d35bbdde888ca4a8f7fb63ef7abdf6 100644
--- a/chrome/browser/sync/glue/password_model_associator.cc
+++ b/chrome/browser/sync/glue/password_model_associator.cc
@@ -11,6 +11,7 @@
#include "base/utf_string_conversions.h"
#include "chrome/browser/password_manager/password_store.h"
#include "chrome/browser/sync/profile_sync_service.h"
+#include "content/public/common/password_form.h"
#include "net/base/escape.h"
#include "sync/api/sync_error.h"
#include "sync/internal_api/public/read_node.h"
@@ -18,7 +19,6 @@
#include "sync/internal_api/public/write_node.h"
#include "sync/internal_api/public/write_transaction.h"
#include "sync/protocol/password_specifics.pb.h"
-#include "webkit/forms/password_form.h"
using content::BrowserThread;
@@ -58,7 +58,7 @@ syncer::SyncError PasswordModelAssociator::AssociateModels() {
// We must not be holding a transaction when we interact with the password
// store, as it can post tasks to the UI thread which can itself be blocked
// on our transaction, resulting in deadlock. (http://crbug.com/70658)
- std::vector<webkit::forms::PasswordForm*> passwords;
+ std::vector<content::PasswordForm*> passwords;
if (!password_store_->FillAutofillableLogins(&passwords) ||
!password_store_->FillBlacklistLogins(&passwords)) {
STLDeleteElements(&passwords);
@@ -83,7 +83,7 @@ syncer::SyncError PasswordModelAssociator::AssociateModels() {
model_type());
}
- for (std::vector<webkit::forms::PasswordForm*>::iterator ix =
+ for (std::vector<content::PasswordForm*>::iterator ix =
passwords.begin();
ix != passwords.end(); ++ix) {
if (IsAbortPending()) {
@@ -98,7 +98,7 @@ syncer::SyncError PasswordModelAssociator::AssociateModels() {
node.GetPasswordSpecifics();
DCHECK_EQ(tag, MakeTag(password));
- webkit::forms::PasswordForm new_password;
+ content::PasswordForm new_password;
if (MergePasswords(password, **ix, &new_password)) {
syncer::WriteNode write_node(&trans);
@@ -154,7 +154,7 @@ syncer::SyncError PasswordModelAssociator::AssociateModels() {
// The password only exists on the server. Add it to the local
// model.
if (current_passwords.find(tag) == current_passwords.end()) {
- webkit::forms::PasswordForm new_password;
+ content::PasswordForm new_password;
CopyPassword(password, &new_password);
Associate(&tag, sync_child_node.GetId());
@@ -328,9 +328,9 @@ syncer::SyncError PasswordModelAssociator::WriteToPasswordStore(
// static
void PasswordModelAssociator::CopyPassword(
const sync_pb::PasswordSpecificsData& password,
- webkit::forms::PasswordForm* new_password) {
+ content::PasswordForm* new_password) {
new_password->scheme =
- static_cast<webkit::forms::PasswordForm::Scheme>(password.scheme());
+ static_cast<content::PasswordForm::Scheme>(password.scheme());
new_password->signon_realm = password.signon_realm();
new_password->origin = GURL(password.origin());
new_password->action = GURL(password.action());
@@ -353,8 +353,8 @@ void PasswordModelAssociator::CopyPassword(
// static
bool PasswordModelAssociator::MergePasswords(
const sync_pb::PasswordSpecificsData& password,
- const webkit::forms::PasswordForm& password_form,
- webkit::forms::PasswordForm* new_password) {
+ const content::PasswordForm& password_form,
+ content::PasswordForm* new_password) {
DCHECK(new_password);
if (password.scheme() == password_form.scheme &&
@@ -389,7 +389,7 @@ bool PasswordModelAssociator::MergePasswords(
// static
void PasswordModelAssociator::WriteToSyncNode(
- const webkit::forms::PasswordForm& password_form,
+ const content::PasswordForm& password_form,
syncer::WriteNode* node) {
sync_pb::PasswordSpecificsData password;
password.set_scheme(password_form.scheme);
@@ -410,7 +410,7 @@ void PasswordModelAssociator::WriteToSyncNode(
// static
std::string PasswordModelAssociator::MakeTag(
- const webkit::forms::PasswordForm& password) {
+ const content::PasswordForm& password) {
return MakeTag(password.origin.spec(),
UTF16ToUTF8(password.username_element),
UTF16ToUTF8(password.username_value),
« no previous file with comments | « chrome/browser/sync/glue/password_model_associator.h ('k') | chrome/browser/sync/profile_sync_service_password_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698