Index: chrome/common/password_form_fill_data.cc |
diff --git a/webkit/forms/password_form_dom_manager.cc b/chrome/common/password_form_fill_data.cc |
similarity index 57% |
rename from webkit/forms/password_form_dom_manager.cc |
rename to chrome/common/password_form_fill_data.cc |
index 93545982fd1def4535e8378db1d130e8169cb0e6..1e447185db6425b1df2ad78e5b4bb7b0940aa77b 100644 |
--- a/webkit/forms/password_form_dom_manager.cc |
+++ b/chrome/common/password_form_fill_data.cc |
@@ -1,20 +1,13 @@ |
-// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+// Copyright 2011 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "webkit/forms/password_form_dom_manager.h" |
+#include "chrome/common/password_form_fill_data.h" |
#include "base/logging.h" |
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h" |
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebPasswordFormData.h" |
-#include "webkit/forms/form_field.h" |
+#include "chrome/common/form_field.h" |
-using WebKit::WebFormElement; |
-using WebKit::WebInputElement; |
-using WebKit::WebPasswordFormData; |
- |
-namespace webkit { |
-namespace forms { |
+namespace chrome { |
PasswordFormFillData::PasswordFormFillData() : wait_for_username(false) { |
} |
@@ -22,19 +15,10 @@ PasswordFormFillData::PasswordFormFillData() : wait_for_username(false) { |
PasswordFormFillData::~PasswordFormFillData() { |
} |
-scoped_ptr<PasswordForm> PasswordFormDomManager::CreatePasswordForm( |
- const WebFormElement& webform) { |
- WebPasswordFormData web_password_form(webform); |
- if (web_password_form.isValid()) |
- return scoped_ptr<PasswordForm>(new PasswordForm(web_password_form)); |
- return scoped_ptr<PasswordForm>(); |
-} |
- |
-// static |
-void PasswordFormDomManager::InitFillData( |
- const PasswordForm& form_on_page, |
- const PasswordFormMap& matches, |
- const PasswordForm* const preferred_match, |
+void InitPasswordFormFillData( |
+ const content::PasswordForm& form_on_page, |
+ const content::PasswordFormMap& matches, |
+ const content::PasswordForm* const preferred_match, |
bool wait_for_username_before_autofill, |
PasswordFormFillData* result) { |
// Note that many of the |FormField| members are not initialized for |
@@ -55,12 +39,11 @@ void PasswordFormDomManager::InitFillData( |
result->wait_for_username = wait_for_username_before_autofill; |
// Copy additional username/value pairs. |
- PasswordFormMap::const_iterator iter; |
+ content::PasswordFormMap::const_iterator iter; |
for (iter = matches.begin(); iter != matches.end(); iter++) { |
if (iter->second != preferred_match) |
result->additional_logins[iter->first] = iter->second->password_value; |
} |
} |
-} // namespace forms |
-} // namespace webkit |
+} // namespace chrome |