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

Unified Diff: webkit/glue/password_form_dom_manager.cc

Issue 8680040: Group forms-related files in webkit/glue in a forms/ subdirectory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + another build fix Created 9 years 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
« no previous file with comments | « webkit/glue/password_form_dom_manager.h ('k') | webkit/glue/webkit_glue.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/password_form_dom_manager.cc
diff --git a/webkit/glue/password_form_dom_manager.cc b/webkit/glue/password_form_dom_manager.cc
deleted file mode 100644
index e5c2574ee1eff0526ac2c6513a6aa6743b2ed5b1..0000000000000000000000000000000000000000
--- a/webkit/glue/password_form_dom_manager.cc
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) 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/glue/password_form_dom_manager.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/glue/form_field.h"
-
-using WebKit::WebFormElement;
-using WebKit::WebInputElement;
-using WebKit::WebPasswordFormData;
-
-namespace webkit_glue {
-
-PasswordFormFillData::PasswordFormFillData() : wait_for_username(false) {
-}
-
-PasswordFormFillData::~PasswordFormFillData() {
-}
-
-PasswordForm* PasswordFormDomManager::CreatePasswordForm(
- const WebFormElement& webform) {
- WebPasswordFormData web_password_form(webform);
- if (web_password_form.isValid())
- return new PasswordForm(web_password_form);
- return NULL;
-}
-
-// static
-void PasswordFormDomManager::InitFillData(
- const PasswordForm& form_on_page,
- const PasswordFormMap& matches,
- const PasswordForm* const preferred_match,
- bool wait_for_username_before_autofill,
- PasswordFormFillData* result) {
- // Note that many of the |FormField| members are not initialized for
- // |username_field| and |password_field| because they are currently not used
- // by the password autocomplete code.
- FormField username_field;
- username_field.name = form_on_page.username_element;
- username_field.value = preferred_match->username_value;
- FormField password_field;
- password_field.name = form_on_page.password_element;
- password_field.value = preferred_match->password_value;
-
- // Fill basic form data.
- result->basic_data.origin = form_on_page.origin;
- result->basic_data.action = form_on_page.action;
- result->basic_data.fields.push_back(username_field);
- result->basic_data.fields.push_back(password_field);
- result->wait_for_username = wait_for_username_before_autofill;
-
- // Copy additional username/value pairs.
- 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 webkit_glue
« no previous file with comments | « webkit/glue/password_form_dom_manager.h ('k') | webkit/glue/webkit_glue.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698