summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-15 02:25:08 +0000
committerisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-15 02:25:08 +0000
commit9c4bf23a4cde497b8bad3f89b60457841470618c (patch)
tree9674d3732608fb126f685bd9b780fe5a8bd7fe14 /chrome
parent57dcbc4dd5cbb0f88b348b775ad0a2b130bcafdd (diff)
downloadchromium_src-9c4bf23a4cde497b8bad3f89b60457841470618c.zip
chromium_src-9c4bf23a4cde497b8bad3f89b60457841470618c.tar.gz
chromium_src-9c4bf23a4cde497b8bad3f89b60457841470618c.tar.bz2
Group forms-related files in webkit/glue in a forms/ subdirectory.
BUG=none TEST=compiles Review URL: http://codereview.chromium.org/8680040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114581 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/DEPS1
-rw-r--r--chrome/browser/autocomplete_history_manager.cc6
-rw-r--r--chrome/browser/autocomplete_history_manager.h8
-rw-r--r--chrome/browser/autocomplete_history_manager_unittest.cc22
-rw-r--r--chrome/browser/autofill/address_field_unittest.cc26
-rw-r--r--chrome/browser/autofill/autofill_common_test.cc4
-rw-r--r--chrome/browser/autofill/autofill_common_test.h8
-rw-r--r--chrome/browser/autofill/autofill_download_unittest.cc6
-rw-r--r--chrome/browser/autofill/autofill_external_delegate.cc4
-rw-r--r--chrome/browser/autofill/autofill_external_delegate.h21
-rw-r--r--chrome/browser/autofill/autofill_field.cc4
-rw-r--r--chrome/browser/autofill/autofill_field.h6
-rw-r--r--chrome/browser/autofill/autofill_manager.cc22
-rw-r--r--chrome/browser/autofill/autofill_manager.h40
-rw-r--r--chrome/browser/autofill/autofill_manager_unittest.cc32
-rw-r--r--chrome/browser/autofill/autofill_merge_unittest.cc6
-rw-r--r--chrome/browser/autofill/autofill_metrics.cc4
-rw-r--r--chrome/browser/autofill/autofill_metrics_unittest.cc8
-rw-r--r--chrome/browser/autofill/credit_card_field_unittest.cc20
-rw-r--r--chrome/browser/autofill/form_structure.cc20
-rw-r--r--chrome/browser/autofill/form_structure.h12
-rw-r--r--chrome/browser/autofill/form_structure_unittest.cc14
-rw-r--r--chrome/browser/autofill/name_field_unittest.cc22
-rw-r--r--chrome/browser/autofill/personal_data_manager_unittest.cc42
-rw-r--r--chrome/browser/autofill/phone_field_unittest.cc14
-rw-r--r--chrome/browser/autofill/select_control_handler.cc12
-rw-r--r--chrome/browser/autofill/select_control_handler.h8
-rw-r--r--chrome/browser/autofill/select_control_handler_unittest.cc22
-rw-r--r--chrome/browser/automation/automation_provider.cc1
-rw-r--r--chrome/browser/automation/automation_provider_observers.cc6
-rw-r--r--chrome/browser/automation/automation_provider_observers.h2
-rw-r--r--chrome/browser/automation/testing_automation_provider.cc8
-rw-r--r--chrome/browser/importer/external_process_importer_bridge.cc4
-rw-r--r--chrome/browser/importer/external_process_importer_bridge.h3
-rw-r--r--chrome/browser/importer/external_process_importer_client.cc2
-rw-r--r--chrome/browser/importer/external_process_importer_client.h2
-rw-r--r--chrome/browser/importer/firefox2_importer.cc4
-rw-r--r--chrome/browser/importer/firefox3_importer.cc4
-rw-r--r--chrome/browser/importer/ie_importer.cc6
-rw-r--r--chrome/browser/importer/importer_bridge.h2
-rw-r--r--chrome/browser/importer/importer_unittest.cc8
-rw-r--r--chrome/browser/importer/in_process_importer_bridge.cc4
-rw-r--r--chrome/browser/importer/in_process_importer_bridge.h3
-rw-r--r--chrome/browser/importer/nss_decryptor.cc17
-rw-r--r--chrome/browser/importer/nss_decryptor_mac.h11
-rw-r--r--chrome/browser/importer/nss_decryptor_null.h10
-rw-r--r--chrome/browser/importer/nss_decryptor_system_nss.h10
-rw-r--r--chrome/browser/importer/nss_decryptor_win.h8
-rw-r--r--chrome/browser/importer/profile_import_process_messages.h4
-rw-r--r--chrome/browser/importer/profile_writer.cc2
-rw-r--r--chrome/browser/importer/profile_writer.h6
-rw-r--r--chrome/browser/password_manager/login_database.cc4
-rw-r--r--chrome/browser/password_manager/login_database.h23
-rw-r--r--chrome/browser/password_manager/login_database_unittest.cc6
-rw-r--r--chrome/browser/password_manager/native_backend_gnome_x.cc2
-rw-r--r--chrome/browser/password_manager/native_backend_gnome_x.h14
-rw-r--r--chrome/browser/password_manager/native_backend_gnome_x_unittest.cc2
-rw-r--r--chrome/browser/password_manager/native_backend_kwallet_x.cc2
-rw-r--r--chrome/browser/password_manager/native_backend_kwallet_x.h16
-rw-r--r--chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc2
-rw-r--r--chrome/browser/password_manager/password_form_data.cc10
-rw-r--r--chrome/browser/password_manager/password_form_data.h16
-rw-r--r--chrome/browser/password_manager/password_form_manager.cc6
-rw-r--r--chrome/browser/password_manager/password_form_manager.h26
-rw-r--r--chrome/browser/password_manager/password_form_manager_unittest.cc6
-rw-r--r--chrome/browser/password_manager/password_manager.cc8
-rw-r--r--chrome/browser/password_manager/password_manager.h16
-rw-r--r--chrome/browser/password_manager/password_manager_delegate.h10
-rw-r--r--chrome/browser/password_manager/password_manager_unittest.cc8
-rw-r--r--chrome/browser/password_manager/password_store.cc6
-rw-r--r--chrome/browser/password_manager/password_store.h46
-rw-r--r--chrome/browser/password_manager/password_store_change.h10
-rw-r--r--chrome/browser/password_manager/password_store_consumer.h8
-rw-r--r--chrome/browser/password_manager/password_store_default.cc4
-rw-r--r--chrome/browser/password_manager/password_store_default.h14
-rw-r--r--chrome/browser/password_manager/password_store_default_unittest.cc4
-rw-r--r--chrome/browser/password_manager/password_store_mac.cc8
-rw-r--r--chrome/browser/password_manager/password_store_mac.h24
-rw-r--r--chrome/browser/password_manager/password_store_mac_internal.h51
-rw-r--r--chrome/browser/password_manager/password_store_mac_unittest.cc4
-rw-r--r--chrome/browser/password_manager/password_store_win.cc2
-rw-r--r--chrome/browser/password_manager/password_store_win.h6
-rw-r--r--chrome/browser/password_manager/password_store_win_unittest.cc4
-rw-r--r--chrome/browser/password_manager/password_store_x.cc2
-rw-r--r--chrome/browser/password_manager/password_store_x.h24
-rw-r--r--chrome/browser/password_manager/password_store_x_unittest.cc2
-rw-r--r--chrome/browser/password_manager_delegate_impl.cc4
-rw-r--r--chrome/browser/password_manager_delegate_impl.h2
-rw-r--r--chrome/browser/sync/glue/password_change_processor.cc8
-rw-r--r--chrome/browser/sync/glue/password_model_associator.cc22
-rw-r--r--chrome/browser/sync/glue/password_model_associator.h20
-rw-r--r--chrome/browser/sync/profile_sync_service_password_unittest.cc4
-rw-r--r--chrome/browser/sync/test/integration/autofill_helper.cc8
-rw-r--r--chrome/browser/sync/test/integration/multiple_client_passwords_sync_test.cc2
-rw-r--r--chrome/browser/sync/test/integration/passwords_helper.cc2
-rw-r--r--chrome/browser/sync/test/integration/passwords_helper.h12
-rw-r--r--chrome/browser/sync/test/integration/performance/passwords_sync_perf_test.cc8
-rw-r--r--chrome/browser/sync/test/integration/single_client_passwords_sync_test.cc2
-rw-r--r--chrome/browser/sync/test/integration/sync_errors_test.cc2
-rw-r--r--chrome/browser/sync/test/integration/two_client_passwords_sync_test.cc2
-rw-r--r--chrome/browser/ui/login/login_prompt.cc4
-rw-r--r--chrome/browser/ui/login/login_prompt.h4
-rw-r--r--chrome/browser/ui/login/login_prompt_gtk.cc2
-rw-r--r--chrome/browser/ui/login/login_prompt_mac.mm2
-rw-r--r--chrome/browser/ui/login/login_prompt_win.cc2
-rw-r--r--chrome/browser/ui/webui/options/password_manager_handler.cc6
-rw-r--r--chrome/browser/ui/webui/options/password_manager_handler.h10
-rw-r--r--chrome/browser/ui/webui/options2/password_manager_handler.cc6
-rw-r--r--chrome/browser/ui/webui/options2/password_manager_handler.h16
-rw-r--r--chrome/browser/webdata/autofill_table.cc4
-rw-r--r--chrome/browser/webdata/autofill_table.h17
-rw-r--r--chrome/browser/webdata/autofill_table_unittest.cc4
-rw-r--r--chrome/browser/webdata/logins_table.cc4
-rw-r--r--chrome/browser/webdata/logins_table.h16
-rw-r--r--chrome/browser/webdata/logins_table_unittest.cc4
-rw-r--r--chrome/browser/webdata/web_data_service.cc12
-rw-r--r--chrome/browser/webdata/web_data_service.h28
-rw-r--r--chrome/browser/webdata/web_data_service_unittest.cc12
-rw-r--r--chrome/common/DEPS1
-rw-r--r--chrome/common/autofill_messages.h48
-rw-r--r--chrome/common/chrome_notification_types.h2
-rw-r--r--chrome/renderer/DEPS1
-rw-r--r--chrome/renderer/autofill/autofill_agent.cc30
-rw-r--r--chrome/renderer/autofill/autofill_agent.h12
-rw-r--r--chrome/renderer/autofill/autofill_browsertest.cc8
-rw-r--r--chrome/renderer/autofill/form_autocomplete_browsertest.cc8
-rw-r--r--chrome/renderer/autofill/form_autofill_browsertest.cc6
-rw-r--r--chrome/renderer/autofill/form_autofill_util.cc22
-rw-r--r--chrome/renderer/autofill/form_autofill_util.h22
-rw-r--r--chrome/renderer/autofill/form_cache.cc12
-rw-r--r--chrome/renderer/autofill/form_cache.h12
-rw-r--r--chrome/renderer/autofill/password_autofill_manager.cc36
-rw-r--r--chrome/renderer/autofill/password_autofill_manager.h14
-rw-r--r--chrome/renderer/autofill/password_autofill_manager_browsertest.cc12
134 files changed, 756 insertions, 678 deletions
diff --git a/chrome/browser/DEPS b/chrome/browser/DEPS
index b40dc6b..ae6db39 100644
--- a/chrome/browser/DEPS
+++ b/chrome/browser/DEPS
@@ -21,6 +21,7 @@ include_rules = [
"+third_party/cros",
"+third_party/cros_system_api",
"+webkit/database",
+ "+webkit/forms", # Defines some types that are marshalled over IPC.
"+webkit/glue", # Defines some types that are marshalled over IPC.
"+webkit/plugins", # Defines some types that are marshalled over IPC.
"+webkit/quota",
diff --git a/chrome/browser/autocomplete_history_manager.cc b/chrome/browser/autocomplete_history_manager.cc
index 84b4119..4006b29 100644
--- a/chrome/browser/autocomplete_history_manager.cc
+++ b/chrome/browser/autocomplete_history_manager.cc
@@ -17,10 +17,10 @@
#include "chrome/common/pref_names.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "webkit/glue/form_data.h"
+#include "webkit/forms/form_data.h"
-using webkit_glue::FormData;
-using webkit_glue::FormField;
+using webkit::forms::FormData;
+using webkit::forms::FormField;
namespace {
diff --git a/chrome/browser/autocomplete_history_manager.h b/chrome/browser/autocomplete_history_manager.h
index 3f99424..dafe49a 100644
--- a/chrome/browser/autocomplete_history_manager.h
+++ b/chrome/browser/autocomplete_history_manager.h
@@ -13,9 +13,11 @@
#include "chrome/browser/webdata/web_data_service.h"
#include "content/browser/tab_contents/tab_contents_observer.h"
-namespace webkit_glue {
+namespace webkit {
+namespace forms {
struct FormData;
-} // namespace webkit_glue
+}
+}
class AutofillExternalDelegate;
class Profile;
@@ -47,7 +49,7 @@ class AutocompleteHistoryManager : public TabContentsObserver,
const std::vector<string16>& autofill_labels,
const std::vector<string16>& autofill_icons,
const std::vector<int>& autofill_unique_ids);
- void OnFormSubmitted(const webkit_glue::FormData& form);
+ void OnFormSubmitted(const webkit::forms::FormData& form);
// Sets our external delegate.
void SetExternalDelegate(AutofillExternalDelegate* delegate);
diff --git a/chrome/browser/autocomplete_history_manager_unittest.cc b/chrome/browser/autocomplete_history_manager_unittest.cc
index 23c13eb..d1086f1 100644
--- a/chrome/browser/autocomplete_history_manager_unittest.cc
+++ b/chrome/browser/autocomplete_history_manager_unittest.cc
@@ -20,16 +20,16 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/rect.h"
-#include "webkit/glue/form_data.h"
+#include "webkit/forms/form_data.h"
using content::BrowserThread;
using testing::_;
-using webkit_glue::FormData;
+using webkit::forms::FormData;
class MockWebDataService : public WebDataService {
public:
MOCK_METHOD1(AddFormFields,
- void(const std::vector<webkit_glue::FormField>&)); // NOLINT
+ void(const std::vector<webkit::forms::FormField>&)); // NOLINT
};
class AutocompleteHistoryManagerTest : public ChromeRenderViewHostTestHarness {
@@ -62,7 +62,7 @@ TEST_F(AutocompleteHistoryManagerTest, CreditCardNumberValue) {
form.user_submitted = true;
// Valid Visa credit card number pulled from the paypal help site.
- webkit_glue::FormField valid_cc;
+ webkit::forms::FormField valid_cc;
valid_cc.label = ASCIIToUTF16("Credit Card");
valid_cc.name = ASCIIToUTF16("ccnum");
valid_cc.value = ASCIIToUTF16("4012888888881881");
@@ -85,7 +85,7 @@ TEST_F(AutocompleteHistoryManagerTest, NonCreditCardNumberValue) {
form.user_submitted = true;
// Invalid credit card number.
- webkit_glue::FormField invalid_cc;
+ webkit::forms::FormField invalid_cc;
invalid_cc.label = ASCIIToUTF16("Credit Card");
invalid_cc.name = ASCIIToUTF16("ccnum");
invalid_cc.value = ASCIIToUTF16("4580123456789012");
@@ -105,7 +105,7 @@ TEST_F(AutocompleteHistoryManagerTest, SSNValue) {
form.action = GURL("http://myform.com/submit.html");
form.user_submitted = true;
- webkit_glue::FormField ssn;
+ webkit::forms::FormField ssn;
ssn.label = ASCIIToUTF16("Social Security Number");
ssn.name = ASCIIToUTF16("ssn");
ssn.value = ASCIIToUTF16("078-05-1120");
@@ -126,7 +126,7 @@ TEST_F(AutocompleteHistoryManagerTest, SearchField) {
form.user_submitted = true;
// Search field.
- webkit_glue::FormField search_field;
+ webkit::forms::FormField search_field;
search_field.label = ASCIIToUTF16("Search");
search_field.name = ASCIIToUTF16("search");
search_field.value = ASCIIToUTF16("my favorite query");
@@ -146,8 +146,8 @@ class MockAutofillExternalDelegate : public AutofillExternalDelegate {
virtual ~MockAutofillExternalDelegate() {}
virtual void OnQuery(int query_id,
- const webkit_glue::FormData& form,
- const webkit_glue::FormField& field,
+ const webkit::forms::FormData& form,
+ const webkit::forms::FormField& field,
const gfx::Rect& bounds,
bool display_warning) OVERRIDE {}
@@ -170,8 +170,8 @@ class MockAutofillExternalDelegate : public AutofillExternalDelegate {
virtual void OnQueryPlatformSpecific(
int query_id,
- const webkit_glue::FormData& form,
- const webkit_glue::FormField& field) OVERRIDE {}
+ const webkit::forms::FormData& form,
+ const webkit::forms::FormField& field) OVERRIDE {}
private:
DISALLOW_COPY_AND_ASSIGN(MockAutofillExternalDelegate);
diff --git a/chrome/browser/autofill/address_field_unittest.cc b/chrome/browser/autofill/address_field_unittest.cc
index b8d3865..0bc6567 100644
--- a/chrome/browser/autofill/address_field_unittest.cc
+++ b/chrome/browser/autofill/address_field_unittest.cc
@@ -10,7 +10,7 @@
#include "chrome/browser/autofill/autofill_field.h"
#include "chrome/browser/autofill/autofill_scanner.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "webkit/glue/form_field.h"
+#include "webkit/forms/form_field.h"
class AddressFieldTest : public testing::Test {
public:
@@ -44,7 +44,7 @@ TEST_F(AddressFieldTest, NonParse) {
}
TEST_F(AddressFieldTest, ParseOneLineAddress) {
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("text");
field.label = ASCIIToUTF16("Address");
@@ -62,7 +62,7 @@ TEST_F(AddressFieldTest, ParseOneLineAddress) {
}
TEST_F(AddressFieldTest, ParseOneLineAddressBilling) {
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("text");
field.label = ASCIIToUTF16("Address");
@@ -80,7 +80,7 @@ TEST_F(AddressFieldTest, ParseOneLineAddressBilling) {
}
TEST_F(AddressFieldTest, ParseOneLineAddressShipping) {
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("text");
field.label = ASCIIToUTF16("Address");
@@ -98,7 +98,7 @@ TEST_F(AddressFieldTest, ParseOneLineAddressShipping) {
}
TEST_F(AddressFieldTest, ParseTwoLineAddress) {
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("text");
field.label = ASCIIToUTF16("Address");
@@ -123,7 +123,7 @@ TEST_F(AddressFieldTest, ParseTwoLineAddress) {
}
TEST_F(AddressFieldTest, ParseThreeLineAddress) {
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("text");
field.label = ASCIIToUTF16("Address Line1");
@@ -154,7 +154,7 @@ TEST_F(AddressFieldTest, ParseThreeLineAddress) {
}
TEST_F(AddressFieldTest, ParseCity) {
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("text");
field.label = ASCIIToUTF16("City");
@@ -172,7 +172,7 @@ TEST_F(AddressFieldTest, ParseCity) {
}
TEST_F(AddressFieldTest, ParseState) {
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("text");
field.label = ASCIIToUTF16("State");
@@ -190,7 +190,7 @@ TEST_F(AddressFieldTest, ParseState) {
}
TEST_F(AddressFieldTest, ParseZip) {
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("text");
field.label = ASCIIToUTF16("Zip");
@@ -208,7 +208,7 @@ TEST_F(AddressFieldTest, ParseZip) {
}
TEST_F(AddressFieldTest, ParseStateAndZipOneLabel) {
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("text");
field.label = ASCIIToUTF16("State/Province, Zip/Postal Code");
@@ -233,7 +233,7 @@ TEST_F(AddressFieldTest, ParseStateAndZipOneLabel) {
}
TEST_F(AddressFieldTest, ParseCountry) {
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("text");
field.label = ASCIIToUTF16("Country");
@@ -251,7 +251,7 @@ TEST_F(AddressFieldTest, ParseCountry) {
}
TEST_F(AddressFieldTest, ParseTwoLineAddressMissingLabel) {
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("text");
field.label = ASCIIToUTF16("Address");
@@ -276,7 +276,7 @@ TEST_F(AddressFieldTest, ParseTwoLineAddressMissingLabel) {
}
TEST_F(AddressFieldTest, ParseCompany) {
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("text");
field.label = ASCIIToUTF16("Company");
diff --git a/chrome/browser/autofill/autofill_common_test.cc b/chrome/browser/autofill/autofill_common_test.cc
index b4c3ad7..99ff3ac 100644
--- a/chrome/browser/autofill/autofill_common_test.cc
+++ b/chrome/browser/autofill/autofill_common_test.cc
@@ -11,7 +11,7 @@
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/pref_names.h"
-#include "webkit/glue/form_field.h"
+#include "webkit/forms/form_field.h"
namespace autofill_test {
@@ -19,7 +19,7 @@ void CreateTestFormField(const char* label,
const char* name,
const char* value,
const char* type,
- webkit_glue::FormField* field) {
+ webkit::forms::FormField* field) {
field->label = ASCIIToUTF16(label);
field->name = ASCIIToUTF16(name);
field->value = ASCIIToUTF16(value);
diff --git a/chrome/browser/autofill/autofill_common_test.h b/chrome/browser/autofill/autofill_common_test.h
index 4b224b8..84a14fe 100644
--- a/chrome/browser/autofill/autofill_common_test.h
+++ b/chrome/browser/autofill/autofill_common_test.h
@@ -10,9 +10,11 @@ class AutofillProfile;
class CreditCard;
class Profile;
-namespace webkit_glue {
+namespace webkit {
+namespace forms {
struct FormField;
-} // namespace webkit_glue
+}
+}
// Common utilities shared amongst Autofill tests.
namespace autofill_test {
@@ -22,7 +24,7 @@ void CreateTestFormField(const char* label,
const char* name,
const char* value,
const char* type,
- webkit_glue::FormField* field);
+ webkit::forms::FormField* field);
// A unit testing utility that is common to a number of the Autofill unit
// tests. |SetProfileInfo| provides a quick way to populate a profile with
diff --git a/chrome/browser/autofill/autofill_download_unittest.cc b/chrome/browser/autofill/autofill_download_unittest.cc
index 2dd1eea..dab40ce 100644
--- a/chrome/browser/autofill/autofill_download_unittest.cc
+++ b/chrome/browser/autofill/autofill_download_unittest.cc
@@ -22,11 +22,11 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h"
-#include "webkit/glue/form_data.h"
+#include "webkit/forms/form_data.h"
using content::BrowserThread;
-using webkit_glue::FormData;
-using webkit_glue::FormField;
+using webkit::forms::FormData;
+using webkit::forms::FormField;
using WebKit::WebInputElement;
namespace {
diff --git a/chrome/browser/autofill/autofill_external_delegate.cc b/chrome/browser/autofill/autofill_external_delegate.cc
index 16d3ff5..a9d6a13 100644
--- a/chrome/browser/autofill/autofill_external_delegate.cc
+++ b/chrome/browser/autofill/autofill_external_delegate.cc
@@ -33,8 +33,8 @@ void AutofillExternalDelegate::SelectAutofillSuggestionAtIndex(int listIndex) {
}
void AutofillExternalDelegate::OnQuery(int query_id,
- const webkit_glue::FormData& form,
- const webkit_glue::FormField& field,
+ const webkit::forms::FormData& form,
+ const webkit::forms::FormField& field,
const gfx::Rect& bounds,
bool display_warning_if_disabled) {
autofill_query_field_ = field;
diff --git a/chrome/browser/autofill/autofill_external_delegate.h b/chrome/browser/autofill/autofill_external_delegate.h
index c9bc4dc..4890565 100644
--- a/chrome/browser/autofill/autofill_external_delegate.h
+++ b/chrome/browser/autofill/autofill_external_delegate.h
@@ -9,7 +9,7 @@
#include <vector>
#include "base/string16.h"
-#include "webkit/glue/form_field.h"
+#include "webkit/forms/form_field.h"
class AutofillManager;
class TabContentsWrapper;
@@ -18,9 +18,11 @@ namespace gfx {
class Rect;
}
-namespace webkit_glue {
+namespace webkit {
+namespace forms {
struct FormData;
-} // namespace webkit_glue
+}
+}
// TODO(csharp): A lot of the logic in this class is copied from autofillagent.
// Once Autofill is moved out of WebKit this class should be the only home for
@@ -45,8 +47,8 @@ class AutofillExternalDelegate {
// Autocomplete because they have their own popup, and showing our popup
// on to of theirs would be a poor user experience.
virtual void OnQuery(int query_id,
- const webkit_glue::FormData& form,
- const webkit_glue::FormField& field,
+ const webkit::forms::FormData& form,
+ const webkit::forms::FormField& field,
const gfx::Rect& bounds,
bool display_warning_if_disabled);
@@ -87,9 +89,10 @@ class AutofillExternalDelegate {
int separator_index) = 0;
// Handle instance specific OnQueryCode.
- virtual void OnQueryPlatformSpecific(int query_id,
- const webkit_glue::FormData& form,
- const webkit_glue::FormField& field) = 0;
+ virtual void OnQueryPlatformSpecific(
+ int query_id,
+ const webkit::forms::FormData& form,
+ const webkit::forms::FormField& field) = 0;
private:
TabContentsWrapper* tab_contents_wrapper_; // weak; owns me.
@@ -99,7 +102,7 @@ class AutofillExternalDelegate {
int autofill_query_id_;
// The current field selected by Autofill.
- webkit_glue::FormField autofill_query_field_;
+ webkit::forms::FormField autofill_query_field_;
// Should we display a warning if Autofill is disabled?
bool display_warning_if_disabled_;
diff --git a/chrome/browser/autofill/autofill_field.cc b/chrome/browser/autofill/autofill_field.cc
index cabffef..174d88a 100644
--- a/chrome/browser/autofill/autofill_field.cc
+++ b/chrome/browser/autofill/autofill_field.cc
@@ -31,9 +31,9 @@ AutofillField::AutofillField()
phone_part_(IGNORED) {
}
-AutofillField::AutofillField(const webkit_glue::FormField& field,
+AutofillField::AutofillField(const webkit::forms::FormField& field,
const string16& unique_name)
- : webkit_glue::FormField(field),
+ : webkit::forms::FormField(field),
unique_name_(unique_name),
server_type_(NO_SERVER_DATA),
heuristic_type_(UNKNOWN_TYPE),
diff --git a/chrome/browser/autofill/autofill_field.h b/chrome/browser/autofill/autofill_field.h
index 92826f6..035862c 100644
--- a/chrome/browser/autofill/autofill_field.h
+++ b/chrome/browser/autofill/autofill_field.h
@@ -11,9 +11,9 @@
#include "base/basictypes.h"
#include "base/string16.h"
#include "chrome/browser/autofill/field_types.h"
-#include "webkit/glue/form_field.h"
+#include "webkit/forms/form_field.h"
-class AutofillField : public webkit_glue::FormField {
+class AutofillField : public webkit::forms::FormField {
public:
enum PhonePart {
IGNORED = 0,
@@ -22,7 +22,7 @@ class AutofillField : public webkit_glue::FormField {
};
AutofillField();
- AutofillField(const webkit_glue::FormField& field,
+ AutofillField(const webkit::forms::FormField& field,
const string16& unique_name);
virtual ~AutofillField();
diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc
index 29a3961..cf61b57 100644
--- a/chrome/browser/autofill/autofill_manager.cc
+++ b/chrome/browser/autofill/autofill_manager.cc
@@ -19,8 +19,8 @@
#include "base/utf_string_conversions.h"
#include "chrome/browser/autocomplete_history_manager.h"
#include "chrome/browser/autofill/autofill_cc_infobar_delegate.h"
-#include "chrome/browser/autofill/autofill_feedback_infobar_delegate.h"
#include "chrome/browser/autofill/autofill_external_delegate.h"
+#include "chrome/browser/autofill/autofill_feedback_infobar_delegate.h"
#include "chrome/browser/autofill/autofill_field.h"
#include "chrome/browser/autofill/autofill_metrics.h"
#include "chrome/browser/autofill/autofill_profile.h"
@@ -54,16 +54,16 @@
#include "ipc/ipc_message_macros.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/rect.h"
-#include "webkit/glue/form_data.h"
-#include "webkit/glue/form_data_predictions.h"
-#include "webkit/glue/form_field.h"
+#include "webkit/forms/form_data.h"
+#include "webkit/forms/form_data_predictions.h"
+#include "webkit/forms/form_field.h"
using base::TimeTicks;
using content::BrowserThread;
using switches::kEnableAutofillFeedback;
-using webkit_glue::FormData;
-using webkit_glue::FormDataPredictions;
-using webkit_glue::FormField;
+using webkit::forms::FormData;
+using webkit::forms::FormDataPredictions;
+using webkit::forms::FormField;
namespace {
@@ -115,7 +115,7 @@ void RemoveDuplicateSuggestions(std::vector<string16>* values,
// logical form. Returns true if any field in the given |section| within |form|
// is auto-filled.
bool SectionIsAutofilled(const FormStructure& form_structure,
- const webkit_glue::FormData& form,
+ const FormData& form,
const string16& section) {
DCHECK_EQ(form_structure.field_count(), form.fields.size());
for (size_t i = 0; i < form_structure.field_count(); ++i) {
@@ -1130,7 +1130,7 @@ void AutofillManager::GetCreditCardSuggestions(
void AutofillManager::FillCreditCardFormField(const CreditCard& credit_card,
AutofillFieldType type,
- webkit_glue::FormField* field) {
+ FormField* field) {
DCHECK_EQ(AutofillType::CREDIT_CARD, AutofillType(type).group());
DCHECK(field);
@@ -1154,7 +1154,7 @@ void AutofillManager::FillCreditCardFormField(const CreditCard& credit_card,
void AutofillManager::FillFormField(const AutofillProfile& profile,
const AutofillField& cached_field,
size_t variant,
- webkit_glue::FormField* field) {
+ FormField* field) {
AutofillFieldType type = cached_field.type();
DCHECK_NE(AutofillType::CREDIT_CARD, AutofillType(type).group());
DCHECK(field);
@@ -1181,7 +1181,7 @@ void AutofillManager::FillFormField(const AutofillProfile& profile,
void AutofillManager::FillPhoneNumberField(const AutofillProfile& profile,
const AutofillField& cached_field,
size_t variant,
- webkit_glue::FormField* field) {
+ FormField* field) {
std::vector<string16> values;
profile.GetCanonicalizedMultiInfo(cached_field.type(), &values);
DCHECK(variant < values.size());
diff --git a/chrome/browser/autofill/autofill_manager.h b/chrome/browser/autofill/autofill_manager.h
index 1777e1c..7460232 100644
--- a/chrome/browser/autofill/autofill_manager.h
+++ b/chrome/browser/autofill/autofill_manager.h
@@ -44,10 +44,12 @@ namespace IPC {
class Message;
}
-namespace webkit_glue {
+namespace webkit {
+namespace forms {
struct FormData;
struct FormField;
}
+}
// Manages saving and restoring the user's personal information entered into web
// forms.
@@ -70,8 +72,8 @@ class AutofillManager : public TabContentsObserver,
// Called from our external delegate so they cannot be private.
void OnFillAutofillFormData(int query_id,
- const webkit_glue::FormData& form,
- const webkit_glue::FormField& field,
+ const webkit::forms::FormData& form,
+ const webkit::forms::FormField& field,
int unique_id);
void OnDidShowAutofillSuggestions(bool is_new_popup);
void OnDidFillAutofillFormData(const base::TimeTicks& timestamp);
@@ -130,7 +132,7 @@ class AutofillManager : public TabContentsObserver,
// Processes the submitted |form|, saving any new Autofill data and uploading
// the possible field types for the submitted fields to the crowdsouring
// server. Returns false if this form is not relevant for Autofill.
- bool OnFormSubmitted(const webkit_glue::FormData& form,
+ bool OnFormSubmitted(const webkit::forms::FormData& form,
const base::TimeTicks& timestamp);
private:
@@ -144,16 +146,16 @@ class AutofillManager : public TabContentsObserver,
virtual void OnLoadedServerPredictions(
const std::string& response_xml) OVERRIDE;
- void OnFormsSeen(const std::vector<webkit_glue::FormData>& forms,
+ void OnFormsSeen(const std::vector<webkit::forms::FormData>& forms,
const base::TimeTicks& timestamp);
- void OnTextFieldDidChange(const webkit_glue::FormData& form,
- const webkit_glue::FormField& field,
+ void OnTextFieldDidChange(const webkit::forms::FormData& form,
+ const webkit::forms::FormField& field,
const base::TimeTicks& timestamp);
// The |bounding_box| is a window relative value.
void OnQueryFormFieldAutofill(int query_id,
- const webkit_glue::FormData& form,
- const webkit_glue::FormField& field,
+ const webkit::forms::FormData& form,
+ const webkit::forms::FormField& field,
const gfx::Rect& bounding_box,
bool display_warning);
void OnShowAutofillDialog();
@@ -178,15 +180,15 @@ class AutofillManager : public TabContentsObserver,
// Fills |form_structure| cached element corresponding to |form|.
// Returns false if the cached element was not found.
- bool FindCachedForm(const webkit_glue::FormData& form,
+ bool FindCachedForm(const webkit::forms::FormData& form,
FormStructure** form_structure) const WARN_UNUSED_RESULT;
// Fills |form_structure| and |autofill_field| with the cached elements
// corresponding to |form| and |field|. This might have the side-effect of
// updating the cache. Returns false if the |form| is not autofillable, or if
// it is not already present in the cache and the cache is full.
- bool GetCachedFormAndField(const webkit_glue::FormData& form,
- const webkit_glue::FormField& field,
+ bool GetCachedFormAndField(const webkit::forms::FormData& form,
+ const webkit::forms::FormField& field,
FormStructure** form_structure,
AutofillField** autofill_field) WARN_UNUSED_RESULT;
@@ -194,7 +196,7 @@ class AutofillManager : public TabContentsObserver,
// |cached_form| should be a pointer to the existing version of the form, or
// NULL if no cached version exists. The updated form is then written into
// |updated_form|. Returns false if the cache could not be updated.
- bool UpdateCachedForm(const webkit_glue::FormData& live_form,
+ bool UpdateCachedForm(const webkit::forms::FormData& live_form,
const FormStructure* cached_form,
FormStructure** updated_form) WARN_UNUSED_RESULT;
@@ -202,7 +204,7 @@ class AutofillManager : public TabContentsObserver,
// value of |field| and returns the labels of the matching profiles. |labels|
// is filled with the Profile label.
void GetProfileSuggestions(FormStructure* form,
- const webkit_glue::FormField& field,
+ const webkit::forms::FormField& field,
AutofillFieldType type,
std::vector<string16>* values,
std::vector<string16>* labels,
@@ -212,7 +214,7 @@ class AutofillManager : public TabContentsObserver,
// Returns a list of values from the stored credit cards that match |type| and
// the value of |field| and returns the labels of the matching credit cards.
void GetCreditCardSuggestions(FormStructure* form,
- const webkit_glue::FormField& field,
+ const webkit::forms::FormField& field,
AutofillFieldType type,
std::vector<string16>* values,
std::vector<string16>* labels,
@@ -222,7 +224,7 @@ class AutofillManager : public TabContentsObserver,
// Set |field|'s value based on |type| and contents of the |credit_card|.
void FillCreditCardFormField(const CreditCard& credit_card,
AutofillFieldType type,
- webkit_glue::FormField* field);
+ webkit::forms::FormField* field);
// Set |field|'s value based on |cached_field|'s type and contents of the
// |profile|. The |variant| parameter specifies which value in a multi-valued
@@ -230,7 +232,7 @@ class AutofillManager : public TabContentsObserver,
void FillFormField(const AutofillProfile& profile,
const AutofillField& cached_field,
size_t variant,
- webkit_glue::FormField* field);
+ webkit::forms::FormField* field);
// Set |field|'s value for phone number based on contents of the |profile|.
// The |cached_field| specifies the type of the phone and whether this is a
@@ -239,10 +241,10 @@ class AutofillManager : public TabContentsObserver,
void FillPhoneNumberField(const AutofillProfile& profile,
const AutofillField& cached_field,
size_t variant,
- webkit_glue::FormField* field);
+ webkit::forms::FormField* field);
// Parses the forms using heuristic matching and querying the Autofill server.
- void ParseForms(const std::vector<webkit_glue::FormData>& forms);
+ void ParseForms(const std::vector<webkit::forms::FormData>& forms);
// Imports the form data, submitted by the user, into |personal_data_|.
void ImportFormData(const FormStructure& submitted_form);
diff --git a/chrome/browser/autofill/autofill_manager_unittest.cc b/chrome/browser/autofill/autofill_manager_unittest.cc
index a3ad503..22abbf0 100644
--- a/chrome/browser/autofill/autofill_manager_unittest.cc
+++ b/chrome/browser/autofill/autofill_manager_unittest.cc
@@ -39,13 +39,13 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/rect.h"
-#include "webkit/glue/form_data.h"
-#include "webkit/glue/form_field.h"
+#include "webkit/forms/form_data.h"
+#include "webkit/forms/form_field.h"
using content::BrowserThread;
using testing::_;
-using webkit_glue::FormData;
-using webkit_glue::FormField;
+using webkit::forms::FormData;
+using webkit::forms::FormField;
namespace {
@@ -269,7 +269,7 @@ void ExpectFilledField(const char* expected_label,
const char* expected_name,
const char* expected_value,
const char* expected_form_control_type,
- const webkit_glue::FormField& field) {
+ const webkit::forms::FormField& field) {
SCOPED_TRACE(expected_label);
EXPECT_EQ(UTF8ToUTF16(expected_label), field.label);
EXPECT_EQ(UTF8ToUTF16(expected_name), field.name);
@@ -566,8 +566,8 @@ class AutofillManagerTest : public TabContentsWrapperTestHarness {
}
void GetAutofillSuggestions(int query_id,
- const webkit_glue::FormData& form,
- const webkit_glue::FormField& field) {
+ const webkit::forms::FormData& form,
+ const webkit::forms::FormField& field) {
autofill_manager_->OnQueryFormFieldAutofill(query_id,
form,
field,
@@ -575,8 +575,8 @@ class AutofillManagerTest : public TabContentsWrapperTestHarness {
false);
}
- void GetAutofillSuggestions(const webkit_glue::FormData& form,
- const webkit_glue::FormField& field) {
+ void GetAutofillSuggestions(const webkit::forms::FormData& form,
+ const webkit::forms::FormField& field) {
GetAutofillSuggestions(kDefaultPageID, form, field);
}
@@ -585,7 +585,7 @@ class AutofillManagerTest : public TabContentsWrapperTestHarness {
SendSuggestions(&result);
}
- void FormsSeen(const std::vector<webkit_glue::FormData>& forms) {
+ void FormsSeen(const std::vector<webkit::forms::FormData>& forms) {
autofill_manager_->OnFormsSeen(forms, base::TimeTicks());
}
@@ -595,8 +595,8 @@ class AutofillManagerTest : public TabContentsWrapperTestHarness {
}
void FillAutofillFormData(int query_id,
- const webkit_glue::FormData& form,
- const webkit_glue::FormField& field,
+ const webkit::forms::FormData& form,
+ const webkit::forms::FormField& field,
int unique_id) {
autofill_manager_->OnFillAutofillFormData(query_id, form, field, unique_id);
}
@@ -2869,8 +2869,8 @@ class MockAutofillExternalDelegate : public AutofillExternalDelegate {
virtual ~MockAutofillExternalDelegate() {}
MOCK_METHOD5(OnQuery, void(int query_id,
- const webkit_glue::FormData& form,
- const webkit_glue::FormField& field,
+ const webkit::forms::FormData& form,
+ const webkit::forms::FormField& field,
const gfx::Rect& bounds,
bool display_warning));
@@ -2885,8 +2885,8 @@ class MockAutofillExternalDelegate : public AutofillExternalDelegate {
virtual void OnQueryPlatformSpecific(
int query_id,
- const webkit_glue::FormData& form,
- const webkit_glue::FormField& field) OVERRIDE {}
+ const webkit::forms::FormData& form,
+ const webkit::forms::FormField& field) OVERRIDE {}
private:
DISALLOW_COPY_AND_ASSIGN(MockAutofillExternalDelegate);
diff --git a/chrome/browser/autofill/autofill_merge_unittest.cc b/chrome/browser/autofill/autofill_merge_unittest.cc
index f232f2a..73552af 100644
--- a/chrome/browser/autofill/autofill_merge_unittest.cc
+++ b/chrome/browser/autofill/autofill_merge_unittest.cc
@@ -16,7 +16,7 @@
#include "googleurl/src/gurl.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h"
-#include "webkit/glue/form_data.h"
+#include "webkit/forms/form_data.h"
namespace {
@@ -155,7 +155,7 @@ void AutofillMergeTest::MergeProfiles(const std::string& profiles,
personal_data_.Reset();
// Create a test form.
- webkit_glue::FormData form;
+ webkit::forms::FormData form;
form.name = ASCIIToUTF16("MyTestForm");
form.method = ASCIIToUTF16("POST");
form.origin = GURL("https://www.example.com/origin.html");
@@ -175,7 +175,7 @@ void AutofillMergeTest::MergeProfiles(const std::string& profiles,
string16 field_type = UTF8ToUTF16(line.substr(0, separator_pos));
string16 value = UTF8ToUTF16(line.substr(separator_pos + kFieldOffset));
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.label = field_type;
field.name = field_type;
field.value = value;
diff --git a/chrome/browser/autofill/autofill_metrics.cc b/chrome/browser/autofill/autofill_metrics.cc
index 4c1ab65..b99da96f 100644
--- a/chrome/browser/autofill/autofill_metrics.cc
+++ b/chrome/browser/autofill/autofill_metrics.cc
@@ -9,7 +9,7 @@
#include "base/time.h"
#include "chrome/browser/autofill/autofill_type.h"
#include "chrome/browser/autofill/form_structure.h"
-#include "webkit/glue/form_data.h"
+#include "webkit/forms/form_data.h"
namespace {
@@ -202,7 +202,7 @@ void LogServerExperimentId(const std::string& histogram_name,
ServerExperiment metric = UNKNOWN_EXPERIMENT;
const std::string default_experiment_name =
- FormStructure(webkit_glue::FormData()).server_experiment_id();
+ FormStructure(webkit::forms::FormData()).server_experiment_id();
if (experiment_id.empty())
metric = NO_EXPERIMENT;
else if (experiment_id == "ar06")
diff --git a/chrome/browser/autofill/autofill_metrics_unittest.cc b/chrome/browser/autofill/autofill_metrics_unittest.cc
index 826c39df..b588c8c 100644
--- a/chrome/browser/autofill/autofill_metrics_unittest.cc
+++ b/chrome/browser/autofill/autofill_metrics_unittest.cc
@@ -23,8 +23,8 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/rect.h"
-#include "webkit/glue/form_data.h"
-#include "webkit/glue/form_field.h"
+#include "webkit/forms/form_data.h"
+#include "webkit/forms/form_field.h"
using content::BrowserThread;
using ::testing::_;
@@ -32,8 +32,8 @@ using ::testing::AnyNumber;
using ::testing::Mock;
using base::TimeTicks;
using base::TimeDelta;
-using webkit_glue::FormData;
-using webkit_glue::FormField;
+using webkit::forms::FormData;
+using webkit::forms::FormField;
namespace {
diff --git a/chrome/browser/autofill/credit_card_field_unittest.cc b/chrome/browser/autofill/credit_card_field_unittest.cc
index c03c772..37bd16d 100644
--- a/chrome/browser/autofill/credit_card_field_unittest.cc
+++ b/chrome/browser/autofill/credit_card_field_unittest.cc
@@ -9,7 +9,7 @@
#include "chrome/browser/autofill/autofill_scanner.h"
#include "chrome/browser/autofill/credit_card_field.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "webkit/glue/form_field.h"
+#include "webkit/forms/form_field.h"
class CreditCardFieldTest : public testing::Test {
public:
@@ -43,7 +43,7 @@ TEST_F(CreditCardFieldTest, NonParse) {
}
TEST_F(CreditCardFieldTest, ParseCreditCardNoNumber) {
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("text");
field.label = ASCIIToUTF16("Exp Month");
@@ -60,7 +60,7 @@ TEST_F(CreditCardFieldTest, ParseCreditCardNoNumber) {
}
TEST_F(CreditCardFieldTest, ParseCreditCardNoDate) {
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("text");
field.label = ASCIIToUTF16("Card Number");
@@ -73,7 +73,7 @@ TEST_F(CreditCardFieldTest, ParseCreditCardNoDate) {
}
TEST_F(CreditCardFieldTest, ParseMiniumCreditCard) {
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("text");
field.label = ASCIIToUTF16("Card Number");
@@ -105,7 +105,7 @@ TEST_F(CreditCardFieldTest, ParseMiniumCreditCard) {
}
TEST_F(CreditCardFieldTest, ParseFullCreditCard) {
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("text");
field.label = ASCIIToUTF16("Name on Card");
@@ -151,7 +151,7 @@ TEST_F(CreditCardFieldTest, ParseFullCreditCard) {
}
TEST_F(CreditCardFieldTest, ParseExpMonthYear) {
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("text");
field.label = ASCIIToUTF16("Name on Card");
@@ -190,7 +190,7 @@ TEST_F(CreditCardFieldTest, ParseExpMonthYear) {
}
TEST_F(CreditCardFieldTest, ParseExpMonthYear2) {
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("text");
field.label = ASCIIToUTF16("Name on Card");
@@ -229,7 +229,7 @@ TEST_F(CreditCardFieldTest, ParseExpMonthYear2) {
}
TEST_F(CreditCardFieldTest, ParseExpField) {
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("text");
field.label = ASCIIToUTF16("Name on Card");
@@ -261,7 +261,7 @@ TEST_F(CreditCardFieldTest, ParseExpField) {
}
TEST_F(CreditCardFieldTest, ParseExpField2DigitYear) {
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("text");
field.label = ASCIIToUTF16("Name on Card");
@@ -293,7 +293,7 @@ TEST_F(CreditCardFieldTest, ParseExpField2DigitYear) {
}
TEST_F(CreditCardFieldTest, ParseCreditCardHolderNameWithCCFullName) {
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("text");
field.label = ASCIIToUTF16("Name");
diff --git a/chrome/browser/autofill/form_structure.cc b/chrome/browser/autofill/form_structure.cc
index 33a2768..4229af3 100644
--- a/chrome/browser/autofill/form_structure.cc
+++ b/chrome/browser/autofill/form_structure.cc
@@ -9,9 +9,9 @@
#include "base/basictypes.h"
#include "base/logging.h"
#include "base/sha1.h"
-#include "base/stringprintf.h"
#include "base/string_number_conversions.h"
#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "base/time.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/autofill/autofill_metrics.h"
@@ -20,14 +20,14 @@
#include "chrome/browser/autofill/field_types.h"
#include "chrome/browser/autofill/form_field.h"
#include "third_party/libjingle/source/talk/xmllite/xmlelement.h"
-#include "webkit/glue/form_data.h"
-#include "webkit/glue/form_data_predictions.h"
-#include "webkit/glue/form_field.h"
-#include "webkit/glue/form_field_predictions.h"
+#include "webkit/forms/form_data.h"
+#include "webkit/forms/form_data_predictions.h"
+#include "webkit/forms/form_field.h"
+#include "webkit/forms/form_field_predictions.h"
-using webkit_glue::FormData;
-using webkit_glue::FormDataPredictions;
-using webkit_glue::FormFieldPredictions;
+using webkit::forms::FormData;
+using webkit::forms::FormDataPredictions;
+using webkit::forms::FormFieldPredictions;
namespace {
@@ -243,7 +243,7 @@ FormStructure::FormStructure(const FormData& form)
has_author_specified_types_(false) {
// Copy the form fields.
std::map<string16, size_t> unique_names;
- for (std::vector<webkit_glue::FormField>::const_iterator field =
+ for (std::vector<webkit::forms::FormField>::const_iterator field =
form.fields.begin();
field != form.fields.end(); field++) {
// Add all supported form fields (including with empty names) to the
@@ -486,7 +486,7 @@ void FormStructure::GetFieldTypePredictions(
for (std::vector<AutofillField*>::const_iterator field =
form_structure->fields_.begin();
field != form_structure->fields_.end(); ++field) {
- form.data.fields.push_back(webkit_glue::FormField(**field));
+ form.data.fields.push_back(webkit::forms::FormField(**field));
FormFieldPredictions annotated_field;
annotated_field.signature = (*field)->FieldSignature();
diff --git a/chrome/browser/autofill/form_structure.h b/chrome/browser/autofill/form_structure.h
index db38b95..0f8b3ce 100644
--- a/chrome/browser/autofill/form_structure.h
+++ b/chrome/browser/autofill/form_structure.h
@@ -38,16 +38,18 @@ namespace buzz {
class XmlElement;
}
-namespace webkit_glue {
+namespace webkit {
+namespace forms {
struct FormData;
struct FormDataPredictions;
}
+}
// FormStructure stores a single HTML form together with the values entered
// in the fields along with additional information needed by Autofill.
class FormStructure {
public:
- explicit FormStructure(const webkit_glue::FormData& form);
+ explicit FormStructure(const webkit::forms::FormData& form);
virtual ~FormStructure();
// Runs several heuristics against the form fields to determine their possible
@@ -78,7 +80,7 @@ class FormStructure {
// fields' predicted types.
static void GetFieldTypePredictions(
const std::vector<FormStructure*>& form_structures,
- std::vector<webkit_glue::FormDataPredictions>* forms);
+ std::vector<webkit::forms::FormDataPredictions>* forms);
// The unique signature for this form, composed of the target url domain,
// the form name, and the form field names in a 64-bit hash.
@@ -139,8 +141,8 @@ class FormStructure {
virtual std::string server_experiment_id() const;
- bool operator==(const webkit_glue::FormData& form) const;
- bool operator!=(const webkit_glue::FormData& form) const;
+ bool operator==(const webkit::forms::FormData& form) const;
+ bool operator!=(const webkit::forms::FormData& form) const;
private:
friend class FormStructureTest;
diff --git a/chrome/browser/autofill/form_structure_unittest.cc b/chrome/browser/autofill/form_structure_unittest.cc
index dfb00e6..811c69e 100644
--- a/chrome/browser/autofill/form_structure_unittest.cc
+++ b/chrome/browser/autofill/form_structure_unittest.cc
@@ -9,14 +9,15 @@
#include "googleurl/src/gurl.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h"
-#include "webkit/glue/form_data.h"
-#include "webkit/glue/form_field.h"
+#include "webkit/forms/form_data.h"
+#include "webkit/forms/form_field.h"
-using webkit_glue::FormData;
-using webkit_glue::FormField;
+using webkit::forms::FormData;
+using webkit::forms::FormField;
using WebKit::WebInputElement;
-namespace webkit_glue {
+namespace webkit {
+namespace forms {
std::ostream& operator<<(std::ostream& os, const FormData& form) {
os << UTF16ToUTF8(form.name)
@@ -28,7 +29,7 @@ std::ostream& operator<<(std::ostream& os, const FormData& form) {
<< form.action.spec()
<< " ";
- for (std::vector<webkit_glue::FormField>::const_iterator iter =
+ for (std::vector<webkit::forms::FormField>::const_iterator iter =
form.fields.begin();
iter != form.fields.end(); ++iter) {
os << *iter
@@ -38,6 +39,7 @@ std::ostream& operator<<(std::ostream& os, const FormData& form) {
return os;
}
+} // namespace forms
} // namespace webkit_glue
class FormStructureTest {
diff --git a/chrome/browser/autofill/name_field_unittest.cc b/chrome/browser/autofill/name_field_unittest.cc
index f89d9de..3c703f3 100644
--- a/chrome/browser/autofill/name_field_unittest.cc
+++ b/chrome/browser/autofill/name_field_unittest.cc
@@ -9,7 +9,7 @@
#include "chrome/browser/autofill/autofill_scanner.h"
#include "chrome/browser/autofill/name_field.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "webkit/glue/form_field.h"
+#include "webkit/forms/form_field.h"
class NameFieldTest : public testing::Test {
public:
@@ -30,7 +30,7 @@ class NameFieldTest : public testing::Test {
};
TEST_F(NameFieldTest, FirstMiddleLast) {
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("text");
field.label = ASCIIToUTF16("First Name");
@@ -61,7 +61,7 @@ TEST_F(NameFieldTest, FirstMiddleLast) {
}
TEST_F(NameFieldTest, FirstMiddleLast2) {
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("text");
field.label = string16();
@@ -92,7 +92,7 @@ TEST_F(NameFieldTest, FirstMiddleLast2) {
}
TEST_F(NameFieldTest, FirstLast) {
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("text");
field.label = string16();
@@ -116,7 +116,7 @@ TEST_F(NameFieldTest, FirstLast) {
}
TEST_F(NameFieldTest, FirstLast2) {
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("text");
field.label = ASCIIToUTF16("Name");
@@ -140,7 +140,7 @@ TEST_F(NameFieldTest, FirstLast2) {
}
TEST_F(NameFieldTest, FirstLastMiddleWithSpaces) {
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("text");
field.label = ASCIIToUTF16("First Name");
@@ -171,7 +171,7 @@ TEST_F(NameFieldTest, FirstLastMiddleWithSpaces) {
}
TEST_F(NameFieldTest, FirstLastEmpty) {
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("text");
field.label = ASCIIToUTF16("Name");
@@ -195,7 +195,7 @@ TEST_F(NameFieldTest, FirstLastEmpty) {
}
TEST_F(NameFieldTest, FirstMiddleLastEmpty) {
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("text");
field.label = ASCIIToUTF16("Name");
@@ -226,7 +226,7 @@ TEST_F(NameFieldTest, FirstMiddleLastEmpty) {
}
TEST_F(NameFieldTest, MiddleInitial) {
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("text");
field.label = ASCIIToUTF16("First Name");
@@ -257,7 +257,7 @@ TEST_F(NameFieldTest, MiddleInitial) {
}
TEST_F(NameFieldTest, MiddleInitialNoLastName) {
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("text");
field.label = ASCIIToUTF16("First Name");
@@ -276,7 +276,7 @@ TEST_F(NameFieldTest, MiddleInitialNoLastName) {
// This case is from the dell.com checkout page. The middle initial "mi" string
// came at the end following other descriptive text. http://crbug.com/45123.
TEST_F(NameFieldTest, MiddleInitialAtEnd) {
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("text");
field.label = string16();
diff --git a/chrome/browser/autofill/personal_data_manager_unittest.cc b/chrome/browser/autofill/personal_data_manager_unittest.cc
index 630b1eb..90f8d81 100644
--- a/chrome/browser/autofill/personal_data_manager_unittest.cc
+++ b/chrome/browser/autofill/personal_data_manager_unittest.cc
@@ -25,10 +25,10 @@
#include "content/test/test_browser_thread.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "webkit/glue/form_data.h"
+#include "webkit/forms/form_data.h"
using content::BrowserThread;
-using webkit_glue::FormData;
+using webkit::forms::FormData;
ACTION(QuitUIMessageLoop) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -480,7 +480,7 @@ TEST_F(PersonalDataManagerTest, Refresh) {
TEST_F(PersonalDataManagerTest, ImportFormData) {
FormData form;
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
autofill_test::CreateTestFormField(
"First name:", "first_name", "George", "text", &field);
form.fields.push_back(field);
@@ -525,7 +525,7 @@ TEST_F(PersonalDataManagerTest, ImportFormData) {
TEST_F(PersonalDataManagerTest, ImportFormDataBadEmail) {
FormData form;
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
autofill_test::CreateTestFormField(
"First name:", "first_name", "George", "text", &field);
form.fields.push_back(field);
@@ -560,7 +560,7 @@ TEST_F(PersonalDataManagerTest, ImportFormDataBadEmail) {
TEST_F(PersonalDataManagerTest, ImportFormDataNotEnoughFilledFields) {
FormData form;
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
autofill_test::CreateTestFormField(
"First name:", "first_name", "George", "text", &field);
form.fields.push_back(field);
@@ -585,7 +585,7 @@ TEST_F(PersonalDataManagerTest, ImportFormDataNotEnoughFilledFields) {
TEST_F(PersonalDataManagerTest, ImportPhoneNumberSplitAcrossMultipleFields) {
FormData form;
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
autofill_test::CreateTestFormField(
"First name:", "first_name", "George", "text", &field);
form.fields.push_back(field);
@@ -676,7 +676,7 @@ TEST_F(PersonalDataManagerTest, SetUniqueCreditCardLabels) {
TEST_F(PersonalDataManagerTest, AggregateTwoDifferentProfiles) {
FormData form1;
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
autofill_test::CreateTestFormField(
"First name:", "first_name", "George", "text", &field);
form1.fields.push_back(field);
@@ -767,7 +767,7 @@ TEST_F(PersonalDataManagerTest, AggregateTwoDifferentProfiles) {
TEST_F(PersonalDataManagerTest, AggregateTwoProfilesWithMultiValue) {
FormData form1;
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
autofill_test::CreateTestFormField(
"First name:", "first_name", "George", "text", &field);
form1.fields.push_back(field);
@@ -862,7 +862,7 @@ TEST_F(PersonalDataManagerTest, AggregateTwoProfilesWithMultiValue) {
TEST_F(PersonalDataManagerTest, AggregateSameProfileWithConflict) {
FormData form1;
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
autofill_test::CreateTestFormField(
"First name:", "first_name", "George", "text", &field);
form1.fields.push_back(field);
@@ -972,7 +972,7 @@ TEST_F(PersonalDataManagerTest, AggregateSameProfileWithConflict) {
TEST_F(PersonalDataManagerTest, AggregateProfileWithMissingInfoInOld) {
FormData form1;
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
autofill_test::CreateTestFormField(
"First name:", "first_name", "George", "text", &field);
form1.fields.push_back(field);
@@ -1059,7 +1059,7 @@ TEST_F(PersonalDataManagerTest, AggregateProfileWithMissingInfoInOld) {
TEST_F(PersonalDataManagerTest, AggregateProfileWithMissingInfoInNew) {
FormData form1;
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
autofill_test::CreateTestFormField(
"First name:", "first_name", "George", "text", &field);
form1.fields.push_back(field);
@@ -1150,7 +1150,7 @@ TEST_F(PersonalDataManagerTest, AggregateProfileWithMissingInfoInNew) {
TEST_F(PersonalDataManagerTest, AggregateProfileWithInsufficientAddress) {
FormData form1;
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
autofill_test::CreateTestFormField(
"First name:", "first_name", "George", "text", &field);
form1.fields.push_back(field);
@@ -1200,7 +1200,7 @@ TEST_F(PersonalDataManagerTest, AggregateExistingAuxiliaryProfile) {
// Simulate a form submission with a subset of the info.
// Note that the phone number format is different from the saved format.
FormData form;
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
autofill_test::CreateTestFormField(
"First name:", "first_name", "Tester", "text", &field);
form.fields.push_back(field);
@@ -1247,7 +1247,7 @@ TEST_F(PersonalDataManagerTest, AggregateTwoDifferentCreditCards) {
FormData form1;
// Start with a single valid credit card form.
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
autofill_test::CreateTestFormField(
"Name on card:", "name_on_card", "Biggie Smalls", "text", &field);
form1.fields.push_back(field);
@@ -1323,7 +1323,7 @@ TEST_F(PersonalDataManagerTest, AggregateInvalidCreditCard) {
FormData form1;
// Start with a single valid credit card form.
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
autofill_test::CreateTestFormField(
"Name on card:", "name_on_card", "Biggie Smalls", "text", &field);
form1.fields.push_back(field);
@@ -1390,7 +1390,7 @@ TEST_F(PersonalDataManagerTest, AggregateSameCreditCardWithConflict) {
FormData form1;
// Start with a single valid credit card form.
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
autofill_test::CreateTestFormField(
"Name on card:", "name_on_card", "Biggie Smalls", "text", &field);
form1.fields.push_back(field);
@@ -1466,7 +1466,7 @@ TEST_F(PersonalDataManagerTest, AggregateEmptyCreditCardWithConflict) {
FormData form1;
// Start with a single valid credit card form.
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
autofill_test::CreateTestFormField(
"Name on card:", "name_on_card", "Biggie Smalls", "text", &field);
form1.fields.push_back(field);
@@ -1534,7 +1534,7 @@ TEST_F(PersonalDataManagerTest, AggregateCreditCardWithMissingInfoInNew) {
FormData form1;
// Start with a single valid credit card form.
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
autofill_test::CreateTestFormField(
"Name on card:", "name_on_card", "Biggie Smalls", "text", &field);
form1.fields.push_back(field);
@@ -1650,7 +1650,7 @@ TEST_F(PersonalDataManagerTest, AggregateCreditCardWithMissingInfoInOld) {
// Add a second different valid credit card where the year is different but
// the credit card number matches.
FormData form;
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
autofill_test::CreateTestFormField(
"Name on card:", "name_on_card", "Biggie Smalls", "text", &field);
form.fields.push_back(field);
@@ -1707,7 +1707,7 @@ TEST_F(PersonalDataManagerTest, AggregateSameCreditCardWithSeparators) {
// Import the same card info, but with different separators in the number.
FormData form;
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
autofill_test::CreateTestFormField(
"Name on card:", "name_on_card", "Biggie Smalls", "text", &field);
form.fields.push_back(field);
@@ -1861,7 +1861,7 @@ TEST_F(PersonalDataManagerTest, GetNonEmptyTypes) {
TEST_F(PersonalDataManagerTest, CaseInsensitiveMultiValueAggregation) {
FormData form1;
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
autofill_test::CreateTestFormField(
"First name:", "first_name", "George", "text", &field);
form1.fields.push_back(field);
diff --git a/chrome/browser/autofill/phone_field_unittest.cc b/chrome/browser/autofill/phone_field_unittest.cc
index 4f8dbd1..cd8baf5 100644
--- a/chrome/browser/autofill/phone_field_unittest.cc
+++ b/chrome/browser/autofill/phone_field_unittest.cc
@@ -9,7 +9,7 @@
#include "chrome/browser/autofill/autofill_scanner.h"
#include "chrome/browser/autofill/phone_field.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "webkit/glue/form_field.h"
+#include "webkit/forms/form_field.h"
class PhoneFieldTest : public testing::Test {
public:
@@ -43,7 +43,7 @@ TEST_F(PhoneFieldTest, NonParse) {
}
TEST_F(PhoneFieldTest, ParseOneLinePhone) {
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("text");
field.label = ASCIIToUTF16("Phone");
@@ -60,7 +60,7 @@ TEST_F(PhoneFieldTest, ParseOneLinePhone) {
}
TEST_F(PhoneFieldTest, ParseTwoLinePhone) {
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("text");
field.label = ASCIIToUTF16("Area Code");
@@ -89,7 +89,7 @@ TEST_F(PhoneFieldTest, ThreePartPhoneNumber) {
// <country code> - <area code> - <phone>. The only distinguishing feature is
// size: <prefix> is no bigger than 3 characters, and <suffix> is no bigger
// than 4.
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("text");
field.label = ASCIIToUTF16("Phone:");
@@ -133,7 +133,7 @@ TEST_F(PhoneFieldTest, ThreePartPhoneNumber) {
// encountered in http://crbug.com/40694 with page
// https://www.wrapables.com/jsp/Signup.jsp.
TEST_F(PhoneFieldTest, ThreePartPhoneNumberPrefixSuffix) {
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("text");
field.label = ASCIIToUTF16("Phone:");
@@ -164,7 +164,7 @@ TEST_F(PhoneFieldTest, ThreePartPhoneNumberPrefixSuffix) {
}
TEST_F(PhoneFieldTest, ThreePartPhoneNumberPrefixSuffix2) {
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("text");
field.label = ASCIIToUTF16("(");
@@ -200,7 +200,7 @@ TEST_F(PhoneFieldTest, ThreePartPhoneNumberPrefixSuffix2) {
TEST_F(PhoneFieldTest, CountryAndCityAndPhoneNumber) {
// Phone in format <country code>:3 - <city and number>:10
// The |maxlength| is considered, otherwise it's too broad.
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("text");
field.label = ASCIIToUTF16("Phone Number");
diff --git a/chrome/browser/autofill/select_control_handler.cc b/chrome/browser/autofill/select_control_handler.cc
index f2cf81d..682ebff 100644
--- a/chrome/browser/autofill/select_control_handler.cc
+++ b/chrome/browser/autofill/select_control_handler.cc
@@ -13,7 +13,7 @@
#include "chrome/browser/autofill/autofill_country.h"
#include "chrome/browser/autofill/autofill_profile.h"
#include "chrome/browser/autofill/form_group.h"
-#include "webkit/glue/form_field.h"
+#include "webkit/forms/form_field.h"
namespace {
@@ -120,7 +120,7 @@ const char* const kMonthsNumeric[] = {
// Returns true if the value was successfully set, meaning |value| was found in
// the list of select options in |field|.
bool SetSelectControlValue(const string16& value,
- webkit_glue::FormField* field) {
+ webkit::forms::FormField* field) {
string16 value_lowercase = StringToLowerASCII(value);
DCHECK_EQ(field->option_values.size(), field->option_contents.size());
@@ -136,7 +136,7 @@ bool SetSelectControlValue(const string16& value,
}
bool FillStateSelectControl(const string16& value,
- webkit_glue::FormField* field) {
+ webkit::forms::FormField* field) {
string16 abbrev, full;
if (value.size() < 4U) {
abbrev = value;
@@ -157,7 +157,7 @@ bool FillStateSelectControl(const string16& value,
}
bool FillCountrySelectControl(const FormGroup& form_group,
- webkit_glue::FormField* field) {
+ webkit::forms::FormField* field) {
const AutofillProfile& profile =
static_cast<const AutofillProfile&>(form_group);
std::string country_code = profile.CountryCode();
@@ -180,7 +180,7 @@ bool FillCountrySelectControl(const FormGroup& form_group,
}
bool FillExpirationMonthSelectControl(const string16& value,
- webkit_glue::FormField* field) {
+ webkit::forms::FormField* field) {
int index = 0;
if (!base::StringToInt(value, &index) ||
index <= 0 ||
@@ -200,7 +200,7 @@ namespace autofill {
void FillSelectControl(const FormGroup& form_group,
AutofillFieldType type,
- webkit_glue::FormField* field) {
+ webkit::forms::FormField* field) {
DCHECK(field);
DCHECK_EQ(ASCIIToUTF16("select-one"), field->form_control_type);
DCHECK_EQ(field->option_values.size(), field->option_contents.size());
diff --git a/chrome/browser/autofill/select_control_handler.h b/chrome/browser/autofill/select_control_handler.h
index 1793c70..b4cacf7 100644
--- a/chrome/browser/autofill/select_control_handler.h
+++ b/chrome/browser/autofill/select_control_handler.h
@@ -11,9 +11,11 @@
class FormGroup;
-namespace webkit_glue {
+namespace webkit {
+namespace forms {
struct FormField;
-} // namespace webkit_glue
+}
+}
namespace autofill {
@@ -23,7 +25,7 @@ namespace autofill {
// months, e.g., (04, April).
void FillSelectControl(const FormGroup& form_group,
AutofillFieldType type,
- webkit_glue::FormField* field);
+ webkit::forms::FormField* field);
// Returns true if |value| is a valid US state name or abbreviation. It is case
// insensitive. Valid for US states only.
diff --git a/chrome/browser/autofill/select_control_handler_unittest.cc b/chrome/browser/autofill/select_control_handler_unittest.cc
index fc7577c..2977655 100644
--- a/chrome/browser/autofill/select_control_handler_unittest.cc
+++ b/chrome/browser/autofill/select_control_handler_unittest.cc
@@ -9,7 +9,7 @@
#include "chrome/browser/autofill/credit_card.h"
#include "chrome/browser/autofill/select_control_handler.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "webkit/glue/form_field.h"
+#include "webkit/forms/form_field.h"
typedef testing::Test SelectControlHandlerTest;
@@ -21,7 +21,7 @@ TEST_F(SelectControlHandlerTest, CreditCardMonthExact) {
for (size_t i = 0; i < arraysize(kMonthsNumeric); ++i)
options[i] = ASCIIToUTF16(kMonthsNumeric[i]);
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("select-one");
field.option_values = options;
field.option_contents = options;
@@ -41,7 +41,7 @@ TEST_F(SelectControlHandlerTest, CreditCardMonthAbbreviated) {
for (size_t i = 0; i < arraysize(kMonthsAbbreviated); ++i)
options[i] = ASCIIToUTF16(kMonthsAbbreviated[i]);
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("select-one");
field.option_values = options;
field.option_contents = options;
@@ -61,7 +61,7 @@ TEST_F(SelectControlHandlerTest, CreditCardMonthFull) {
for (size_t i = 0; i < arraysize(kMonthsFull); ++i)
options[i] = ASCIIToUTF16(kMonthsFull[i]);
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("select-one");
field.option_values = options;
field.option_contents = options;
@@ -80,7 +80,7 @@ TEST_F(SelectControlHandlerTest, CreditCardMonthNumeric) {
for (size_t i = 0; i < arraysize(kMonthsNumeric); ++i)
options[i] = ASCIIToUTF16(kMonthsNumeric[i]);
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("select-one");
field.option_values = options;
field.option_contents = options;
@@ -99,7 +99,7 @@ TEST_F(SelectControlHandlerTest, AddressCountryFull) {
for (size_t i = 0; i < arraysize(kCountries); ++i)
options[i] = ASCIIToUTF16(kCountries[i]);
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("select-one");
field.option_values = options;
field.option_contents = options;
@@ -118,7 +118,7 @@ TEST_F(SelectControlHandlerTest, AddressCountryAbbrev) {
for (size_t i = 0; i < arraysize(kCountries); ++i)
options[i] = ASCIIToUTF16(kCountries[i]);
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("select-one");
field.option_values = options;
field.option_contents = options;
@@ -137,7 +137,7 @@ TEST_F(SelectControlHandlerTest, AddressStateFull) {
for (size_t i = 0; i < arraysize(kStates); ++i)
options[i] = ASCIIToUTF16(kStates[i]);
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("select-one");
field.option_values = options;
field.option_contents = options;
@@ -156,7 +156,7 @@ TEST_F(SelectControlHandlerTest, AddressStateAbbrev) {
for (size_t i = 0; i < arraysize(kStates); ++i)
options[i] = ASCIIToUTF16(kStates[i]);
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("select-one");
field.option_values = options;
field.option_contents = options;
@@ -178,7 +178,7 @@ TEST_F(SelectControlHandlerTest, FillByValue) {
contents[i] = ASCIIToUTF16(base::StringPrintf("%d", static_cast<int>(i)));
}
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("select-one");
field.option_values = values;
field.option_contents = contents;
@@ -200,7 +200,7 @@ TEST_F(SelectControlHandlerTest, FillByContents) {
contents[i] = ASCIIToUTF16(kStates[i]);
}
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.form_control_type = ASCIIToUTF16("select-one");
field.option_values = values;
field.option_contents = contents;
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc
index db3b6f9..8bd9c55 100644
--- a/chrome/browser/automation/automation_provider.cc
+++ b/chrome/browser/automation/automation_provider.cc
@@ -92,7 +92,6 @@
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_getter.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFindOptions.h"
-#include "webkit/glue/password_form.h"
#if defined(OS_WIN) && !defined(USE_AURA)
#include "chrome/browser/external_tab_container_win.h"
diff --git a/chrome/browser/automation/automation_provider_observers.cc b/chrome/browser/automation/automation_provider_observers.cc
index 89ae686..c1d5be9 100644
--- a/chrome/browser/automation/automation_provider_observers.cc
+++ b/chrome/browser/automation/automation_provider_observers.cc
@@ -1758,7 +1758,7 @@ AutomationProviderGetPasswordsObserver::
void AutomationProviderGetPasswordsObserver::OnPasswordStoreRequestDone(
CancelableRequestProvider::Handle handle,
- const std::vector<webkit_glue::PasswordForm*>& result) {
+ const std::vector<webkit::forms::PasswordForm*>& result) {
if (!provider_) {
delete this;
return;
@@ -1767,10 +1767,10 @@ void AutomationProviderGetPasswordsObserver::OnPasswordStoreRequestDone(
scoped_ptr<DictionaryValue> return_value(new DictionaryValue);
ListValue* passwords = new ListValue;
- for (std::vector<webkit_glue::PasswordForm*>::const_iterator it =
+ for (std::vector<webkit::forms::PasswordForm*>::const_iterator it =
result.begin(); it != result.end(); ++it) {
DictionaryValue* password_val = new DictionaryValue;
- webkit_glue::PasswordForm* password_form = *it;
+ webkit::forms::PasswordForm* password_form = *it;
password_val->SetString("username_value", password_form->username_value);
password_val->SetString("password_value", password_form->password_value);
password_val->SetString("signon_realm", password_form->signon_realm);
diff --git a/chrome/browser/automation/automation_provider_observers.h b/chrome/browser/automation/automation_provider_observers.h
index a76a1eb..607cb60 100644
--- a/chrome/browser/automation/automation_provider_observers.h
+++ b/chrome/browser/automation/automation_provider_observers.h
@@ -1217,7 +1217,7 @@ class AutomationProviderGetPasswordsObserver : public PasswordStoreConsumer {
virtual void OnPasswordStoreRequestDone(
CancelableRequestProvider::Handle handle,
- const std::vector<webkit_glue::PasswordForm*>& result);
+ const std::vector<webkit::forms::PasswordForm*>& result) OVERRIDE;
private:
base::WeakPtr<AutomationProvider> provider_;
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index 95480cf..d5b262d 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -3757,7 +3757,7 @@ void TestingAutomationProvider::ImportSettings(Browser* browser,
namespace {
// Translates a dictionary password to a PasswordForm struct.
-webkit_glue::PasswordForm GetPasswordFormFromDict(
+webkit::forms::PasswordForm GetPasswordFormFromDict(
const DictionaryValue& password_dict) {
// If the time is specified, change time to the specified time.
@@ -3797,7 +3797,7 @@ webkit_glue::PasswordForm GetPasswordFormFromDict(
GURL origin_gurl(origin_url_text);
GURL action_target(action_target_text);
- webkit_glue::PasswordForm password_form;
+ webkit::forms::PasswordForm password_form;
password_form.signon_realm = signon_realm;
password_form.username_value = username_value;
password_form.password_value = password_value;
@@ -3836,7 +3836,7 @@ void TestingAutomationProvider::AddSavedPassword(
return;
}
- webkit_glue::PasswordForm new_password =
+ webkit::forms::PasswordForm new_password =
GetPasswordFormFromDict(*password_dict);
// Use IMPLICIT_ACCESS since new passwords aren't added in incognito mode.
@@ -3882,7 +3882,7 @@ void TestingAutomationProvider::RemoveSavedPassword(
"Password must include a value for 'signon_realm.'");
return;
}
- webkit_glue::PasswordForm to_remove =
+ webkit::forms::PasswordForm to_remove =
GetPasswordFormFromDict(*password_dict);
// Use EXPLICIT_ACCESS since passwords can be removed in incognito mode.
diff --git a/chrome/browser/importer/external_process_importer_bridge.cc b/chrome/browser/importer/external_process_importer_bridge.cc
index d47a7be..7debefd 100644
--- a/chrome/browser/importer/external_process_importer_bridge.cc
+++ b/chrome/browser/importer/external_process_importer_bridge.cc
@@ -10,7 +10,7 @@
#include "base/values.h"
#include "chrome/browser/history/history_types.h"
#include "chrome/browser/importer/profile_import_process_messages.h"
-#include "webkit/glue/password_form.h"
+#include "webkit/forms/password_form.h"
#if defined(OS_WIN)
#include "chrome/browser/password_manager/ie7_password.h"
@@ -115,7 +115,7 @@ void ExternalProcessImporterBridge::SetKeywords(
}
void ExternalProcessImporterBridge::SetPasswordForm(
- const webkit_glue::PasswordForm& form) {
+ const webkit::forms::PasswordForm& form) {
Send(new ProfileImportProcessHostMsg_NotifyPasswordFormReady(form));
}
diff --git a/chrome/browser/importer/external_process_importer_bridge.h b/chrome/browser/importer/external_process_importer_bridge.h
index 27e0f9e..ee435be1 100644
--- a/chrome/browser/importer/external_process_importer_bridge.h
+++ b/chrome/browser/importer/external_process_importer_bridge.h
@@ -54,7 +54,8 @@ class ExternalProcessImporterBridge : public ImporterBridge {
int default_keyword_index,
bool unique_on_host_and_path) OVERRIDE;
- virtual void SetPasswordForm(const webkit_glue::PasswordForm& form) OVERRIDE;
+ virtual void SetPasswordForm(
+ const webkit::forms::PasswordForm& form) OVERRIDE;
virtual void NotifyStarted() OVERRIDE;
virtual void NotifyItemStarted(importer::ImportItem item) OVERRIDE;
diff --git a/chrome/browser/importer/external_process_importer_client.cc b/chrome/browser/importer/external_process_importer_client.cc
index 21eacf5..40dc35f 100644
--- a/chrome/browser/importer/external_process_importer_client.cc
+++ b/chrome/browser/importer/external_process_importer_client.cc
@@ -285,7 +285,7 @@ void ExternalProcessImporterClient::OnFaviconsImportGroup(
}
void ExternalProcessImporterClient::OnPasswordFormImportReady(
- const webkit_glue::PasswordForm& form) {
+ const webkit::forms::PasswordForm& form) {
if (cancelled_)
return;
diff --git a/chrome/browser/importer/external_process_importer_client.h b/chrome/browser/importer/external_process_importer_client.h
index cef137e..6d31cbe 100644
--- a/chrome/browser/importer/external_process_importer_client.h
+++ b/chrome/browser/importer/external_process_importer_client.h
@@ -76,7 +76,7 @@ class ExternalProcessImporterClient : public UtilityProcessHost::Client {
void OnFaviconsImportStart(size_t total_favicons_count);
void OnFaviconsImportGroup(
const std::vector<history::ImportedFaviconUsage>& favicons_group);
- void OnPasswordFormImportReady(const webkit_glue::PasswordForm& form);
+ void OnPasswordFormImportReady(const webkit::forms::PasswordForm& form);
void OnKeywordsImportReady(
const std::vector<TemplateURL>& template_urls,
int default_keyword_index,
diff --git a/chrome/browser/importer/firefox2_importer.cc b/chrome/browser/importer/firefox2_importer.cc
index cb023e3..399895e 100644
--- a/chrome/browser/importer/firefox2_importer.cc
+++ b/chrome/browser/importer/firefox2_importer.cc
@@ -30,7 +30,7 @@
#include "googleurl/src/gurl.h"
#include "grit/generated_resources.h"
#include "net/base/data_url.h"
-#include "webkit/glue/password_form.h"
+#include "webkit/forms/password_form.h"
namespace {
const char kItemOpen[] = "<DT><A";
@@ -347,7 +347,7 @@ void Firefox2Importer::ImportPasswords() {
std::string content;
file_util::ReadFileToString(file, &content);
- std::vector<webkit_glue::PasswordForm> forms;
+ std::vector<webkit::forms::PasswordForm> forms;
decryptor.ParseSignons(content, &forms);
if (!cancelled()) {
diff --git a/chrome/browser/importer/firefox3_importer.cc b/chrome/browser/importer/firefox3_importer.cc
index d846a84..e306b22 100644
--- a/chrome/browser/importer/firefox3_importer.cc
+++ b/chrome/browser/importer/firefox3_importer.cc
@@ -26,7 +26,7 @@
#include "grit/generated_resources.h"
#include "sql/connection.h"
#include "sql/statement.h"
-#include "webkit/glue/password_form.h"
+#include "webkit/forms/password_form.h"
using content::BrowserThread;
@@ -311,7 +311,7 @@ void Firefox3Importer::ImportPasswords() {
return;
}
- std::vector<webkit_glue::PasswordForm> forms;
+ std::vector<webkit::forms::PasswordForm> forms;
FilePath source_path = source_path_;
FilePath file = source_path.AppendASCII("signons.sqlite");
if (file_util::PathExists(file)) {
diff --git a/chrome/browser/importer/ie_importer.cc b/chrome/browser/importer/ie_importer.cc
index c6bcf09..1d34c6a 100644
--- a/chrome/browser/importer/ie_importer.cc
+++ b/chrome/browser/importer/ie_importer.cc
@@ -17,9 +17,9 @@
#include "base/file_path.h"
#include "base/file_util.h"
+#include "base/string16.h"
#include "base/string_split.h"
#include "base/string_util.h"
-#include "base/string16.h"
#include "base/time.h"
#include "base/utf_string_conversions.h"
#include "base/win/registry.h"
@@ -39,7 +39,7 @@
#include "googleurl/src/gurl.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
-#include "webkit/glue/password_form.h"
+#include "webkit/forms/password_form.h"
namespace {
@@ -280,7 +280,7 @@ void IEImporter::ImportPasswordsIE6() {
continue;
}
- webkit_glue::PasswordForm form;
+ webkit::forms::PasswordForm form;
GURL::Replacements rp;
rp.ClearUsername();
rp.ClearPassword();
diff --git a/chrome/browser/importer/importer_bridge.h b/chrome/browser/importer/importer_bridge.h
index cc60703..23ea97b 100644
--- a/chrome/browser/importer/importer_bridge.h
+++ b/chrome/browser/importer/importer_bridge.h
@@ -42,7 +42,7 @@ class ImporterBridge : public base::RefCountedThreadSafe<ImporterBridge> {
int default_keyword_index,
bool unique_on_host_and_path) = 0;
- virtual void SetPasswordForm(const webkit_glue::PasswordForm& form) = 0;
+ virtual void SetPasswordForm(const webkit::forms::PasswordForm& form) = 0;
// Notifies the coordinator that the import operation has begun.
virtual void NotifyStarted() = 0;
diff --git a/chrome/browser/importer/importer_unittest.cc b/chrome/browser/importer/importer_unittest.cc
index 59ed077..eff6a6d 100644
--- a/chrome/browser/importer/importer_unittest.cc
+++ b/chrome/browser/importer/importer_unittest.cc
@@ -36,7 +36,7 @@
#include "chrome/test/base/testing_profile.h"
#include "content/test/test_browser_thread.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "webkit/glue/password_form.h"
+#include "webkit/forms/password_form.h"
#if defined(OS_WIN)
#include "base/win/scoped_comptr.h"
@@ -220,7 +220,7 @@ class TestObserver : public ProfileWriter,
return true;
}
- virtual void AddPasswordForm(const webkit_glue::PasswordForm& form) {
+ virtual void AddPasswordForm(const webkit::forms::PasswordForm& form) {
// Importer should obtain this password form only.
EXPECT_EQ(GURL("http://localhost:8080/security/index.htm"), form.origin);
EXPECT_EQ("http://localhost:8080/", form.signon_realm);
@@ -556,7 +556,7 @@ class FirefoxObserver : public ProfileWriter,
return true;
}
- virtual void AddPasswordForm(const webkit_glue::PasswordForm& form) {
+ virtual void AddPasswordForm(const webkit::forms::PasswordForm& form) {
PasswordList p = kFirefox2Passwords[password_count_];
EXPECT_EQ(p.origin, form.origin.spec());
EXPECT_EQ(p.realm, form.signon_realm);
@@ -760,7 +760,7 @@ class Firefox3Observer : public ProfileWriter,
return true;
}
- virtual void AddPasswordForm(const webkit_glue::PasswordForm& form) {
+ virtual void AddPasswordForm(const webkit::forms::PasswordForm& form) {
PasswordList p = kFirefox3Passwords[password_count_];
EXPECT_EQ(p.origin, form.origin.spec());
EXPECT_EQ(p.realm, form.signon_realm);
diff --git a/chrome/browser/importer/in_process_importer_bridge.cc b/chrome/browser/importer/in_process_importer_bridge.cc
index ebc8424..a555de0 100644
--- a/chrome/browser/importer/in_process_importer_bridge.cc
+++ b/chrome/browser/importer/in_process_importer_bridge.cc
@@ -9,7 +9,7 @@
#include "chrome/browser/importer/importer_host.h"
#include "content/public/browser/browser_thread.h"
#include "ui/base/l10n/l10n_util.h"
-#include "webkit/glue/password_form.h"
+#include "webkit/forms/password_form.h"
#if defined(OS_WIN)
#include "chrome/browser/password_manager/ie7_password.h"
@@ -74,7 +74,7 @@ void InProcessImporterBridge::SetKeywords(
}
void InProcessImporterBridge::SetPasswordForm(
- const webkit_glue::PasswordForm& form) {
+ const webkit::forms::PasswordForm& form) {
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
base::Bind(&ProfileWriter::AddPasswordForm, writer_, form));
diff --git a/chrome/browser/importer/in_process_importer_bridge.h b/chrome/browser/importer/in_process_importer_bridge.h
index f0924bf..1f7d46b 100644
--- a/chrome/browser/importer/in_process_importer_bridge.h
+++ b/chrome/browser/importer/in_process_importer_bridge.h
@@ -44,7 +44,8 @@ class InProcessImporterBridge : public ImporterBridge {
int default_keyword_index,
bool unique_on_host_and_path) OVERRIDE;
- virtual void SetPasswordForm(const webkit_glue::PasswordForm& form) OVERRIDE;
+ virtual void SetPasswordForm(
+ const webkit::forms::PasswordForm& form) OVERRIDE;
virtual void NotifyStarted() OVERRIDE;
virtual void NotifyItemStarted(importer::ImportItem item) OVERRIDE;
diff --git a/chrome/browser/importer/nss_decryptor.cc b/chrome/browser/importer/nss_decryptor.cc
index d837c20..1658e35 100644
--- a/chrome/browser/importer/nss_decryptor.cc
+++ b/chrome/browser/importer/nss_decryptor.cc
@@ -14,7 +14,7 @@
#include "base/utf_string_conversions.h"
#include "sql/connection.h"
#include "sql/statement.h"
-#include "webkit/glue/password_form.h"
+#include "webkit/forms/password_form.h"
#if defined(USE_NSS)
#include <pk11pub.h>
@@ -110,8 +110,9 @@ string16 NSSDecryptor::Decrypt(const std::string& crypt) const {
// http://kb.mozillazine.org/Signons.txt
// http://kb.mozillazine.org/Signons2.txt
// http://kb.mozillazine.org/Signons3.txt
-void NSSDecryptor::ParseSignons(const std::string& content,
- std::vector<webkit_glue::PasswordForm>* forms) {
+void NSSDecryptor::ParseSignons(
+ const std::string& content,
+ std::vector<webkit::forms::PasswordForm>* forms) {
forms->clear();
// Splits the file content into lines.
@@ -140,7 +141,7 @@ void NSSDecryptor::ParseSignons(const std::string& content,
// Reads never-saved list. Domains are stored one per line.
size_t i;
for (i = 1; i < lines.size() && lines[i].compare(".") != 0; ++i) {
- webkit_glue::PasswordForm form;
+ webkit::forms::PasswordForm form;
form.origin = GURL(lines[i]).ReplaceComponents(rep);
form.signon_realm = form.origin.GetOrigin().spec();
form.blacklisted_by_user = true;
@@ -162,7 +163,7 @@ void NSSDecryptor::ParseSignons(const std::string& content,
if (end - begin < 5)
continue;
- webkit_glue::PasswordForm form;
+ webkit::forms::PasswordForm form;
// The first line is the site URL.
// For HTTP authentication logins, the URL may contain http realm,
@@ -232,7 +233,7 @@ void NSSDecryptor::ParseSignons(const std::string& content,
}
bool NSSDecryptor::ReadAndParseSignons(const FilePath& sqlite_file,
- std::vector<webkit_glue::PasswordForm>* forms) {
+ std::vector<webkit::forms::PasswordForm>* forms) {
sql::Connection db;
if (!db.Open(sqlite_file))
return false;
@@ -249,7 +250,7 @@ bool NSSDecryptor::ReadAndParseSignons(const FilePath& sqlite_file,
rep.ClearPassword();
// Read domains for which passwords are never saved.
while (s.Step()) {
- webkit_glue::PasswordForm form;
+ webkit::forms::PasswordForm form;
form.origin = GURL(s.ColumnString(0)).ReplaceComponents(rep);
form.signon_realm = form.origin.GetOrigin().spec();
form.blacklisted_by_user = true;
@@ -280,7 +281,7 @@ bool NSSDecryptor::ReadAndParseSignons(const FilePath& sqlite_file,
if (!url.is_valid())
continue;
- webkit_glue::PasswordForm form;
+ webkit::forms::PasswordForm form;
form.origin = url.ReplaceComponents(rep);
form.signon_realm = form.origin.GetOrigin().spec();
if (!realm.empty())
diff --git a/chrome/browser/importer/nss_decryptor_mac.h b/chrome/browser/importer/nss_decryptor_mac.h
index e88fd11..fba5c8b 100644
--- a/chrome/browser/importer/nss_decryptor_mac.h
+++ b/chrome/browser/importer/nss_decryptor_mac.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -105,9 +105,12 @@ typedef SECStatus
typedef void (*SECITEMFreeItemFunc)(SECItem *item, PRBool free_it);
typedef void (*PLArenaFinishFunc)(void);
typedef PRStatus (*PRCleanupFunc)(void);
-namespace webkit_glue {
+
+namespace webkit {
+namespace forms {
struct PasswordForm;
}
+}
// A wrapper for Firefox NSS decrypt component.
class NSSDecryptor {
@@ -130,13 +133,13 @@ class NSSDecryptor {
// username/password and reads other related information.
// The result will be stored in |forms|.
void ParseSignons(const std::string& content,
- std::vector<webkit_glue::PasswordForm>* forms);
+ std::vector<webkit::forms::PasswordForm>* forms);
// Reads and parses the Firefox password sqlite db, decrypts the
// username/password and reads other related information.
// The result will be stored in |forms|.
bool ReadAndParseSignons(const FilePath& sqlite_file,
- std::vector<webkit_glue::PasswordForm>* forms);
+ std::vector<webkit::forms::PasswordForm>* forms);
private:
PK11SlotInfo* GetKeySlotForDB() const { return PK11_GetInternalKeySlot(); }
void FreeSlot(PK11SlotInfo* slot) const { PK11_FreeSlot(slot); }
diff --git a/chrome/browser/importer/nss_decryptor_null.h b/chrome/browser/importer/nss_decryptor_null.h
index af725c1..d662006 100644
--- a/chrome/browser/importer/nss_decryptor_null.h
+++ b/chrome/browser/importer/nss_decryptor_null.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -14,9 +14,11 @@
class FilePath;
-namespace webkit_glue {
+namespace webkit {
+namespace forms {
struct PasswordForm;
}
+}
// A NULL wrapper for Firefox NSS decrypt component, for use in builds where
// we do not have the NSS library.
@@ -26,9 +28,9 @@ class NSSDecryptor {
bool Init(const FilePath& dll_path, const FilePath& db_path) { return false; }
string16 Decrypt(const std::string& crypt) const { return string16(); }
void ParseSignons(const std::string& content,
- std::vector<webkit_glue::PasswordForm>* forms) {}
+ std::vector<webkit::forms::PasswordForm>* forms) {}
bool ReadAndParseSignons(const FilePath& sqlite_file,
- std::vector<webkit_glue::PasswordForm>* forms) {
+ std::vector<webkit::forms::PasswordForm>* forms) {
return false;
}
diff --git a/chrome/browser/importer/nss_decryptor_system_nss.h b/chrome/browser/importer/nss_decryptor_system_nss.h
index b4087d9..4a8e2b2 100644
--- a/chrome/browser/importer/nss_decryptor_system_nss.h
+++ b/chrome/browser/importer/nss_decryptor_system_nss.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -15,9 +15,11 @@
class FilePath;
-namespace webkit_glue {
+namespace webkit {
+namespace forms {
struct PasswordForm;
}
+}
// A wrapper for Firefox NSS decrypt component.
class NSSDecryptor {
@@ -36,13 +38,13 @@ class NSSDecryptor {
// username/password and reads other related information.
// The result will be stored in |forms|.
void ParseSignons(const std::string& content,
- std::vector<webkit_glue::PasswordForm>* forms);
+ std::vector<webkit::forms::PasswordForm>* forms);
// Reads and parses the Firefox password sqlite db, decrypts the
// username/password and reads other related information.
// The result will be stored in |forms|.
bool ReadAndParseSignons(const FilePath& sqlite_file,
- std::vector<webkit_glue::PasswordForm>* forms);
+ std::vector<webkit::forms::PasswordForm>* forms);
private:
// Does not actually free the slot, since we'll free it when NSSDecryptor is
// destroyed.
diff --git a/chrome/browser/importer/nss_decryptor_win.h b/chrome/browser/importer/nss_decryptor_win.h
index 891db89..a5e1182 100644
--- a/chrome/browser/importer/nss_decryptor_win.h
+++ b/chrome/browser/importer/nss_decryptor_win.h
@@ -105,9 +105,11 @@ typedef void (*SECITEMFreeItemFunc)(SECItem *item, PRBool free_it);
typedef void (*PLArenaFinishFunc)(void);
typedef PRStatus (*PRCleanupFunc)(void);
-namespace webkit_glue {
+namespace webkit {
+namespace forms {
struct PasswordForm;
}
+}
// A wrapper for Firefox NSS decrypt component.
class NSSDecryptor {
@@ -131,13 +133,13 @@ class NSSDecryptor {
// username/password and reads other related information.
// The result will be stored in |forms|.
void ParseSignons(const std::string& content,
- std::vector<webkit_glue::PasswordForm>* forms);
+ std::vector<webkit::forms::PasswordForm>* forms);
// Reads and parses the Firefox password sqlite db, decrypts the
// username/password and reads other related information.
// The result will be stored in |forms|.
bool ReadAndParseSignons(const FilePath& sqlite_file,
- std::vector<webkit_glue::PasswordForm>* forms);
+ std::vector<webkit::forms::PasswordForm>* forms);
private:
// Call NSS initialization funcs.
diff --git a/chrome/browser/importer/profile_import_process_messages.h b/chrome/browser/importer/profile_import_process_messages.h
index a2ae0491..6ee8684 100644
--- a/chrome/browser/importer/profile_import_process_messages.h
+++ b/chrome/browser/importer/profile_import_process_messages.h
@@ -17,7 +17,7 @@
#include "content/public/common/webkit_param_traits.h"
#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_message_utils.h"
-#include "webkit/glue/password_form.h"
+#include "webkit/forms/password_form.h"
#ifndef CHROME_BROWSER_IMPORTER_PROFILE_IMPORT_PROCESS_MESSAGES_H_
#define CHROME_BROWSER_IMPORTER_PROFILE_IMPORT_PROCESS_MESSAGES_H_
@@ -431,7 +431,7 @@ IPC_MESSAGE_CONTROL1(ProfileImportProcessHostMsg_NotifyFaviconsImportGroup,
std::vector<history::ImportedFaviconUsage>)
IPC_MESSAGE_CONTROL1(ProfileImportProcessHostMsg_NotifyPasswordFormReady,
- webkit_glue::PasswordForm)
+ webkit::forms::PasswordForm)
IPC_MESSAGE_CONTROL3(ProfileImportProcessHostMsg_NotifyKeywordsReady,
std::vector<TemplateURL>,
diff --git a/chrome/browser/importer/profile_writer.cc b/chrome/browser/importer/profile_writer.cc
index 4d1495b..dabea62 100644
--- a/chrome/browser/importer/profile_writer.cc
+++ b/chrome/browser/importer/profile_writer.cc
@@ -81,7 +81,7 @@ bool ProfileWriter::TemplateURLServiceIsLoaded() const {
return TemplateURLServiceFactory::GetForProfile(profile_)->loaded();
}
-void ProfileWriter::AddPasswordForm(const webkit_glue::PasswordForm& form) {
+void ProfileWriter::AddPasswordForm(const webkit::forms::PasswordForm& form) {
profile_->GetPasswordStore(Profile::EXPLICIT_ACCESS)->AddLogin(form);
}
diff --git a/chrome/browser/importer/profile_writer.h b/chrome/browser/importer/profile_writer.h
index 6b7d3d6..871858e 100644
--- a/chrome/browser/importer/profile_writer.h
+++ b/chrome/browser/importer/profile_writer.h
@@ -19,9 +19,11 @@
class Profile;
class TemplateURL;
-namespace webkit_glue {
+namespace webkit {
+namespace forms {
struct PasswordForm;
}
+}
#if defined(OS_WIN)
struct IE7PasswordInfo;
@@ -52,7 +54,7 @@ class ProfileWriter : public base::RefCountedThreadSafe<ProfileWriter> {
virtual bool TemplateURLServiceIsLoaded() const;
// Helper methods for adding data to local stores.
- virtual void AddPasswordForm(const webkit_glue::PasswordForm& form);
+ virtual void AddPasswordForm(const webkit::forms::PasswordForm& form);
#if defined(OS_WIN)
virtual void AddIE7PasswordInfo(const IE7PasswordInfo& info);
diff --git a/chrome/browser/password_manager/login_database.cc b/chrome/browser/password_manager/login_database.cc
index 47e0193..d209c01 100644
--- a/chrome/browser/password_manager/login_database.cc
+++ b/chrome/browser/password_manager/login_database.cc
@@ -16,7 +16,7 @@
#include "sql/statement.h"
#include "sql/transaction.h"
-using webkit_glue::PasswordForm;
+using webkit::forms::PasswordForm;
static const int kCurrentVersionNumber = 1;
static const int kCompatibleVersionNumber = 1;
@@ -332,7 +332,7 @@ bool LoginDatabase::GetLogins(const PasswordForm& form,
bool LoginDatabase::GetLoginsCreatedBetween(
const base::Time begin,
const base::Time end,
- std::vector<webkit_glue::PasswordForm*>* forms) const {
+ std::vector<webkit::forms::PasswordForm*>* forms) const {
DCHECK(forms);
sql::Statement s(db_.GetCachedStatement(SQL_FROM_HERE,
"SELECT origin_url, action_url, "
diff --git a/chrome/browser/password_manager/login_database.h b/chrome/browser/password_manager/login_database.h
index e91078d..40a392f 100644
--- a/chrome/browser/password_manager/login_database.h
+++ b/chrome/browser/password_manager/login_database.h
@@ -13,7 +13,7 @@
#include "base/string16.h"
#include "sql/connection.h"
#include "sql/meta_table.h"
-#include "webkit/glue/password_form.h"
+#include "webkit/forms/password_form.h"
// Interface to the database storage of login information, intended as a helper
// for PasswordStore on platforms that need internal storage of some or all of
@@ -31,14 +31,14 @@ class LoginDatabase {
void ReportMetrics();
// Adds |form| to the list of remembered password forms.
- bool AddLogin(const webkit_glue::PasswordForm& form);
+ bool AddLogin(const webkit::forms::PasswordForm& form);
// Updates remembered password form. Returns true on success and sets
// items_changed (if non-NULL) to the number of logins updated.
- bool UpdateLogin(const webkit_glue::PasswordForm& form, int* items_changed);
+ bool UpdateLogin(const webkit::forms::PasswordForm& form, int* items_changed);
// Removes |form| from the list of remembered password forms.
- bool RemoveLogin(const webkit_glue::PasswordForm& form);
+ bool RemoveLogin(const webkit::forms::PasswordForm& form);
// Removes all logins created from |delete_begin| onwards (inclusive) and
// before |delete_end|. You may use a null Time value to do an unbounded
@@ -49,8 +49,8 @@ class LoginDatabase {
// Loads a list of matching password forms into the specified vector |forms|.
// The list will contain all possibly relevant entries to the observed |form|,
// including blacklisted matches.
- bool GetLogins(const webkit_glue::PasswordForm& form,
- std::vector<webkit_glue::PasswordForm*>* forms) const;
+ bool GetLogins(const webkit::forms::PasswordForm& form,
+ std::vector<webkit::forms::PasswordForm*>* forms) const;
// Loads all logins created from |begin| onwards (inclusive) and before |end|.
// You may use a null Time value to do an unbounded search in either
@@ -58,15 +58,16 @@ class LoginDatabase {
bool GetLoginsCreatedBetween(
const base::Time begin,
const base::Time end,
- std::vector<webkit_glue::PasswordForm*>* forms) const;
+ std::vector<webkit::forms::PasswordForm*>* forms) const;
// Loads the complete list of autofillable password forms (i.e., not blacklist
// entries) into |forms|.
bool GetAutofillableLogins(
- std::vector<webkit_glue::PasswordForm*>* forms) const;
+ std::vector<webkit::forms::PasswordForm*>* forms) const;
// Loads the complete list of blacklist forms into |forms|.
- bool GetBlacklistLogins(std::vector<webkit_glue::PasswordForm*>* forms) const;
+ bool GetBlacklistLogins(
+ std::vector<webkit::forms::PasswordForm*>* forms) const;
// Deletes the login database file on disk, and creates a new, empty database.
// This can be used after migrating passwords to some other store, to ensure
@@ -87,13 +88,13 @@ class LoginDatabase {
// Fills |form| from the values in the given statement (which is assumed to
// be of the form used by the Get*Logins methods).
- void InitPasswordFormFromStatement(webkit_glue::PasswordForm* form,
+ void InitPasswordFormFromStatement(webkit::forms::PasswordForm* form,
sql::Statement& s) const;
// Loads all logins whose blacklist setting matches |blacklisted| into
// |forms|.
bool GetAllLoginsWithBlacklistSetting(
- bool blacklisted, std::vector<webkit_glue::PasswordForm*>* forms) const;
+ bool blacklisted, std::vector<webkit::forms::PasswordForm*>* forms) const;
FilePath db_path_;
mutable sql::Connection db_;
diff --git a/chrome/browser/password_manager/login_database_unittest.cc b/chrome/browser/password_manager/login_database_unittest.cc
index ad0c2db..2660c56 100644
--- a/chrome/browser/password_manager/login_database_unittest.cc
+++ b/chrome/browser/password_manager/login_database_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// 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.
@@ -12,9 +12,9 @@
#include "base/utf_string_conversions.h"
#include "chrome/browser/password_manager/login_database.h"
#include "chrome/common/chrome_paths.h"
-#include "webkit/glue/password_form.h"
+#include "webkit/forms/password_form.h"
-using webkit_glue::PasswordForm;
+using webkit::forms::PasswordForm;
class LoginDatabaseTest : public testing::Test {
protected:
diff --git a/chrome/browser/password_manager/native_backend_gnome_x.cc b/chrome/browser/password_manager/native_backend_gnome_x.cc
index 9b73f05..260f308 100644
--- a/chrome/browser/password_manager/native_backend_gnome_x.cc
+++ b/chrome/browser/password_manager/native_backend_gnome_x.cc
@@ -22,7 +22,7 @@
#include "content/public/browser/browser_thread.h"
using content::BrowserThread;
-using webkit_glue::PasswordForm;
+using webkit::forms::PasswordForm;
#define GNOME_KEYRING_DEFINE_POINTER(name) \
typeof(&::gnome_keyring_##name) GnomeKeyringLoader::gnome_keyring_##name;
diff --git a/chrome/browser/password_manager/native_backend_gnome_x.h b/chrome/browser/password_manager/native_backend_gnome_x.h
index 3f5319b..6e44dae 100644
--- a/chrome/browser/password_manager/native_backend_gnome_x.h
+++ b/chrome/browser/password_manager/native_backend_gnome_x.h
@@ -17,9 +17,11 @@
class PrefService;
-namespace webkit_glue {
+namespace webkit {
+namespace forms {
struct PasswordForm;
}
+}
// Many of the gnome_keyring_* functions use variable arguments, which makes
// them difficult if not impossible to truly wrap in C. Therefore, we use
@@ -73,12 +75,12 @@ class NativeBackendGnome : public PasswordStoreX::NativeBackend,
virtual bool Init() OVERRIDE;
// Implements NativeBackend interface.
- virtual bool AddLogin(const webkit_glue::PasswordForm& form) OVERRIDE;
- virtual bool UpdateLogin(const webkit_glue::PasswordForm& form) OVERRIDE;
- virtual bool RemoveLogin(const webkit_glue::PasswordForm& form) OVERRIDE;
+ virtual bool AddLogin(const webkit::forms::PasswordForm& form) OVERRIDE;
+ virtual bool UpdateLogin(const webkit::forms::PasswordForm& form) OVERRIDE;
+ virtual bool RemoveLogin(const webkit::forms::PasswordForm& form) OVERRIDE;
virtual bool RemoveLoginsCreatedBetween(
const base::Time& delete_begin, const base::Time& delete_end) OVERRIDE;
- virtual bool GetLogins(const webkit_glue::PasswordForm& form,
+ virtual bool GetLogins(const webkit::forms::PasswordForm& form,
PasswordFormList* forms) OVERRIDE;
virtual bool GetLoginsCreatedBetween(const base::Time& get_begin,
const base::Time& get_end,
@@ -88,7 +90,7 @@ class NativeBackendGnome : public PasswordStoreX::NativeBackend,
private:
// Adds a login form without checking for one to replace first.
- bool RawAddLogin(const webkit_glue::PasswordForm& form);
+ bool RawAddLogin(const webkit::forms::PasswordForm& form);
// Reads PasswordForms from the keyring with the given autofillability state.
bool GetLoginsList(PasswordFormList* forms, bool autofillable);
diff --git a/chrome/browser/password_manager/native_backend_gnome_x_unittest.cc b/chrome/browser/password_manager/native_backend_gnome_x_unittest.cc
index 6f2f8c1..4590d8b 100644
--- a/chrome/browser/password_manager/native_backend_gnome_x_unittest.cc
+++ b/chrome/browser/password_manager/native_backend_gnome_x_unittest.cc
@@ -18,7 +18,7 @@
#include "testing/gtest/include/gtest/gtest.h"
using content::BrowserThread;
-using webkit_glue::PasswordForm;
+using webkit::forms::PasswordForm;
namespace {
diff --git a/chrome/browser/password_manager/native_backend_kwallet_x.cc b/chrome/browser/password_manager/native_backend_kwallet_x.cc
index 507d952..016d0b5 100644
--- a/chrome/browser/password_manager/native_backend_kwallet_x.cc
+++ b/chrome/browser/password_manager/native_backend_kwallet_x.cc
@@ -20,7 +20,7 @@
#include "ui/base/l10n/l10n_util.h"
using content::BrowserThread;
-using webkit_glue::PasswordForm;
+using webkit::forms::PasswordForm;
// We could localize this string, but then changing your locale would cause
// you to lose access to all your stored passwords. Maybe best not to do that.
diff --git a/chrome/browser/password_manager/native_backend_kwallet_x.h b/chrome/browser/password_manager/native_backend_kwallet_x.h
index b40d3d8..23d259b 100644
--- a/chrome/browser/password_manager/native_backend_kwallet_x.h
+++ b/chrome/browser/password_manager/native_backend_kwallet_x.h
@@ -17,9 +17,11 @@
class Pickle;
class PrefService;
-namespace webkit_glue {
+namespace webkit {
+namespace forms {
struct PasswordForm;
}
+}
namespace base {
class WaitableEvent;
@@ -40,12 +42,12 @@ class NativeBackendKWallet : public PasswordStoreX::NativeBackend {
virtual bool Init() OVERRIDE;
// Implements NativeBackend interface.
- virtual bool AddLogin(const webkit_glue::PasswordForm& form) OVERRIDE;
- virtual bool UpdateLogin(const webkit_glue::PasswordForm& form) OVERRIDE;
- virtual bool RemoveLogin(const webkit_glue::PasswordForm& form) OVERRIDE;
+ virtual bool AddLogin(const webkit::forms::PasswordForm& form) OVERRIDE;
+ virtual bool UpdateLogin(const webkit::forms::PasswordForm& form) OVERRIDE;
+ virtual bool RemoveLogin(const webkit::forms::PasswordForm& form) OVERRIDE;
virtual bool RemoveLoginsCreatedBetween(
const base::Time& delete_begin, const base::Time& delete_end) OVERRIDE;
- virtual bool GetLogins(const webkit_glue::PasswordForm& form,
+ virtual bool GetLogins(const webkit::forms::PasswordForm& form,
PasswordFormList* forms) OVERRIDE;
virtual bool GetLoginsCreatedBetween(const base::Time& get_begin,
const base::Time& get_end,
@@ -113,8 +115,8 @@ class NativeBackendKWallet : public PasswordStoreX::NativeBackend {
// If |update_check| is false, we only check the fields that are checked by
// LoginDatabase::UpdateLogin() when updating logins; otherwise, we check the
// fields that are checked by LoginDatabase::RemoveLogin() for removing them.
- static bool CompareForms(const webkit_glue::PasswordForm& a,
- const webkit_glue::PasswordForm& b,
+ static bool CompareForms(const webkit::forms::PasswordForm& a,
+ const webkit::forms::PasswordForm& b,
bool update_check);
// Serializes a list of PasswordForms to be stored in the wallet.
diff --git a/chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc b/chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc
index 75bda2f..5779be8 100644
--- a/chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc
+++ b/chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc
@@ -28,7 +28,7 @@ using content::BrowserThread;
using testing::_;
using testing::Invoke;
using testing::Return;
-using webkit_glue::PasswordForm;
+using webkit::forms::PasswordForm;
namespace {
diff --git a/chrome/browser/password_manager/password_form_data.cc b/chrome/browser/password_manager/password_form_data.cc
index b428d9a..b919770 100644
--- a/chrome/browser/password_manager/password_form_data.cc
+++ b/chrome/browser/password_manager/password_form_data.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -6,7 +6,7 @@
#include "base/utf_string_conversions.h"
#include "chrome/browser/password_manager/password_form_data.h"
-using webkit_glue::PasswordForm;
+using webkit::forms::PasswordForm;
PasswordForm* CreatePasswordFormFromData(
const PasswordFormData& form_data) {
@@ -69,7 +69,7 @@ std::ostream& operator<<(std::ostream& os, const PasswordForm& form) {
<< "date_created: " << form.date_created.ToDoubleT();
}
-typedef std::set<const webkit_glue::PasswordForm*> SetOfForms;
+typedef std::set<const webkit::forms::PasswordForm*> SetOfForms;
bool ContainsSamePasswordFormsPtr(
const std::vector<PasswordForm*>& first,
@@ -98,8 +98,8 @@ bool ContainsSamePasswordFormsPtr(
}
bool ContainsSamePasswordForms(
- std::vector<webkit_glue::PasswordForm>& first,
- std::vector<webkit_glue::PasswordForm>& second) {
+ std::vector<webkit::forms::PasswordForm>& first,
+ std::vector<webkit::forms::PasswordForm>& second) {
std::vector<PasswordForm*> first_ptr;
for (unsigned int i = 0; i < first.size(); ++i) {
first_ptr.push_back(&first[i]);
diff --git a/chrome/browser/password_manager/password_form_data.h b/chrome/browser/password_manager/password_form_data.h
index f48d0c8..455a39c21 100644
--- a/chrome/browser/password_manager/password_form_data.h
+++ b/chrome/browser/password_manager/password_form_data.h
@@ -9,12 +9,12 @@
#include <ostream>
#include "testing/gmock/include/gmock/gmock.h"
-#include "webkit/glue/password_form.h"
+#include "webkit/forms/password_form.h"
// Struct used for creation of PasswordForms from static arrays of data.
// Note: This is only meant to be used in unit test.
struct PasswordFormData {
- const webkit_glue::PasswordForm::Scheme scheme;
+ const webkit::forms::PasswordForm::Scheme scheme;
const char* signon_realm;
const char* origin;
const char* action;
@@ -30,23 +30,23 @@ struct PasswordFormData {
// Creates and returns a new PasswordForm built from form_data. Caller is
// responsible for deleting the object when finished with it.
-webkit_glue::PasswordForm* CreatePasswordFormFromData(
+webkit::forms::PasswordForm* CreatePasswordFormFromData(
const PasswordFormData& form_data);
// Checks whether two vectors of PasswordForms contain equivalent elements,
// regardless of order.
bool ContainsSamePasswordFormsPtr(
- const std::vector<webkit_glue::PasswordForm*>& first,
- const std::vector<webkit_glue::PasswordForm*>& second);
+ const std::vector<webkit::forms::PasswordForm*>& first,
+ const std::vector<webkit::forms::PasswordForm*>& second);
bool ContainsSamePasswordForms(
- std::vector<webkit_glue::PasswordForm>& first,
- std::vector<webkit_glue::PasswordForm>& second);
+ std::vector<webkit::forms::PasswordForm>& first,
+ std::vector<webkit::forms::PasswordForm>& second);
// Pretty-prints the contents of a PasswordForm.
// TODO(sync): This file must eventually be refactored away -- crbug.com/87185.
std::ostream& operator<<(std::ostream& os,
- const webkit_glue::PasswordForm& form);
+ const webkit::forms::PasswordForm& form);
// This gmock matcher is used to check that the |arg| contains exactly the same
// PasswordForms as |forms|, regardless of order.
diff --git a/chrome/browser/password_manager/password_form_manager.cc b/chrome/browser/password_manager/password_form_manager.cc
index 1cbbdec..958a2c8 100644
--- a/chrome/browser/password_manager/password_form_manager.cc
+++ b/chrome/browser/password_manager/password_form_manager.cc
@@ -12,11 +12,11 @@
#include "chrome/browser/password_manager/password_manager.h"
#include "chrome/browser/password_manager/password_store.h"
#include "chrome/browser/profiles/profile.h"
-#include "webkit/glue/password_form_dom_manager.h"
+#include "webkit/forms/password_form_dom_manager.h"
using base::Time;
-using webkit_glue::PasswordForm;
-using webkit_glue::PasswordFormMap;
+using webkit::forms::PasswordForm;
+using webkit::forms::PasswordFormMap;
PasswordFormManager::PasswordFormManager(Profile* profile,
PasswordManager* password_manager,
diff --git a/chrome/browser/password_manager/password_form_manager.h b/chrome/browser/password_manager/password_form_manager.h
index f298af3..f9d8b59 100644
--- a/chrome/browser/password_manager/password_form_manager.h
+++ b/chrome/browser/password_manager/password_form_manager.h
@@ -13,7 +13,7 @@
#include "base/stl_util.h"
#include "chrome/browser/password_manager/password_store_consumer.h"
-#include "webkit/glue/password_form.h"
+#include "webkit/forms/password_form.h"
class PasswordManager;
class PasswordStore;
@@ -31,12 +31,12 @@ class PasswordFormManager : public PasswordStoreConsumer {
// used to filter login results from database.
PasswordFormManager(Profile* profile,
PasswordManager* password_manager,
- const webkit_glue::PasswordForm& observed_form,
+ const webkit::forms::PasswordForm& observed_form,
bool ssl_valid);
virtual ~PasswordFormManager();
// Compare basic data of observed_form_ with argument.
- bool DoesManage(const webkit_glue::PasswordForm& form) const;
+ bool DoesManage(const webkit::forms::PasswordForm& form) const;
// Retrieves potential matching logins from the database.
void FetchMatchingLoginsFromPasswordStore();
@@ -69,12 +69,12 @@ class PasswordFormManager : public PasswordStoreConsumer {
// Determines if we need to autofill given the results of the query.
void OnRequestDone(
- int handle, const std::vector<webkit_glue::PasswordForm*>& result);
+ int handle, const std::vector<webkit::forms::PasswordForm*>& result);
// PasswordStoreConsumer implementation.
virtual void OnPasswordStoreRequestDone(
CancelableRequestProvider::Handle handle,
- const std::vector<webkit_glue::PasswordForm*>& result) OVERRIDE;
+ const std::vector<webkit::forms::PasswordForm*>& result) OVERRIDE;
// A user opted to 'never remember' passwords for this form.
// Blacklist it so that from now on when it is seen we ignore it.
@@ -83,7 +83,7 @@ class PasswordFormManager : public PasswordStoreConsumer {
// If the user has submitted observed_form_, provisionally hold on to
// the submitted credentials until we are told by PasswordManager whether
// or not the login was successful.
- void ProvisionallySave(const webkit_glue::PasswordForm& credentials);
+ void ProvisionallySave(const webkit::forms::PasswordForm& credentials);
// Handles save-as-new or update of the form managed by this manager.
// Note the basic data of updated_credentials must match that of
@@ -140,7 +140,7 @@ class PasswordFormManager : public PasswordStoreConsumer {
// Helper for OnPasswordStoreRequestDone to determine whether or not
// the given result form is worth scoring.
- bool IgnoreResult(const webkit_glue::PasswordForm& form) const;
+ bool IgnoreResult(const webkit::forms::PasswordForm& form) const;
// Helper for Save in the case that best_matches.size() == 0, meaning
// we have no prior record of this form/username/password and the user
@@ -150,7 +150,7 @@ class PasswordFormManager : public PasswordStoreConsumer {
// Helper for OnPasswordStoreRequestDone to score an individual result
// against the observed_form_.
- int ScoreResult(const webkit_glue::PasswordForm& form) const;
+ int ScoreResult(const webkit::forms::PasswordForm& form) const;
// Helper for Save in the case that best_matches.size() > 0, meaning
// we have at least one match for this form/username/password. This
@@ -171,13 +171,13 @@ class PasswordFormManager : public PasswordStoreConsumer {
// Set of PasswordForms from the DB that best match the form
// being managed by this. Use a map instead of vector, because we most
// frequently require lookups by username value in IsNewLogin.
- webkit_glue::PasswordFormMap best_matches_;
+ webkit::forms::PasswordFormMap best_matches_;
// Cleans up when best_matches_ goes out of scope.
- STLValueDeleter<webkit_glue::PasswordFormMap> best_matches_deleter_;
+ STLValueDeleter<webkit::forms::PasswordFormMap> best_matches_deleter_;
// The PasswordForm from the page or dialog managed by this.
- webkit_glue::PasswordForm observed_form_;
+ webkit::forms::PasswordForm observed_form_;
// The origin url path of observed_form_ tokenized, for convenience when
// scoring.
@@ -185,7 +185,7 @@ class PasswordFormManager : public PasswordStoreConsumer {
// Stores updated credentials when the form was submitted but success is
// still unknown.
- webkit_glue::PasswordForm pending_credentials_;
+ webkit::forms::PasswordForm pending_credentials_;
// Whether pending_credentials_ stores a new login or is an update
// to an existing one.
@@ -201,7 +201,7 @@ class PasswordFormManager : public PasswordStoreConsumer {
// as preferred. This is only allowed to be null if there are no best matches
// at all, since there will always be one preferred login when there are
// multiple matches (when first saved, a login is marked preferred).
- const webkit_glue::PasswordForm* preferred_match_;
+ const webkit::forms::PasswordForm* preferred_match_;
typedef enum {
PRE_MATCHING_PHASE, // Have not yet invoked a GetLogins query to find
diff --git a/chrome/browser/password_manager/password_form_manager_unittest.cc b/chrome/browser/password_manager/password_form_manager_unittest.cc
index d8affba..90b3772 100644
--- a/chrome/browser/password_manager/password_form_manager_unittest.cc
+++ b/chrome/browser/password_manager/password_form_manager_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -10,9 +10,9 @@
#include "chrome/browser/password_manager/password_manager.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/test/base/testing_profile.h"
-#include "webkit/glue/password_form.h"
+#include "webkit/forms/password_form.h"
-using webkit_glue::PasswordForm;
+using webkit::forms::PasswordForm;
class PasswordFormManagerTest : public testing::Test {
public:
diff --git a/chrome/browser/password_manager/password_manager.cc b/chrome/browser/password_manager/password_manager.cc
index 274cc56..daf6706 100644
--- a/chrome/browser/password_manager/password_manager.cc
+++ b/chrome/browser/password_manager/password_manager.cc
@@ -20,8 +20,8 @@
#include "grit/generated_resources.h"
using content::UserMetricsAction;
-using webkit_glue::PasswordForm;
-using webkit_glue::PasswordFormMap;
+using webkit::forms::PasswordForm;
+using webkit::forms::PasswordFormMap;
// static
void PasswordManager::RegisterUserPrefs(PrefService* prefs) {
@@ -226,8 +226,8 @@ void PasswordManager::Autofill(
case PasswordForm::SCHEME_HTML: {
// Note the check above is required because the observer_ for a non-HTML
// schemed password form may have been freed, so we need to distinguish.
- webkit_glue::PasswordFormFillData fill_data;
- webkit_glue::PasswordFormDomManager::InitFillData(form_for_autofill,
+ webkit::forms::PasswordFormFillData fill_data;
+ webkit::forms::PasswordFormDomManager::InitFillData(form_for_autofill,
best_matches,
preferred_match,
wait_for_username,
diff --git a/chrome/browser/password_manager/password_manager.h b/chrome/browser/password_manager/password_manager.h
index 2b44000..882066b 100644
--- a/chrome/browser/password_manager/password_manager.h
+++ b/chrome/browser/password_manager/password_manager.h
@@ -12,8 +12,8 @@
#include "chrome/browser/prefs/pref_member.h"
#include "chrome/browser/ui/login/login_model.h"
#include "content/browser/tab_contents/tab_contents_observer.h"
-#include "webkit/glue/password_form.h"
-#include "webkit/glue/password_form_dom_manager.h"
+#include "webkit/forms/password_form.h"
+#include "webkit/forms/password_form_dom_manager.h"
class PasswordManagerDelegate;
class PasswordManagerTest;
@@ -36,9 +36,9 @@ class PasswordManager : public LoginModel,
// Called by a PasswordFormManager when it decides a form can be autofilled
// on the page.
- void Autofill(const webkit_glue::PasswordForm& form_for_autofill,
- const webkit_glue::PasswordFormMap& best_matches,
- const webkit_glue::PasswordForm* const preferred_match,
+ void Autofill(const webkit::forms::PasswordForm& form_for_autofill,
+ const webkit::forms::PasswordFormMap& best_matches,
+ const webkit::forms::PasswordForm* const preferred_match,
bool wait_for_username) const;
// LoginModel implementation.
@@ -47,7 +47,7 @@ class PasswordManager : public LoginModel,
// When a form is submitted, we prepare to save the password but wait
// until we decide the user has successfully logged in. This is step 1
// of 2 (see SavePassword).
- void ProvisionallySavePassword(webkit_glue::PasswordForm form);
+ void ProvisionallySavePassword(webkit::forms::PasswordForm form);
// TabContentsObserver overrides.
virtual void DidStopLoading() OVERRIDE;
@@ -57,9 +57,9 @@ class PasswordManager : public LoginModel,
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
void OnPasswordFormsFound(
- const std::vector<webkit_glue::PasswordForm>& forms);
+ const std::vector<webkit::forms::PasswordForm>& forms);
void OnPasswordFormsVisible(
- const std::vector<webkit_glue::PasswordForm>& visible_forms);
+ const std::vector<webkit::forms::PasswordForm>& visible_forms);
private:
FRIEND_TEST_ALL_PREFIXES(PasswordManagerTest, FormSeenThenLeftPage);
diff --git a/chrome/browser/password_manager/password_manager_delegate.h b/chrome/browser/password_manager/password_manager_delegate.h
index 087fe76..63ec908 100644
--- a/chrome/browser/password_manager/password_manager_delegate.h
+++ b/chrome/browser/password_manager/password_manager_delegate.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -6,9 +6,11 @@
#define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_DELEGATE_H_
#pragma once
-namespace webkit_glue {
+namespace webkit {
+namespace forms {
struct PasswordFormFillData;
-} // namespace webkit_glue
+}
+}
class PasswordFormManager;
class Profile;
@@ -25,7 +27,7 @@ class PasswordManagerDelegate {
// through the RenderViewHost to FillPasswordForm. Tests can override this
// to sever the dependency on the entire rendering stack.
virtual void FillPasswordForm(
- const webkit_glue::PasswordFormFillData& form_data) = 0;
+ const webkit::forms::PasswordFormFillData& form_data) = 0;
// A mechanism to show an infobar in the current tab at our request.
virtual void AddSavePasswordInfoBar(PasswordFormManager* form_to_save) = 0;
diff --git a/chrome/browser/password_manager/password_manager_unittest.cc b/chrome/browser/password_manager/password_manager_unittest.cc
index 5b7cc70..ced8c50 100644
--- a/chrome/browser/password_manager/password_manager_unittest.cc
+++ b/chrome/browser/password_manager/password_manager_unittest.cc
@@ -19,7 +19,7 @@
#include "testing/gtest/include/gtest/gtest.h"
using content::BrowserThread;
-using webkit_glue::PasswordForm;
+using webkit::forms::PasswordForm;
using testing::_;
using testing::DoAll;
using ::testing::Exactly;
@@ -29,7 +29,7 @@ using ::testing::Return;
class MockPasswordManagerDelegate : public PasswordManagerDelegate {
public:
MOCK_METHOD1(FillPasswordForm, void(
- const webkit_glue::PasswordFormFillData&));
+ const webkit::forms::PasswordFormFillData&));
MOCK_METHOD1(AddSavePasswordInfoBar, void(PasswordFormManager*));
MOCK_METHOD0(GetProfileForPasswordManager, Profile*());
MOCK_METHOD0(DidLastPageLoadEncounterSSLErrors, bool());
@@ -66,9 +66,9 @@ class MockPasswordStore : public PasswordStore {
MOCK_METHOD1(GetAutofillableLoginsImpl, void(GetLoginsRequest*));
MOCK_METHOD1(GetBlacklistLoginsImpl, void(GetLoginsRequest*));
MOCK_METHOD1(FillAutofillableLogins,
- bool(std::vector<webkit_glue::PasswordForm*>*));
+ bool(std::vector<webkit::forms::PasswordForm*>*));
MOCK_METHOD1(FillBlacklistLogins,
- bool(std::vector<webkit_glue::PasswordForm*>*));
+ bool(std::vector<webkit::forms::PasswordForm*>*));
};
ACTION_P2(InvokeConsumer, handle, forms) {
diff --git a/chrome/browser/password_manager/password_store.cc b/chrome/browser/password_manager/password_store.cc
index 3127170..6f35655 100644
--- a/chrome/browser/password_manager/password_store.cc
+++ b/chrome/browser/password_manager/password_store.cc
@@ -10,15 +10,15 @@
#include "base/task.h"
#include "chrome/browser/password_manager/password_store_consumer.h"
#include "content/public/browser/browser_thread.h"
-#include "webkit/glue/password_form.h"
+#include "webkit/forms/password_form.h"
using content::BrowserThread;
using std::vector;
-using webkit_glue::PasswordForm;
+using webkit::forms::PasswordForm;
PasswordStore::GetLoginsRequest::GetLoginsRequest(GetLoginsCallback* callback)
: CancelableRequest1<GetLoginsCallback,
- std::vector<webkit_glue::PasswordForm*> >(callback) {
+ std::vector<webkit::forms::PasswordForm*> >(callback) {
}
PasswordStore::GetLoginsRequest::~GetLoginsRequest() {
diff --git a/chrome/browser/password_manager/password_store.h b/chrome/browser/password_manager/password_store.h
index eb656bf..222d198 100644
--- a/chrome/browser/password_manager/password_store.h
+++ b/chrome/browser/password_manager/password_store.h
@@ -24,17 +24,19 @@ namespace browser_sync {
class PasswordDataTypeController;
class PasswordModelAssociator;
class PasswordModelWorker;
-};
+}
-namespace webkit_glue {
+namespace webkit {
+namespace forms {
struct PasswordForm;
-};
+}
+}
namespace passwords_helper {
-void AddLogin(PasswordStore* store, const webkit_glue::PasswordForm& form);
-void RemoveLogin(PasswordStore* store, const webkit_glue::PasswordForm& form);
-void UpdateLogin(PasswordStore* store, const webkit_glue::PasswordForm& form);
-};
+void AddLogin(PasswordStore* store, const webkit::forms::PasswordForm& form);
+void RemoveLogin(PasswordStore* store, const webkit::forms::PasswordForm& form);
+void UpdateLogin(PasswordStore* store, const webkit::forms::PasswordForm& form);
+}
// Interface for storing form passwords in a platform-specific secure way.
// The login request/manipulation API is not threadsafe and must be used
@@ -44,7 +46,7 @@ class PasswordStore
public CancelableRequestProvider {
public:
typedef Callback2<Handle,
- const std::vector<webkit_glue::PasswordForm*>&>::Type
+ const std::vector<webkit::forms::PasswordForm*>&>::Type
GetLoginsCallback;
// PasswordForm vector elements are meant to be owned by the
@@ -56,7 +58,7 @@ class PasswordStore
// provide a destructor, which cleans up after canceled requests by deleting
// vector elements.
class GetLoginsRequest : public CancelableRequest1<
- GetLoginsCallback, std::vector<webkit_glue::PasswordForm*> > {
+ GetLoginsCallback, std::vector<webkit::forms::PasswordForm*> > {
public:
explicit GetLoginsRequest(GetLoginsCallback* callback);
virtual ~GetLoginsRequest();
@@ -86,13 +88,13 @@ class PasswordStore
virtual void Shutdown();
// Adds the given PasswordForm to the secure password store asynchronously.
- virtual void AddLogin(const webkit_glue::PasswordForm& form);
+ virtual void AddLogin(const webkit::forms::PasswordForm& form);
// Updates the matching PasswordForm in the secure password store (async).
- void UpdateLogin(const webkit_glue::PasswordForm& form);
+ void UpdateLogin(const webkit::forms::PasswordForm& form);
// Removes the matching PasswordForm from the secure password store (async).
- void RemoveLogin(const webkit_glue::PasswordForm& form);
+ void RemoveLogin(const webkit::forms::PasswordForm& form);
// Removes all logins created in the given date range.
void RemoveLoginsCreatedBetween(const base::Time& delete_begin,
@@ -101,7 +103,7 @@ class PasswordStore
// Searches for a matching PasswordForm and returns a handle so the async
// request can be tracked. Implement the PasswordStoreConsumer interface to be
// notified on completion.
- virtual Handle GetLogins(const webkit_glue::PasswordForm& form,
+ virtual Handle GetLogins(const webkit::forms::PasswordForm& form,
PasswordStoreConsumer* consumer);
// Gets the complete list of PasswordForms that are not blacklist entries--and
@@ -130,11 +132,11 @@ class PasswordStore
friend class browser_sync::PasswordModelAssociator;
friend class browser_sync::PasswordModelWorker;
friend void passwords_helper::AddLogin(PasswordStore*,
- const webkit_glue::PasswordForm&);
+ const webkit::forms::PasswordForm&);
friend void passwords_helper::RemoveLogin(PasswordStore*,
- const webkit_glue::PasswordForm&);
+ const webkit::forms::PasswordForm&);
friend void passwords_helper::UpdateLogin(PasswordStore*,
- const webkit_glue::PasswordForm&);
+ const webkit::forms::PasswordForm&);
virtual ~PasswordStore();
@@ -151,11 +153,11 @@ class PasswordStore
// Synchronous implementation that reports usage metrics.
virtual void ReportMetricsImpl() = 0;
// Synchronous implementation to add the given login.
- virtual void AddLoginImpl(const webkit_glue::PasswordForm& form) = 0;
+ virtual void AddLoginImpl(const webkit::forms::PasswordForm& form) = 0;
// Synchronous implementation to update the given login.
- virtual void UpdateLoginImpl(const webkit_glue::PasswordForm& form) = 0;
+ virtual void UpdateLoginImpl(const webkit::forms::PasswordForm& form) = 0;
// Synchronous implementation to remove the given login.
- virtual void RemoveLoginImpl(const webkit_glue::PasswordForm& form) = 0;
+ virtual void RemoveLoginImpl(const webkit::forms::PasswordForm& form) = 0;
// Synchronous implementation to remove the given logins.
virtual void RemoveLoginsCreatedBetweenImpl(const base::Time& delete_begin,
const base::Time& delete_end) = 0;
@@ -163,7 +165,7 @@ class PasswordStore
// will then be scored by the PasswordFormManager. Once they are found
// (or not), the consumer should be notified.
virtual void GetLoginsImpl(GetLoginsRequest* request,
- const webkit_glue::PasswordForm& form) = 0;
+ const webkit::forms::PasswordForm& form) = 0;
// Finds all non-blacklist PasswordForms, and notifies the consumer.
virtual void GetAutofillableLoginsImpl(GetLoginsRequest* request) = 0;
// Finds all blacklist PasswordForms, and notifies the consumer.
@@ -171,10 +173,10 @@ class PasswordStore
// Finds all non-blacklist PasswordForms, and fills the vector.
virtual bool FillAutofillableLogins(
- std::vector<webkit_glue::PasswordForm*>* forms) = 0;
+ std::vector<webkit::forms::PasswordForm*>* forms) = 0;
// Finds all blacklist PasswordForms, and fills the vector.
virtual bool FillBlacklistLogins(
- std::vector<webkit_glue::PasswordForm*>* forms) = 0;
+ std::vector<webkit::forms::PasswordForm*>* forms) = 0;
// Dispatches the result to the PasswordStoreConsumer on the original caller's
// thread so the callback can be executed there. This should be the UI
diff --git a/chrome/browser/password_manager/password_store_change.h b/chrome/browser/password_manager/password_store_change.h
index 885b6b7..1e68f52 100644
--- a/chrome/browser/password_manager/password_store_change.h
+++ b/chrome/browser/password_manager/password_store_change.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// 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.
@@ -8,7 +8,7 @@
#include <vector>
-#include "webkit/glue/password_form.h"
+#include "webkit/forms/password_form.h"
class PasswordStoreChange {
public:
@@ -18,13 +18,13 @@ class PasswordStoreChange {
REMOVE,
};
- PasswordStoreChange(Type type, const webkit_glue::PasswordForm& form)
+ PasswordStoreChange(Type type, const webkit::forms::PasswordForm& form)
: type_(type), form_(form) {
}
virtual ~PasswordStoreChange() {}
Type type() const { return type_; }
- const webkit_glue::PasswordForm& form() const { return form_; }
+ const webkit::forms::PasswordForm& form() const { return form_; }
bool operator==(const PasswordStoreChange& other) const {
return type() == other.type() &&
@@ -46,7 +46,7 @@ class PasswordStoreChange {
private:
Type type_;
- webkit_glue::PasswordForm form_;
+ webkit::forms::PasswordForm form_;
};
typedef std::vector<PasswordStoreChange> PasswordStoreChangeList;
diff --git a/chrome/browser/password_manager/password_store_consumer.h b/chrome/browser/password_manager/password_store_consumer.h
index a515092..dc6c66b 100644
--- a/chrome/browser/password_manager/password_store_consumer.h
+++ b/chrome/browser/password_manager/password_store_consumer.h
@@ -8,9 +8,11 @@
#include "content/browser/cancelable_request.h"
-namespace webkit_glue {
+namespace webkit {
+namespace forms {
struct PasswordForm;
-};
+}
+}
// Reads from the PasswordStore are done asynchronously on a separate
// thread. PasswordStoreConsumer provides the virtual callback method, which is
@@ -25,7 +27,7 @@ class PasswordStoreConsumer {
// anyway with an empty vector.
virtual void OnPasswordStoreRequestDone(
CancelableRequestProvider::Handle handle,
- const std::vector<webkit_glue::PasswordForm*>& result) = 0;
+ const std::vector<webkit::forms::PasswordForm*>& result) = 0;
// The CancelableRequest framework needs both a callback (the
// PasswordStoreConsumer::OnPasswordStoreRequestDone) as well as a
diff --git a/chrome/browser/password_manager/password_store_default.cc b/chrome/browser/password_manager/password_store_default.cc
index 0931f31..a0544b6 100644
--- a/chrome/browser/password_manager/password_store_default.cc
+++ b/chrome/browser/password_manager/password_store_default.cc
@@ -19,7 +19,7 @@
#include "content/public/browser/notification_service.h"
using content::BrowserThread;
-using webkit_glue::PasswordForm;
+using webkit::forms::PasswordForm;
// MigrateHelper handles migration from WebDB to PasswordStore. It runs
// entirely on the UI thread and is owned by PasswordStoreDefault.
@@ -181,7 +181,7 @@ void PasswordStoreDefault::RemoveLoginsCreatedBetweenImpl(
}
void PasswordStoreDefault::GetLoginsImpl(
- GetLoginsRequest* request, const webkit_glue::PasswordForm& form) {
+ GetLoginsRequest* request, const webkit::forms::PasswordForm& form) {
login_db_->GetLogins(form, &request->value);
ForwardLoginsResult(request);
}
diff --git a/chrome/browser/password_manager/password_store_default.h b/chrome/browser/password_manager/password_store_default.h
index e4b356f..a796c43 100644
--- a/chrome/browser/password_manager/password_store_default.h
+++ b/chrome/browser/password_manager/password_store_default.h
@@ -31,19 +31,21 @@ class PasswordStoreDefault : public PasswordStore {
// Implements PasswordStore interface.
virtual void Shutdown() OVERRIDE;
virtual void ReportMetricsImpl() OVERRIDE;
- virtual void AddLoginImpl(const webkit_glue::PasswordForm& form) OVERRIDE;
- virtual void UpdateLoginImpl(const webkit_glue::PasswordForm& form) OVERRIDE;
- virtual void RemoveLoginImpl(const webkit_glue::PasswordForm& form) OVERRIDE;
+ virtual void AddLoginImpl(const webkit::forms::PasswordForm& form) OVERRIDE;
+ virtual void UpdateLoginImpl(
+ const webkit::forms::PasswordForm& form) OVERRIDE;
+ virtual void RemoveLoginImpl(
+ const webkit::forms::PasswordForm& form) OVERRIDE;
virtual void RemoveLoginsCreatedBetweenImpl(
const base::Time& delete_begin, const base::Time& delete_end) OVERRIDE;
virtual void GetLoginsImpl(GetLoginsRequest* request,
- const webkit_glue::PasswordForm& form) OVERRIDE;
+ const webkit::forms::PasswordForm& form) OVERRIDE;
virtual void GetAutofillableLoginsImpl(GetLoginsRequest* request) OVERRIDE;
virtual void GetBlacklistLoginsImpl(GetLoginsRequest* request) OVERRIDE;
virtual bool FillAutofillableLogins(
- std::vector<webkit_glue::PasswordForm*>* forms) OVERRIDE;
+ std::vector<webkit::forms::PasswordForm*>* forms) OVERRIDE;
virtual bool FillBlacklistLogins(
- std::vector<webkit_glue::PasswordForm*>* forms) OVERRIDE;
+ std::vector<webkit::forms::PasswordForm*>* forms) OVERRIDE;
scoped_refptr<WebDataService> web_data_service_;
diff --git a/chrome/browser/password_manager/password_store_default_unittest.cc b/chrome/browser/password_manager/password_store_default_unittest.cc
index cbb22bb..0422649 100644
--- a/chrome/browser/password_manager/password_store_default_unittest.cc
+++ b/chrome/browser/password_manager/password_store_default_unittest.cc
@@ -36,7 +36,7 @@ using testing::ElementsAreArray;
using testing::Pointee;
using testing::Property;
using testing::WithArg;
-using webkit_glue::PasswordForm;
+using webkit::forms::PasswordForm;
namespace {
@@ -44,7 +44,7 @@ class MockPasswordStoreConsumer : public PasswordStoreConsumer {
public:
MOCK_METHOD2(OnPasswordStoreRequestDone,
void(CancelableRequestProvider::Handle,
- const std::vector<webkit_glue::PasswordForm*>&));
+ const std::vector<webkit::forms::PasswordForm*>&));
};
class MockWebDataServiceConsumer : public WebDataServiceConsumer {
diff --git a/chrome/browser/password_manager/password_store_mac.cc b/chrome/browser/password_manager/password_store_mac.cc
index ef4e421..28015d9 100644
--- a/chrome/browser/password_manager/password_store_mac.cc
+++ b/chrome/browser/password_manager/password_store_mac.cc
@@ -23,7 +23,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/public/browser/notification_service.h"
-using webkit_glue::PasswordForm;
+using webkit::forms::PasswordForm;
// Utility class to handle the details of constructing and running a keychain
// search from a set of attributes.
@@ -641,7 +641,7 @@ SecKeychainItemRef MacKeychainPasswordFormAdapter::KeychainItemForForm(
std::vector<SecKeychainItemRef>
MacKeychainPasswordFormAdapter::MatchingKeychainItems(
const std::string& signon_realm,
- webkit_glue::PasswordForm::Scheme scheme,
+ webkit::forms::PasswordForm::Scheme scheme,
const char* path, const char* username) {
std::vector<SecKeychainItemRef> matches;
@@ -887,7 +887,7 @@ void PasswordStoreMac::RemoveLoginsCreatedBetweenImpl(
}
void PasswordStoreMac::GetLoginsImpl(GetLoginsRequest* request,
- const webkit_glue::PasswordForm& form) {
+ const webkit::forms::PasswordForm& form) {
MacKeychainPasswordFormAdapter keychain_adapter(keychain_.get());
std::vector<PasswordForm*> keychain_forms =
keychain_adapter.PasswordsFillingForm(form);
@@ -960,7 +960,7 @@ bool PasswordStoreMac::AddToKeychainIfNecessary(const PasswordForm& form) {
}
bool PasswordStoreMac::DatabaseHasFormMatchingKeychainForm(
- const webkit_glue::PasswordForm& form) {
+ const webkit::forms::PasswordForm& form) {
bool has_match = false;
std::vector<PasswordForm*> database_forms;
login_metadata_db_->GetLogins(form, &database_forms);
diff --git a/chrome/browser/password_manager/password_store_mac.h b/chrome/browser/password_manager/password_store_mac.h
index 3a509ef..d7ccb04 100644
--- a/chrome/browser/password_manager/password_store_mac.h
+++ b/chrome/browser/password_manager/password_store_mac.h
@@ -43,42 +43,44 @@ class PasswordStoreMac : public PasswordStore {
private:
virtual void ReportMetricsImpl() OVERRIDE;
- virtual void AddLoginImpl(const webkit_glue::PasswordForm& form) OVERRIDE;
- virtual void UpdateLoginImpl(const webkit_glue::PasswordForm& form) OVERRIDE;
- virtual void RemoveLoginImpl(const webkit_glue::PasswordForm& form) OVERRIDE;
+ virtual void AddLoginImpl(const webkit::forms::PasswordForm& form) OVERRIDE;
+ virtual void UpdateLoginImpl(
+ const webkit::forms::PasswordForm& form) OVERRIDE;
+ virtual void RemoveLoginImpl(
+ const webkit::forms::PasswordForm& form) OVERRIDE;
virtual void RemoveLoginsCreatedBetweenImpl(
const base::Time& delete_begin, const base::Time& delete_end) OVERRIDE;
virtual void GetLoginsImpl(GetLoginsRequest* request,
- const webkit_glue::PasswordForm& form) OVERRIDE;
+ const webkit::forms::PasswordForm& form) OVERRIDE;
virtual void GetAutofillableLoginsImpl(GetLoginsRequest* request) OVERRIDE;
virtual void GetBlacklistLoginsImpl(GetLoginsRequest* request) OVERRIDE;
virtual bool FillAutofillableLogins(
- std::vector<webkit_glue::PasswordForm*>* forms) OVERRIDE;
+ std::vector<webkit::forms::PasswordForm*>* forms) OVERRIDE;
virtual bool FillBlacklistLogins(
- std::vector<webkit_glue::PasswordForm*>* forms) OVERRIDE;
+ std::vector<webkit::forms::PasswordForm*>* forms) OVERRIDE;
// Adds the given form to the Keychain if it's something we want to store
// there (i.e., not a blacklist entry). Returns true if the operation
// succeeded (either we added successfully, or we didn't need to).
- bool AddToKeychainIfNecessary(const webkit_glue::PasswordForm& form);
+ bool AddToKeychainIfNecessary(const webkit::forms::PasswordForm& form);
// Returns true if our database contains a form that exactly matches the given
// keychain form.
bool DatabaseHasFormMatchingKeychainForm(
- const webkit_glue::PasswordForm& form);
+ const webkit::forms::PasswordForm& form);
// Returns all the Keychain entries that we own but no longer have
// corresponding metadata for in our database.
// Caller is responsible for deleting the forms.
- std::vector<webkit_glue::PasswordForm*> GetUnusedKeychainForms();
+ std::vector<webkit::forms::PasswordForm*> GetUnusedKeychainForms();
// Removes the given forms from the database.
void RemoveDatabaseForms(
- const std::vector<webkit_glue::PasswordForm*>& forms);
+ const std::vector<webkit::forms::PasswordForm*>& forms);
// Removes the given forms from the Keychain.
void RemoveKeychainForms(
- const std::vector<webkit_glue::PasswordForm*>& forms);
+ const std::vector<webkit::forms::PasswordForm*>& forms);
// Allows the creation of |notification_service_| to be scheduled on the right
// thread.
diff --git a/chrome/browser/password_manager/password_store_mac_internal.h b/chrome/browser/password_manager/password_store_mac_internal.h
index 7e6fb9a..c70af27 100644
--- a/chrome/browser/password_manager/password_store_mac_internal.h
+++ b/chrome/browser/password_manager/password_store_mac_internal.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// 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.
@@ -25,40 +25,40 @@ class MacKeychainPasswordFormAdapter {
// Returns PasswordForms for each keychain entry that could be used to fill
// |form|. Caller is responsible for deleting the returned forms.
- std::vector<webkit_glue::PasswordForm*> PasswordsFillingForm(
- const webkit_glue::PasswordForm& query_form);
+ std::vector<webkit::forms::PasswordForm*> PasswordsFillingForm(
+ const webkit::forms::PasswordForm& query_form);
// Returns PasswordForms for each keychain entry that could be merged with
// |form|. Differs from PasswordsFillingForm in that the username must match.
// Caller is responsible for deleting the returned forms.
- std::vector<webkit_glue::PasswordForm*> PasswordsMergeableWithForm(
- const webkit_glue::PasswordForm& query_form);
+ std::vector<webkit::forms::PasswordForm*> PasswordsMergeableWithForm(
+ const webkit::forms::PasswordForm& query_form);
// Returns the PasswordForm for the Keychain entry that matches |form| on all
// of the fields that uniquely identify a Keychain item, or NULL if there is
// no such entry.
// Caller is responsible for deleting the returned form.
- webkit_glue::PasswordForm* PasswordExactlyMatchingForm(
- const webkit_glue::PasswordForm& query_form);
+ webkit::forms::PasswordForm* PasswordExactlyMatchingForm(
+ const webkit::forms::PasswordForm& query_form);
// Returns true if PasswordsMergeableWithForm would return any items. This is
// a separate method because calling PasswordsMergeableWithForm and checking
// the return count would require reading the passwords from the keychain,
// thus potentially triggering authorizaiton UI, whereas this won't.
bool HasPasswordsMergeableWithForm(
- const webkit_glue::PasswordForm& query_form);
+ const webkit::forms::PasswordForm& query_form);
// Returns all keychain items of types corresponding to password forms.
- std::vector<webkit_glue::PasswordForm*> GetAllPasswordFormPasswords();
+ std::vector<webkit::forms::PasswordForm*> GetAllPasswordFormPasswords();
// Creates a new keychain entry from |form|, or updates the password of an
// existing keychain entry if there is a collision. Returns true if a keychain
// entry was successfully added/updated.
- bool AddPassword(const webkit_glue::PasswordForm& form);
+ bool AddPassword(const webkit::forms::PasswordForm& form);
// Removes the keychain password matching |form| if any. Returns true if a
// keychain item was found and successfully removed.
- bool RemovePassword(const webkit_glue::PasswordForm& form);
+ bool RemovePassword(const webkit::forms::PasswordForm& form);
// Controls whether or not Chrome will restrict Keychain searches to items
// that it created. Defaults to false.
@@ -68,22 +68,24 @@ class MacKeychainPasswordFormAdapter {
// Returns PasswordForms constructed from the given Keychain items, calling
// MacKeychain::Free on all of the keychain items and clearing the vector.
// Caller is responsible for deleting the returned forms.
- std::vector<webkit_glue::PasswordForm*> ConvertKeychainItemsToForms(
+ std::vector<webkit::forms::PasswordForm*> ConvertKeychainItemsToForms(
std::vector<SecKeychainItemRef>* items);
// Searches |keychain| for the specific keychain entry that corresponds to the
// given form, and returns it (or NULL if no match is found). The caller is
// responsible for calling MacKeychain::Free on on the returned item.
SecKeychainItemRef KeychainItemForForm(
- const webkit_glue::PasswordForm& form);
+ const webkit::forms::PasswordForm& form);
// Returns the Keychain items matching the given signon_realm, scheme, and
// optionally path and username (either of both can be NULL).
// The caller is responsible for calling MacKeychain::Free on the
// returned items.
std::vector<SecKeychainItemRef> MatchingKeychainItems(
- const std::string& signon_realm, webkit_glue::PasswordForm::Scheme scheme,
- const char* path, const char* username);
+ const std::string& signon_realm,
+ webkit::forms::PasswordForm::Scheme scheme,
+ const char* path,
+ const char* username);
// Takes a PasswordForm's signon_realm and parses it into its component parts,
// which are returned though the appropriate out parameters.
@@ -97,7 +99,7 @@ class MacKeychainPasswordFormAdapter {
// Returns the Keychain SecAuthenticationType type corresponding to |scheme|.
SecAuthenticationType AuthTypeForScheme(
- webkit_glue::PasswordForm::Scheme scheme);
+ webkit::forms::PasswordForm::Scheme scheme);
// Changes the password for keychain_item to |password|; returns true if the
// password was successfully changed.
@@ -139,12 +141,12 @@ namespace internal_keychain_helpers {
// require authorization).
bool FillPasswordFormFromKeychainItem(const MacKeychain& keychain,
const SecKeychainItemRef& keychain_item,
- webkit_glue::PasswordForm* form);
+ webkit::forms::PasswordForm* form);
// Returns true if the two given forms match based on signon_reaml, scheme, and
// username_value, and are thus suitable for merging (see MergePasswordForms).
-bool FormsMatchForMerge(const webkit_glue::PasswordForm& form_a,
- const webkit_glue::PasswordForm& form_b);
+bool FormsMatchForMerge(const webkit::forms::PasswordForm& form_a,
+ const webkit::forms::PasswordForm& form_b);
// Populates merged_forms by combining the password data from keychain_forms and
// the metadata from database_forms, removing used entries from the two source
@@ -155,16 +157,17 @@ bool FormsMatchForMerge(const webkit_glue::PasswordForm& form_a,
// password can be found (and which aren't blacklist entries), and for
// keychain_forms it's entries that weren't merged into at least one database
// form.
-void MergePasswordForms(std::vector<webkit_glue::PasswordForm*>* keychain_forms,
- std::vector<webkit_glue::PasswordForm*>* database_forms,
- std::vector<webkit_glue::PasswordForm*>* merged_forms);
+void MergePasswordForms(
+ std::vector<webkit::forms::PasswordForm*>* keychain_forms,
+ std::vector<webkit::forms::PasswordForm*>* database_forms,
+ std::vector<webkit::forms::PasswordForm*>* merged_forms);
// Fills in the passwords for as many of the forms in |database_forms| as
// possible using entries from |keychain| and returns them. On return,
// |database_forms| will contain only the forms for which no password was found.
-std::vector<webkit_glue::PasswordForm*> GetPasswordsForForms(
+std::vector<webkit::forms::PasswordForm*> GetPasswordsForForms(
const MacKeychain& keychain,
- std::vector<webkit_glue::PasswordForm*>* database_forms);
+ std::vector<webkit::forms::PasswordForm*>* database_forms);
} // internal_keychain_helpers
diff --git a/chrome/browser/password_manager/password_store_mac_unittest.cc b/chrome/browser/password_manager/password_store_mac_unittest.cc
index 7061ca4..36fb22e 100644
--- a/chrome/browser/password_manager/password_store_mac_unittest.cc
+++ b/chrome/browser/password_manager/password_store_mac_unittest.cc
@@ -20,7 +20,7 @@
#include "content/test/test_browser_thread.h"
using content::BrowserThread;
-using webkit_glue::PasswordForm;
+using webkit::forms::PasswordForm;
using testing::_;
using testing::DoAll;
using testing::WithArg;
@@ -31,7 +31,7 @@ class MockPasswordStoreConsumer : public PasswordStoreConsumer {
public:
MOCK_METHOD2(OnPasswordStoreRequestDone,
void(CancelableRequestProvider::Handle,
- const std::vector<webkit_glue::PasswordForm*>&));
+ const std::vector<webkit::forms::PasswordForm*>&));
};
ACTION(STLDeleteElements0) {
diff --git a/chrome/browser/password_manager/password_store_win.cc b/chrome/browser/password_manager/password_store_win.cc
index acb296d..122f5db 100644
--- a/chrome/browser/password_manager/password_store_win.cc
+++ b/chrome/browser/password_manager/password_store_win.cc
@@ -16,7 +16,7 @@
#include "chrome/browser/webdata/web_data_service.h"
using content::BrowserThread;
-using webkit_glue::PasswordForm;
+using webkit::forms::PasswordForm;
namespace {
// Subclass GetLoginsRequest in order to hold a copy of the form information
diff --git a/chrome/browser/password_manager/password_store_win.h b/chrome/browser/password_manager/password_store_win.h
index 6b1fe8b..689c948 100644
--- a/chrome/browser/password_manager/password_store_win.h
+++ b/chrome/browser/password_manager/password_store_win.h
@@ -13,9 +13,11 @@ class LoginDatabase;
class Profile;
class WebDataService;
-namespace webkit_glue {
+namespace webkit {
+namespace forms {
struct PasswordForm;
}
+}
// Windows PasswordStore implementation that uses the default implementation,
// but also uses IE7 passwords if no others found.
@@ -43,7 +45,7 @@ class PasswordStoreWin : public PasswordStoreDefault {
// Overridden so that we can save the form for later use.
virtual void GetLoginsImpl(GetLoginsRequest* request,
- const webkit_glue::PasswordForm& form) OVERRIDE;
+ const webkit::forms::PasswordForm& form) OVERRIDE;
scoped_ptr<DBHandler> db_handler_;
diff --git a/chrome/browser/password_manager/password_store_win_unittest.cc b/chrome/browser/password_manager/password_store_win_unittest.cc
index 09e6d96..8e1a185 100644
--- a/chrome/browser/password_manager/password_store_win_unittest.cc
+++ b/chrome/browser/password_manager/password_store_win_unittest.cc
@@ -32,7 +32,7 @@ using content::BrowserThread;
using testing::_;
using testing::DoAll;
using testing::WithArg;
-using webkit_glue::PasswordForm;
+using webkit::forms::PasswordForm;
namespace {
@@ -40,7 +40,7 @@ class MockPasswordStoreConsumer : public PasswordStoreConsumer {
public:
MOCK_METHOD2(OnPasswordStoreRequestDone,
void(CancelableRequestProvider::Handle,
- const std::vector<webkit_glue::PasswordForm*>&));
+ const std::vector<webkit::forms::PasswordForm*>&));
};
class MockWebDataServiceConsumer : public WebDataServiceConsumer {
diff --git a/chrome/browser/password_manager/password_store_x.cc b/chrome/browser/password_manager/password_store_x.cc
index fe9640d..f72e951 100644
--- a/chrome/browser/password_manager/password_store_x.cc
+++ b/chrome/browser/password_manager/password_store_x.cc
@@ -20,7 +20,7 @@
using content::BrowserThread;
using std::vector;
-using webkit_glue::PasswordForm;
+using webkit::forms::PasswordForm;
PasswordStoreX::PasswordStoreX(LoginDatabase* login_db,
Profile* profile,
diff --git a/chrome/browser/password_manager/password_store_x.h b/chrome/browser/password_manager/password_store_x.h
index ae64993..9fddfcd 100644
--- a/chrome/browser/password_manager/password_store_x.h
+++ b/chrome/browser/password_manager/password_store_x.h
@@ -30,18 +30,18 @@ class PasswordStoreX : public PasswordStoreDefault {
// with return values rather than implicit consumer notification.
class NativeBackend {
public:
- typedef std::vector<webkit_glue::PasswordForm*> PasswordFormList;
+ typedef std::vector<webkit::forms::PasswordForm*> PasswordFormList;
virtual ~NativeBackend() {}
virtual bool Init() = 0;
- virtual bool AddLogin(const webkit_glue::PasswordForm& form) = 0;
- virtual bool UpdateLogin(const webkit_glue::PasswordForm& form) = 0;
- virtual bool RemoveLogin(const webkit_glue::PasswordForm& form) = 0;
+ virtual bool AddLogin(const webkit::forms::PasswordForm& form) = 0;
+ virtual bool UpdateLogin(const webkit::forms::PasswordForm& form) = 0;
+ virtual bool RemoveLogin(const webkit::forms::PasswordForm& form) = 0;
virtual bool RemoveLoginsCreatedBetween(const base::Time& delete_begin,
const base::Time& delete_end) = 0;
- virtual bool GetLogins(const webkit_glue::PasswordForm& form,
+ virtual bool GetLogins(const webkit::forms::PasswordForm& form,
PasswordFormList* forms) = 0;
virtual bool GetLoginsCreatedBetween(const base::Time& get_begin,
const base::Time& get_end,
@@ -76,19 +76,21 @@ class PasswordStoreX : public PasswordStoreDefault {
virtual ~PasswordStoreX();
// Implements PasswordStore interface.
- virtual void AddLoginImpl(const webkit_glue::PasswordForm& form) OVERRIDE;
- virtual void UpdateLoginImpl(const webkit_glue::PasswordForm& form) OVERRIDE;
- virtual void RemoveLoginImpl(const webkit_glue::PasswordForm& form) OVERRIDE;
+ virtual void AddLoginImpl(const webkit::forms::PasswordForm& form) OVERRIDE;
+ virtual void UpdateLoginImpl(
+ const webkit::forms::PasswordForm& form) OVERRIDE;
+ virtual void RemoveLoginImpl(
+ const webkit::forms::PasswordForm& form) OVERRIDE;
virtual void RemoveLoginsCreatedBetweenImpl(
const base::Time& delete_begin, const base::Time& delete_end) OVERRIDE;
virtual void GetLoginsImpl(GetLoginsRequest* request,
- const webkit_glue::PasswordForm& form) OVERRIDE;
+ const webkit::forms::PasswordForm& form) OVERRIDE;
virtual void GetAutofillableLoginsImpl(GetLoginsRequest* request) OVERRIDE;
virtual void GetBlacklistLoginsImpl(GetLoginsRequest* request) OVERRIDE;
virtual bool FillAutofillableLogins(
- std::vector<webkit_glue::PasswordForm*>* forms) OVERRIDE;
+ std::vector<webkit::forms::PasswordForm*>* forms) OVERRIDE;
virtual bool FillBlacklistLogins(
- std::vector<webkit_glue::PasswordForm*>* forms) OVERRIDE;
+ std::vector<webkit::forms::PasswordForm*>* forms) OVERRIDE;
// Sort logins by origin, like the ORDER BY clause in login_database.cc.
void SortLoginsByOrigin(NativeBackend::PasswordFormList* list);
diff --git a/chrome/browser/password_manager/password_store_x_unittest.cc b/chrome/browser/password_manager/password_store_x_unittest.cc
index ad33db6..15a4a62 100644
--- a/chrome/browser/password_manager/password_store_x_unittest.cc
+++ b/chrome/browser/password_manager/password_store_x_unittest.cc
@@ -40,7 +40,7 @@ using testing::ElementsAreArray;
using testing::Pointee;
using testing::Property;
using testing::WithArg;
-using webkit_glue::PasswordForm;
+using webkit::forms::PasswordForm;
typedef std::vector<PasswordForm*> VectorOfForms;
diff --git a/chrome/browser/password_manager_delegate_impl.cc b/chrome/browser/password_manager_delegate_impl.cc
index 3c423a6..accc63a 100644
--- a/chrome/browser/password_manager_delegate_impl.cc
+++ b/chrome/browser/password_manager_delegate_impl.cc
@@ -19,7 +19,7 @@
#include "grit/theme_resources_standard.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
-#include "webkit/glue/password_form.h"
+#include "webkit/forms/password_form.h"
// After a successful *new* login attempt, we take the PasswordFormManager in
// provisional_save_manager_ and move it to a SavePasswordInfoBarDelegate while
@@ -110,7 +110,7 @@ bool SavePasswordInfoBarDelegate::Cancel() {
// PasswordManagerDelegateImpl ------------------------------------------------
void PasswordManagerDelegateImpl::FillPasswordForm(
- const webkit_glue::PasswordFormFillData& form_data) {
+ const webkit::forms::PasswordFormFillData& form_data) {
tab_contents_->tab_contents()->render_view_host()->Send(
new AutofillMsg_FillPasswordForm(
tab_contents_->tab_contents()->render_view_host()->routing_id(),
diff --git a/chrome/browser/password_manager_delegate_impl.h b/chrome/browser/password_manager_delegate_impl.h
index 5552568f..ecd3527 100644
--- a/chrome/browser/password_manager_delegate_impl.h
+++ b/chrome/browser/password_manager_delegate_impl.h
@@ -18,7 +18,7 @@ class PasswordManagerDelegateImpl : public PasswordManagerDelegate {
// PasswordManagerDelegate implementation.
virtual void FillPasswordForm(
- const webkit_glue::PasswordFormFillData& form_data) OVERRIDE;
+ const webkit::forms::PasswordFormFillData& form_data) OVERRIDE;
virtual void AddSavePasswordInfoBar(
PasswordFormManager* form_to_save) OVERRIDE;
virtual Profile* GetProfileForPasswordManager() OVERRIDE;
diff --git a/chrome/browser/sync/glue/password_change_processor.cc b/chrome/browser/sync/glue/password_change_processor.cc
index 432b293..974c21e 100644
--- a/chrome/browser/sync/glue/password_change_processor.cc
+++ b/chrome/browser/sync/glue/password_change_processor.cc
@@ -9,8 +9,8 @@
#include "base/location.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
-#include "chrome/browser/password_manager/password_store_change.h"
#include "chrome/browser/password_manager/password_store.h"
+#include "chrome/browser/password_manager/password_store_change.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/glue/password_model_associator.h"
#include "chrome/browser/sync/internal_api/change_record.h"
@@ -23,7 +23,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
-#include "webkit/glue/password_form.h"
+#include "webkit/forms/password_form.h"
using content::BrowserThread;
@@ -181,7 +181,7 @@ void PasswordChangeProcessor::ApplyChangesFromSyncModel(
sync_api::ExtraPasswordChangeRecordData* extra =
it->extra.get();
const sync_pb::PasswordSpecificsData& password = extra->unencrypted();
- webkit_glue::PasswordForm form;
+ webkit::forms::PasswordForm form;
PasswordModelAssociator::CopyPassword(password, &form);
deleted_passwords_.push_back(form);
model_associator_->Disassociate(it->id);
@@ -201,7 +201,7 @@ void PasswordChangeProcessor::ApplyChangesFromSyncModel(
const sync_pb::PasswordSpecificsData& password_data =
sync_node.GetPasswordSpecifics();
- webkit_glue::PasswordForm password;
+ webkit::forms::PasswordForm password;
PasswordModelAssociator::CopyPassword(password_data, &password);
if (sync_api::ChangeRecord::ACTION_ADD == it->action) {
diff --git a/chrome/browser/sync/glue/password_model_associator.cc b/chrome/browser/sync/glue/password_model_associator.cc
index 18cca95..7b2e272 100644
--- a/chrome/browser/sync/glue/password_model_associator.cc
+++ b/chrome/browser/sync/glue/password_model_associator.cc
@@ -18,7 +18,7 @@
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/sync/protocol/password_specifics.pb.h"
#include "net/base/escape.h"
-#include "webkit/glue/password_form.h"
+#include "webkit/forms/password_form.h"
using content::BrowserThread;
@@ -55,7 +55,7 @@ bool PasswordModelAssociator::AssociateModels(SyncError* error) {
// 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_glue::PasswordForm*> passwords;
+ std::vector<webkit::forms::PasswordForm*> passwords;
if (!password_store_->FillAutofillableLogins(&passwords) ||
!password_store_->FillBlacklistLogins(&passwords)) {
STLDeleteElements(&passwords);
@@ -79,7 +79,7 @@ bool PasswordModelAssociator::AssociateModels(SyncError* error) {
return false;
}
- for (std::vector<webkit_glue::PasswordForm*>::iterator ix =
+ for (std::vector<webkit::forms::PasswordForm*>::iterator ix =
passwords.begin();
ix != passwords.end(); ++ix) {
if (IsAbortPending()) {
@@ -94,7 +94,7 @@ bool PasswordModelAssociator::AssociateModels(SyncError* error) {
node.GetPasswordSpecifics();
DCHECK_EQ(tag, MakeTag(password));
- webkit_glue::PasswordForm new_password;
+ webkit::forms::PasswordForm new_password;
if (MergePasswords(password, **ix, &new_password)) {
sync_api::WriteNode write_node(&trans);
@@ -145,7 +145,7 @@ bool PasswordModelAssociator::AssociateModels(SyncError* error) {
// The password only exists on the server. Add it to the local
// model.
if (current_passwords.find(tag) == current_passwords.end()) {
- webkit_glue::PasswordForm new_password;
+ webkit::forms::PasswordForm new_password;
CopyPassword(password, &new_password);
Associate(&tag, sync_child_node.GetId());
@@ -315,9 +315,9 @@ bool PasswordModelAssociator::WriteToPasswordStore(
// static
void PasswordModelAssociator::CopyPassword(
const sync_pb::PasswordSpecificsData& password,
- webkit_glue::PasswordForm* new_password) {
+ webkit::forms::PasswordForm* new_password) {
new_password->scheme =
- static_cast<webkit_glue::PasswordForm::Scheme>(password.scheme());
+ static_cast<webkit::forms::PasswordForm::Scheme>(password.scheme());
new_password->signon_realm = password.signon_realm();
new_password->origin = GURL(password.origin());
new_password->action = GURL(password.action());
@@ -340,8 +340,8 @@ void PasswordModelAssociator::CopyPassword(
// static
bool PasswordModelAssociator::MergePasswords(
const sync_pb::PasswordSpecificsData& password,
- const webkit_glue::PasswordForm& password_form,
- webkit_glue::PasswordForm* new_password) {
+ const webkit::forms::PasswordForm& password_form,
+ webkit::forms::PasswordForm* new_password) {
DCHECK(new_password);
if (password.scheme() == password_form.scheme &&
@@ -376,7 +376,7 @@ bool PasswordModelAssociator::MergePasswords(
// static
void PasswordModelAssociator::WriteToSyncNode(
- const webkit_glue::PasswordForm& password_form,
+ const webkit::forms::PasswordForm& password_form,
sync_api::WriteNode* node) {
sync_pb::PasswordSpecificsData password;
password.set_scheme(password_form.scheme);
@@ -397,7 +397,7 @@ void PasswordModelAssociator::WriteToSyncNode(
// static
std::string PasswordModelAssociator::MakeTag(
- const webkit_glue::PasswordForm& password) {
+ const webkit::forms::PasswordForm& password) {
return MakeTag(password.origin.spec(),
UTF16ToUTF8(password.username_element),
UTF16ToUTF8(password.username_value),
diff --git a/chrome/browser/sync/glue/password_model_associator.h b/chrome/browser/sync/glue/password_model_associator.h
index c356a63..22c1df8 100644
--- a/chrome/browser/sync/glue/password_model_associator.h
+++ b/chrome/browser/sync/glue/password_model_associator.h
@@ -22,14 +22,16 @@ class MessageLoop;
class PasswordStore;
class ProfileSyncService;
-namespace webkit_glue {
+namespace webkit {
+namespace forms {
struct PasswordForm;
-};
+}
+}
namespace sync_api {
class WriteNode;
class WriteTransaction;
-};
+}
namespace browser_sync {
@@ -43,7 +45,7 @@ extern const char kPasswordTag[];
class PasswordModelAssociator
: public PerDataTypeAssociatorInterface<std::string, std::string> {
public:
- typedef std::vector<webkit_glue::PasswordForm> PasswordVector;
+ typedef std::vector<webkit::forms::PasswordForm> PasswordVector;
static syncable::ModelType model_type() { return syncable::PASSWORDS; }
PasswordModelAssociator(ProfileSyncService* sync_service,
@@ -96,7 +98,7 @@ class PasswordModelAssociator
const PasswordVector* updated_passwords,
const PasswordVector* deleted_passwords);
- static std::string MakeTag(const webkit_glue::PasswordForm& password);
+ static std::string MakeTag(const webkit::forms::PasswordForm& password);
static std::string MakeTag(const sync_pb::PasswordSpecificsData& password);
static std::string MakeTag(const std::string& origin_url,
const std::string& username_element,
@@ -105,12 +107,12 @@ class PasswordModelAssociator
const std::string& signon_realm);
static void CopyPassword(const sync_pb::PasswordSpecificsData& password,
- webkit_glue::PasswordForm* new_password);
+ webkit::forms::PasswordForm* new_password);
static bool MergePasswords(const sync_pb::PasswordSpecificsData& password,
- const webkit_glue::PasswordForm& password_form,
- webkit_glue::PasswordForm* new_password);
- static void WriteToSyncNode(const webkit_glue::PasswordForm& password_form,
+ const webkit::forms::PasswordForm& password_form,
+ webkit::forms::PasswordForm* new_password);
+ static void WriteToSyncNode(const webkit::forms::PasswordForm& password_form,
sync_api::WriteNode* node);
// Called at various points in model association to determine if the
diff --git a/chrome/browser/sync/profile_sync_service_password_unittest.cc b/chrome/browser/sync/profile_sync_service_password_unittest.cc
index a2b35c9..47095173 100644
--- a/chrome/browser/sync/profile_sync_service_password_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_password_unittest.cc
@@ -40,7 +40,7 @@
#include "content/test/notification_observer_mock.h"
#include "content/test/test_browser_thread.h"
#include "testing/gmock/include/gmock/gmock.h"
-#include "webkit/glue/password_form.h"
+#include "webkit/forms/password_form.h"
using base::Time;
using browser_sync::PasswordChangeProcessor;
@@ -77,7 +77,7 @@ using testing::InvokeWithoutArgs;
using testing::Return;
using testing::SaveArg;
using testing::SetArgumentPointee;
-using webkit_glue::PasswordForm;
+using webkit::forms::PasswordForm;
ACTION_P3(MakePasswordSyncComponents, service, ps, dtc) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
diff --git a/chrome/browser/sync/test/integration/autofill_helper.cc b/chrome/browser/sync/test/integration/autofill_helper.cc
index b2deecc..60b39c6 100644
--- a/chrome/browser/sync/test/integration/autofill_helper.cc
+++ b/chrome/browser/sync/test/integration/autofill_helper.cc
@@ -13,14 +13,14 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/sync/profile_sync_test_util.h"
-#include "chrome/browser/sync/test/integration/sync_test.h"
#include "chrome/browser/sync/test/integration/sync_datatype_helper.h"
+#include "chrome/browser/sync/test/integration/sync_test.h"
#include "chrome/browser/webdata/autofill_entry.h"
#include "chrome/browser/webdata/autofill_table.h"
#include "chrome/browser/webdata/web_database.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/test/base/thread_observer_helper.h"
-#include "webkit/glue/form_field.h"
+#include "webkit/forms/form_field.h"
using base::WaitableEvent;
using content::BrowserThread;
@@ -133,11 +133,11 @@ PersonalDataManager* GetPersonalDataManager(int index) {
}
void AddKeys(int profile, const std::set<AutofillKey>& keys) {
- std::vector<webkit_glue::FormField> form_fields;
+ std::vector<webkit::forms::FormField> form_fields;
for (std::set<AutofillKey>::const_iterator i = keys.begin();
i != keys.end();
++i) {
- webkit_glue::FormField field;
+ webkit::forms::FormField field;
field.name = i->name();
field.value = i->value();
form_fields.push_back(field);
diff --git a/chrome/browser/sync/test/integration/multiple_client_passwords_sync_test.cc b/chrome/browser/sync/test/integration/multiple_client_passwords_sync_test.cc
index b1c8095..83fee37 100644
--- a/chrome/browser/sync/test/integration/multiple_client_passwords_sync_test.cc
+++ b/chrome/browser/sync/test/integration/multiple_client_passwords_sync_test.cc
@@ -14,7 +14,7 @@ using passwords_helper::CreateTestPasswordForm;
using passwords_helper::GetPasswordCount;
using passwords_helper::GetPasswordStore;
-using webkit_glue::PasswordForm;
+using webkit::forms::PasswordForm;
class MultipleClientPasswordsSyncTest : public SyncTest {
public:
diff --git a/chrome/browser/sync/test/integration/passwords_helper.cc b/chrome/browser/sync/test/integration/passwords_helper.cc
index 5628e44..792c0dc 100644
--- a/chrome/browser/sync/test/integration/passwords_helper.cc
+++ b/chrome/browser/sync/test/integration/passwords_helper.cc
@@ -15,7 +15,7 @@
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/browser/browser_thread.h"
-using webkit_glue::PasswordForm;
+using webkit::forms::PasswordForm;
using sync_datatype_helper::test;
const std::string kFakeSignonRealm = "http://fake-signon-realm.google.com/";
diff --git a/chrome/browser/sync/test/integration/passwords_helper.h b/chrome/browser/sync/test/integration/passwords_helper.h
index 197b7a0..7de3cf9 100644
--- a/chrome/browser/sync/test/integration/passwords_helper.h
+++ b/chrome/browser/sync/test/integration/passwords_helper.h
@@ -11,7 +11,7 @@
#include "base/time.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
-#include "webkit/glue/password_form.h"
+#include "webkit/forms/password_form.h"
class PasswordStore;
@@ -20,21 +20,21 @@ namespace passwords_helper {
// Adds the login held in |form| to the password store |store|. Even though
// logins are normally added asynchronously, this method will block until the
// login is added.
-void AddLogin(PasswordStore* store, const webkit_glue::PasswordForm& form);
+void AddLogin(PasswordStore* store, const webkit::forms::PasswordForm& form);
// Update the data held in password store |store| with a modified |form|.
// This method blocks until the operation is complete.
-void UpdateLogin(PasswordStore* store, const webkit_glue::PasswordForm& form);
+void UpdateLogin(PasswordStore* store, const webkit::forms::PasswordForm& form);
// Searches |store| for all logins matching a fake signon realm used only by
// LivePasswordsSyncTest and adds the results to |matches|. Note that the
// caller is responsible for deleting the forms added to |matches|.
void GetLogins(PasswordStore* store,
- std::vector<webkit_glue::PasswordForm>& matches);
+ std::vector<webkit::forms::PasswordForm>& matches);
// Removes the login held in |form| from the password store |store|. This
// method blocks until the operation is complete.
-void RemoveLogin(PasswordStore* store, const webkit_glue::PasswordForm& form);
+void RemoveLogin(PasswordStore* store, const webkit::forms::PasswordForm& form);
// Removes all password forms from the password store |store|.
void RemoveLogins(PasswordStore* store);
@@ -73,7 +73,7 @@ int GetVerifierPasswordCount();
// Creates a test password form with a well known fake signon realm used only
// by LivePasswordsSyncTest based on |index|.
-webkit_glue::PasswordForm CreateTestPasswordForm(int index);
+webkit::forms::PasswordForm CreateTestPasswordForm(int index);
} // namespace passwords_helper
diff --git a/chrome/browser/sync/test/integration/performance/passwords_sync_perf_test.cc b/chrome/browser/sync/test/integration/performance/passwords_sync_perf_test.cc
index a8ed771..58f7d69 100644
--- a/chrome/browser/sync/test/integration/performance/passwords_sync_perf_test.cc
+++ b/chrome/browser/sync/test/integration/performance/passwords_sync_perf_test.cc
@@ -34,7 +34,7 @@ class PasswordsSyncPerfTest : public SyncTest {
private:
// Returns a new unique login.
- webkit_glue::PasswordForm NextLogin();
+ webkit::forms::PasswordForm NextLogin();
// Returns a new unique password value.
std::string NextPassword();
@@ -50,9 +50,9 @@ void PasswordsSyncPerfTest::AddLogins(int profile, int num_logins) {
}
void PasswordsSyncPerfTest::UpdateLogins(int profile) {
- std::vector<webkit_glue::PasswordForm> logins;
+ std::vector<webkit::forms::PasswordForm> logins;
GetLogins(GetPasswordStore(profile), logins);
- for (std::vector<webkit_glue::PasswordForm>::iterator it = logins.begin();
+ for (std::vector<webkit::forms::PasswordForm>::iterator it = logins.begin();
it != logins.end(); ++it) {
(*it).password_value = ASCIIToUTF16(NextPassword());
UpdateLogin(GetPasswordStore(profile), (*it));
@@ -63,7 +63,7 @@ void PasswordsSyncPerfTest::RemoveLogins(int profile) {
passwords_helper::RemoveLogins(GetPasswordStore(profile));
}
-webkit_glue::PasswordForm PasswordsSyncPerfTest::NextLogin() {
+webkit::forms::PasswordForm PasswordsSyncPerfTest::NextLogin() {
return CreateTestPasswordForm(password_number_++);
}
diff --git a/chrome/browser/sync/test/integration/single_client_passwords_sync_test.cc b/chrome/browser/sync/test/integration/single_client_passwords_sync_test.cc
index 73c1a9d..8adfae0 100644
--- a/chrome/browser/sync/test/integration/single_client_passwords_sync_test.cc
+++ b/chrome/browser/sync/test/integration/single_client_passwords_sync_test.cc
@@ -15,7 +15,7 @@ using passwords_helper::GetVerifierPasswordCount;
using passwords_helper::GetVerifierPasswordStore;
using passwords_helper::ProfileContainsSamePasswordFormsAsVerifier;
-using webkit_glue::PasswordForm;
+using webkit::forms::PasswordForm;
class SingleClientPasswordsSyncTest : public SyncTest {
public:
diff --git a/chrome/browser/sync/test/integration/sync_errors_test.cc b/chrome/browser/sync/test/integration/sync_errors_test.cc
index 1ae729d..7e702efb 100644
--- a/chrome/browser/sync/test/integration/sync_errors_test.cc
+++ b/chrome/browser/sync/test/integration/sync_errors_test.cc
@@ -20,7 +20,7 @@ using passwords_helper::GetVerifierPasswordCount;
using passwords_helper::GetVerifierPasswordStore;
using passwords_helper::ProfileContainsSamePasswordFormsAsVerifier;
-using webkit_glue::PasswordForm;
+using webkit::forms::PasswordForm;
class SyncErrorTest : public SyncTest{
public:
diff --git a/chrome/browser/sync/test/integration/two_client_passwords_sync_test.cc b/chrome/browser/sync/test/integration/two_client_passwords_sync_test.cc
index e5164c7..dc837fb 100644
--- a/chrome/browser/sync/test/integration/two_client_passwords_sync_test.cc
+++ b/chrome/browser/sync/test/integration/two_client_passwords_sync_test.cc
@@ -23,7 +23,7 @@ using passwords_helper::RemoveLogins;
using passwords_helper::SetPassphrase;
using passwords_helper::UpdateLogin;
-using webkit_glue::PasswordForm;
+using webkit::forms::PasswordForm;
static const char* kValidPassphrase = "passphrase!";
static const char* kAnotherValidPassphrase = "another passphrase!";
diff --git a/chrome/browser/ui/login/login_prompt.cc b/chrome/browser/ui/login/login_prompt.cc
index 54855cd..ed351c1 100644
--- a/chrome/browser/ui/login/login_prompt.cc
+++ b/chrome/browser/ui/login/login_prompt.cc
@@ -32,7 +32,7 @@
#include "ui/base/text/text_elider.h"
using content::BrowserThread;
-using webkit_glue::PasswordForm;
+using webkit::forms::PasswordForm;
class LoginHandlerImpl;
@@ -107,7 +107,7 @@ LoginHandler::~LoginHandler() {
SetModel(NULL);
}
-void LoginHandler::SetPasswordForm(const webkit_glue::PasswordForm& form) {
+void LoginHandler::SetPasswordForm(const webkit::forms::PasswordForm& form) {
password_form_ = form;
}
diff --git a/chrome/browser/ui/login/login_prompt.h b/chrome/browser/ui/login/login_prompt.h
index ed701d6..2aa1bb6 100644
--- a/chrome/browser/ui/login/login_prompt.h
+++ b/chrome/browser/ui/login/login_prompt.h
@@ -49,7 +49,7 @@ class LoginHandler : public ResourceDispatcherHostLoginDelegate,
// Sets information about the authentication type (|form|) and the
// |password_manager| for this profile.
- void SetPasswordForm(const webkit_glue::PasswordForm& form);
+ void SetPasswordForm(const webkit::forms::PasswordForm& form);
void SetPasswordManager(PasswordManager* password_manager);
// Returns the TabContents that needs authentication.
@@ -141,7 +141,7 @@ class LoginHandler : public ResourceDispatcherHostLoginDelegate,
// when later notifying the password manager if the credentials were accepted
// or rejected.
// This should only be accessed on the UI loop.
- webkit_glue::PasswordForm password_form_;
+ webkit::forms::PasswordForm password_form_;
// Points to the password manager owned by the TabContents requesting auth.
// Can be null if the TabContents is not a TabContents.
diff --git a/chrome/browser/ui/login/login_prompt_gtk.cc b/chrome/browser/ui/login/login_prompt_gtk.cc
index e16856c..9a32c86 100644
--- a/chrome/browser/ui/login/login_prompt_gtk.cc
+++ b/chrome/browser/ui/login/login_prompt_gtk.cc
@@ -28,7 +28,7 @@
#include "ui/base/l10n/l10n_util.h"
using content::BrowserThread;
-using webkit_glue::PasswordForm;
+using webkit::forms::PasswordForm;
// ----------------------------------------------------------------------------
// LoginHandlerGtk
diff --git a/chrome/browser/ui/login/login_prompt_mac.mm b/chrome/browser/ui/login/login_prompt_mac.mm
index 34c4275..92c8f21 100644
--- a/chrome/browser/ui/login/login_prompt_mac.mm
+++ b/chrome/browser/ui/login/login_prompt_mac.mm
@@ -25,7 +25,7 @@
#include "ui/base/l10n/l10n_util.h"
using content::BrowserThread;
-using webkit_glue::PasswordForm;
+using webkit::forms::PasswordForm;
// ----------------------------------------------------------------------------
// LoginHandlerMac
diff --git a/chrome/browser/ui/login/login_prompt_win.cc b/chrome/browser/ui/login/login_prompt_win.cc
index 6c81dc9..f1f241d 100644
--- a/chrome/browser/ui/login/login_prompt_win.cc
+++ b/chrome/browser/ui/login/login_prompt_win.cc
@@ -21,7 +21,7 @@
#include "ui/views/window/dialog_delegate.h"
using content::BrowserThread;
-using webkit_glue::PasswordForm;
+using webkit::forms::PasswordForm;
// ----------------------------------------------------------------------------
// LoginHandlerWin
diff --git a/chrome/browser/ui/webui/options/password_manager_handler.cc b/chrome/browser/ui/webui/options/password_manager_handler.cc
index 50c904b..7333d89 100644
--- a/chrome/browser/ui/webui/options/password_manager_handler.cc
+++ b/chrome/browser/ui/webui/options/password_manager_handler.cc
@@ -20,7 +20,7 @@
#include "grit/generated_resources.h"
#include "net/base/net_util.h"
#include "ui/base/l10n/l10n_util.h"
-#include "webkit/glue/password_form.h"
+#include "webkit/forms/password_form.h"
PasswordManagerHandler::PasswordManagerHandler()
: ALLOW_THIS_IN_INITIALIZER_LIST(populater_(this)),
@@ -252,7 +252,7 @@ void PasswordManagerHandler::PasswordListPopulater::Populate() {
void PasswordManagerHandler::PasswordListPopulater::
OnPasswordStoreRequestDone(
CancelableRequestProvider::Handle handle,
- const std::vector<webkit_glue::PasswordForm*>& result) {
+ const std::vector<webkit::forms::PasswordForm*>& result) {
DCHECK_EQ(pending_login_query_, handle);
pending_login_query_ = 0;
page_->password_list_.reset();
@@ -281,7 +281,7 @@ void PasswordManagerHandler::PasswordExceptionListPopulater::Populate() {
void PasswordManagerHandler::PasswordExceptionListPopulater::
OnPasswordStoreRequestDone(
CancelableRequestProvider::Handle handle,
- const std::vector<webkit_glue::PasswordForm*>& result) {
+ const std::vector<webkit::forms::PasswordForm*>& result) {
DCHECK_EQ(pending_login_query_, handle);
pending_login_query_ = 0;
page_->password_exception_list_.reset();
diff --git a/chrome/browser/ui/webui/options/password_manager_handler.h b/chrome/browser/ui/webui/options/password_manager_handler.h
index 6588881..7466b03 100644
--- a/chrome/browser/ui/webui/options/password_manager_handler.h
+++ b/chrome/browser/ui/webui/options/password_manager_handler.h
@@ -75,7 +75,7 @@ class PasswordManagerHandler : public OptionsPageUIHandler,
// Send the password store's reply back to the handler.
virtual void OnPasswordStoreRequestDone(
CancelableRequestProvider::Handle handle,
- const std::vector<webkit_glue::PasswordForm*>& result) = 0;
+ const std::vector<webkit::forms::PasswordForm*>& result) = 0;
protected:
PasswordManagerHandler* page_;
@@ -93,7 +93,7 @@ class PasswordManagerHandler : public OptionsPageUIHandler,
// Send the password store's reply back to the handler.
virtual void OnPasswordStoreRequestDone(
CancelableRequestProvider::Handle handle,
- const std::vector<webkit_glue::PasswordForm*>& result) OVERRIDE;
+ const std::vector<webkit::forms::PasswordForm*>& result) OVERRIDE;
};
// A short class to mediate requests to the password store for exceptions.
@@ -107,15 +107,15 @@ class PasswordManagerHandler : public OptionsPageUIHandler,
// Send the password store's reply back to the handler.
virtual void OnPasswordStoreRequestDone(
CancelableRequestProvider::Handle handle,
- const std::vector<webkit_glue::PasswordForm*>& result) OVERRIDE;
+ const std::vector<webkit::forms::PasswordForm*>& result) OVERRIDE;
};
// Password store consumer for populating the password list and exceptions.
PasswordListPopulater populater_;
PasswordExceptionListPopulater exception_populater_;
- ScopedVector<webkit_glue::PasswordForm> password_list_;
- ScopedVector<webkit_glue::PasswordForm> password_exception_list_;
+ ScopedVector<webkit::forms::PasswordForm> password_list_;
+ ScopedVector<webkit::forms::PasswordForm> password_exception_list_;
// User's pref
std::string languages_;
diff --git a/chrome/browser/ui/webui/options2/password_manager_handler.cc b/chrome/browser/ui/webui/options2/password_manager_handler.cc
index b0990bb..29d45c0 100644
--- a/chrome/browser/ui/webui/options2/password_manager_handler.cc
+++ b/chrome/browser/ui/webui/options2/password_manager_handler.cc
@@ -20,7 +20,7 @@
#include "grit/generated_resources.h"
#include "net/base/net_util.h"
#include "ui/base/l10n/l10n_util.h"
-#include "webkit/glue/password_form.h"
+#include "webkit/forms/password_form.h"
PasswordManagerHandler::PasswordManagerHandler()
: ALLOW_THIS_IN_INITIALIZER_LIST(populater_(this)),
@@ -252,7 +252,7 @@ void PasswordManagerHandler::PasswordListPopulater::Populate() {
void PasswordManagerHandler::PasswordListPopulater::
OnPasswordStoreRequestDone(
CancelableRequestProvider::Handle handle,
- const std::vector<webkit_glue::PasswordForm*>& result) {
+ const std::vector<webkit::forms::PasswordForm*>& result) {
DCHECK_EQ(pending_login_query_, handle);
pending_login_query_ = 0;
page_->password_list_.reset();
@@ -281,7 +281,7 @@ void PasswordManagerHandler::PasswordExceptionListPopulater::Populate() {
void PasswordManagerHandler::PasswordExceptionListPopulater::
OnPasswordStoreRequestDone(
CancelableRequestProvider::Handle handle,
- const std::vector<webkit_glue::PasswordForm*>& result) {
+ const std::vector<webkit::forms::PasswordForm*>& result) {
DCHECK_EQ(pending_login_query_, handle);
pending_login_query_ = 0;
page_->password_exception_list_.reset();
diff --git a/chrome/browser/ui/webui/options2/password_manager_handler.h b/chrome/browser/ui/webui/options2/password_manager_handler.h
index 389f1af..475c431 100644
--- a/chrome/browser/ui/webui/options2/password_manager_handler.h
+++ b/chrome/browser/ui/webui/options2/password_manager_handler.h
@@ -14,6 +14,12 @@
#include "chrome/browser/prefs/pref_member.h"
#include "chrome/browser/ui/webui/options2/options_ui2.h"
+namespace webkit {
+namespace forms {
+struct PasswordForm;
+}
+}
+
class PasswordManagerHandler : public OptionsPage2UIHandler,
public PasswordStore::Observer {
public:
@@ -75,7 +81,7 @@ class PasswordManagerHandler : public OptionsPage2UIHandler,
// Send the password store's reply back to the handler.
virtual void OnPasswordStoreRequestDone(
CancelableRequestProvider::Handle handle,
- const std::vector<webkit_glue::PasswordForm*>& result) = 0;
+ const std::vector<webkit::forms::PasswordForm*>& result) = 0;
protected:
PasswordManagerHandler* page_;
@@ -93,7 +99,7 @@ class PasswordManagerHandler : public OptionsPage2UIHandler,
// Send the password store's reply back to the handler.
virtual void OnPasswordStoreRequestDone(
CancelableRequestProvider::Handle handle,
- const std::vector<webkit_glue::PasswordForm*>& result) OVERRIDE;
+ const std::vector<webkit::forms::PasswordForm*>& result) OVERRIDE;
};
// A short class to mediate requests to the password store for exceptions.
@@ -107,15 +113,15 @@ class PasswordManagerHandler : public OptionsPage2UIHandler,
// Send the password store's reply back to the handler.
virtual void OnPasswordStoreRequestDone(
CancelableRequestProvider::Handle handle,
- const std::vector<webkit_glue::PasswordForm*>& result) OVERRIDE;
+ const std::vector<webkit::forms::PasswordForm*>& result) OVERRIDE;
};
// Password store consumer for populating the password list and exceptions.
PasswordListPopulater populater_;
PasswordExceptionListPopulater exception_populater_;
- ScopedVector<webkit_glue::PasswordForm> password_list_;
- ScopedVector<webkit_glue::PasswordForm> password_exception_list_;
+ ScopedVector<webkit::forms::PasswordForm> password_list_;
+ ScopedVector<webkit::forms::PasswordForm> password_exception_list_;
// User's pref
std::string languages_;
diff --git a/chrome/browser/webdata/autofill_table.cc b/chrome/browser/webdata/autofill_table.cc
index 588afba..4e9ea0b 100644
--- a/chrome/browser/webdata/autofill_table.cc
+++ b/chrome/browser/webdata/autofill_table.cc
@@ -26,10 +26,10 @@
#include "chrome/common/guid.h"
#include "sql/statement.h"
#include "ui/base/l10n/l10n_util.h"
-#include "webkit/glue/form_field.h"
+#include "webkit/forms/form_field.h"
using base::Time;
-using webkit_glue::FormField;
+using webkit::forms::FormField;
namespace {
diff --git a/chrome/browser/webdata/autofill_table.h b/chrome/browser/webdata/autofill_table.h
index 4af24b2..b2212c3 100644
--- a/chrome/browser/webdata/autofill_table.h
+++ b/chrome/browser/webdata/autofill_table.h
@@ -23,9 +23,11 @@ namespace base {
class Time;
}
-namespace webkit_glue {
+namespace webkit {
+namespace forms {
struct FormField;
}
+}
// This class manages the various autofill tables within the SQLite database
// passed to the constructor. It expects the following schemas:
@@ -125,13 +127,13 @@ class AutofillTable : public WebDatabaseTable {
// Records the form elements in |elements| in the database in the
// autofill table. A list of all added and updated autofill entries
// is returned in the changes out parameter.
- bool AddFormFieldValues(const std::vector<webkit_glue::FormField>& elements,
+ bool AddFormFieldValues(const std::vector<webkit::forms::FormField>& elements,
std::vector<AutofillChange>* changes);
// Records a single form element in the database in the autofill table. A list
// of all added and updated autofill entries is returned in the changes out
// parameter.
- bool AddFormFieldValue(const webkit_glue::FormField& element,
+ bool AddFormFieldValue(const webkit::forms::FormField& element,
std::vector<AutofillChange>* changes);
// Retrieves a vector of all values which have been recorded in the autofill
@@ -167,7 +169,7 @@ class AutofillTable : public WebDatabaseTable {
// Gets the pair_id and count entries from name and value specified in
// |element|. Sets *pair_id and *count to 0 if there is no such row in
// the table.
- bool GetIDAndCountOfFormElement(const webkit_glue::FormField& element,
+ bool GetIDAndCountOfFormElement(const webkit::forms::FormField& element,
int64* pair_id,
int* count);
@@ -179,7 +181,8 @@ class AutofillTable : public WebDatabaseTable {
// Adds a new row to the autofill table with name and value given in
// |element|. Sets *pair_id to the pair_id of the new row.
- bool InsertFormElement(const webkit_glue::FormField& element, int64* pair_id);
+ bool InsertFormElement(const webkit::forms::FormField& element,
+ int64* pair_id);
// Adds a new row to the autofill_dates table.
bool InsertPairIDAndDate(int64 pair_id, const base::Time& date_created);
@@ -308,10 +311,10 @@ class AutofillTable : public WebDatabaseTable {
// Methods for adding autofill entries at a specified time. For
// testing only.
bool AddFormFieldValuesTime(
- const std::vector<webkit_glue::FormField>& elements,
+ const std::vector<webkit::forms::FormField>& elements,
std::vector<AutofillChange>* changes,
base::Time time);
- bool AddFormFieldValueTime(const webkit_glue::FormField& element,
+ bool AddFormFieldValueTime(const webkit::forms::FormField& element,
std::vector<AutofillChange>* changes,
base::Time time);
diff --git a/chrome/browser/webdata/autofill_table_unittest.cc b/chrome/browser/webdata/autofill_table_unittest.cc
index 4b2e61e..0dccfb7 100644
--- a/chrome/browser/webdata/autofill_table_unittest.cc
+++ b/chrome/browser/webdata/autofill_table_unittest.cc
@@ -21,11 +21,11 @@
#include "chrome/common/guid.h"
#include "sql/statement.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "webkit/glue/form_field.h"
+#include "webkit/forms/form_field.h"
using base::Time;
using base::TimeDelta;
-using webkit_glue::FormField;
+using webkit::forms::FormField;
// So we can compare AutofillKeys with EXPECT_EQ().
std::ostream& operator<<(std::ostream& os, const AutofillKey& key) {
diff --git a/chrome/browser/webdata/logins_table.cc b/chrome/browser/webdata/logins_table.cc
index a1dc2ba..4ba1d2f 100644
--- a/chrome/browser/webdata/logins_table.cc
+++ b/chrome/browser/webdata/logins_table.cc
@@ -10,9 +10,9 @@
#include "base/logging.h"
#include "chrome/browser/password_manager/encryptor.h"
#include "sql/statement.h"
-#include "webkit/glue/password_form.h"
+#include "webkit/forms/password_form.h"
-using webkit_glue::PasswordForm;
+using webkit::forms::PasswordForm;
namespace {
diff --git a/chrome/browser/webdata/logins_table.h b/chrome/browser/webdata/logins_table.h
index f5ff728b..f08d544 100644
--- a/chrome/browser/webdata/logins_table.h
+++ b/chrome/browser/webdata/logins_table.h
@@ -15,9 +15,11 @@ namespace base {
class Time;
}
-namespace webkit_glue {
+namespace webkit {
+namespace forms {
struct PasswordForm;
}
+}
#if defined(OS_WIN)
struct IE7PasswordInfo;
@@ -55,7 +57,7 @@ class LoginsTable : public WebDatabaseTable {
virtual bool IsSyncable() OVERRIDE;
// Adds |form| to the list of remembered password forms.
- bool AddLogin(const webkit_glue::PasswordForm& form);
+ bool AddLogin(const webkit::forms::PasswordForm& form);
#if defined(OS_WIN)
// Adds |info| to the list of imported passwords from ie7/ie8.
@@ -69,10 +71,10 @@ class LoginsTable : public WebDatabaseTable {
#endif
// Updates remembered password form.
- bool UpdateLogin(const webkit_glue::PasswordForm& form);
+ bool UpdateLogin(const webkit::forms::PasswordForm& form);
// Removes |form| from the list of remembered password forms.
- bool RemoveLogin(const webkit_glue::PasswordForm& form);
+ bool RemoveLogin(const webkit::forms::PasswordForm& form);
// Removes all logins created from |delete_begin| onwards (inclusive) and
// before |delete_end|. You may use a null Time value to do an unbounded
@@ -83,14 +85,14 @@ class LoginsTable : public WebDatabaseTable {
// Loads a list of matching password forms into the specified vector |forms|.
// The list will contain all possibly relevant entries to the observed |form|,
// including blacklisted matches.
- bool GetLogins(const webkit_glue::PasswordForm& form,
- std::vector<webkit_glue::PasswordForm*>* forms);
+ bool GetLogins(const webkit::forms::PasswordForm& form,
+ std::vector<webkit::forms::PasswordForm*>* forms);
// Loads the complete list of password forms into the specified vector |forms|
// if include_blacklisted is true, otherwise only loads those which are
// actually autofill-able; i.e haven't been blacklisted by the user selecting
// the 'Never for this site' button.
- bool GetAllLogins(std::vector<webkit_glue::PasswordForm*>* forms,
+ bool GetAllLogins(std::vector<webkit::forms::PasswordForm*>* forms,
bool include_blacklisted);
private:
diff --git a/chrome/browser/webdata/logins_table_unittest.cc b/chrome/browser/webdata/logins_table_unittest.cc
index 9291fca..3d3b587 100644
--- a/chrome/browser/webdata/logins_table_unittest.cc
+++ b/chrome/browser/webdata/logins_table_unittest.cc
@@ -11,11 +11,11 @@
#include "chrome/browser/webdata/web_database.h"
#include "chrome/common/chrome_paths.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "webkit/glue/password_form.h"
+#include "webkit/forms/password_form.h"
using base::Time;
using base::TimeDelta;
-using webkit_glue::PasswordForm;
+using webkit::forms::PasswordForm;
class LoginsTableTest : public testing::Test {
public:
diff --git a/chrome/browser/webdata/web_data_service.cc b/chrome/browser/webdata/web_data_service.cc
index edae09b..f260fe9 100644
--- a/chrome/browser/webdata/web_data_service.cc
+++ b/chrome/browser/webdata/web_data_service.cc
@@ -23,18 +23,18 @@
#include "chrome/browser/webdata/logins_table.h"
#include "chrome/browser/webdata/token_service_table.h"
#include "chrome/browser/webdata/web_apps_table.h"
-#include "chrome/browser/webdata/web_intents_table.h"
#include "chrome/browser/webdata/web_database.h"
+#include "chrome/browser/webdata/web_intents_table.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "third_party/skia/include/core/SkBitmap.h"
-#include "webkit/glue/form_field.h"
-#include "webkit/glue/password_form.h"
+#include "webkit/forms/form_field.h"
+#include "webkit/forms/password_form.h"
////////////////////////////////////////////////////////////////////////////////
//
@@ -45,8 +45,8 @@
using base::Bind;
using base::Time;
using content::BrowserThread;
-using webkit_glue::FormField;
-using webkit_glue::PasswordForm;
+using webkit::forms::FormField;
+using webkit::forms::PasswordForm;
using webkit_glue::WebIntentServiceData;
namespace {
diff --git a/chrome/browser/webdata/web_data_service.h b/chrome/browser/webdata/web_data_service.h
index 8c43b30..eedc118 100644
--- a/chrome/browser/webdata/web_data_service.h
+++ b/chrome/browser/webdata/web_data_service.h
@@ -38,9 +38,14 @@ namespace base {
class Thread;
}
-namespace webkit_glue {
+namespace webkit {
+namespace forms {
struct FormField;
struct PasswordForm;
+}
+}
+
+namespace webkit_glue {
struct WebIntentServiceData;
}
@@ -410,13 +415,13 @@ class WebDataService
//////////////////////////////////////////////////////////////////////////////
// Adds |form| to the list of remembered password forms.
- void AddLogin(const webkit_glue::PasswordForm& form);
+ void AddLogin(const webkit::forms::PasswordForm& form);
// Updates the remembered password form.
- void UpdateLogin(const webkit_glue::PasswordForm& form);
+ void UpdateLogin(const webkit::forms::PasswordForm& form);
// Removes |form| from the list of remembered password forms.
- void RemoveLogin(const webkit_glue::PasswordForm& form);
+ void RemoveLogin(const webkit::forms::PasswordForm& form);
// Removes all logins created in the specified daterange
void RemoveLoginsCreatedBetween(const base::Time& delete_begin,
@@ -429,7 +434,7 @@ class WebDataService
// |consumer| will be notified when the request is done. The result is of
// type WDResult<std::vector<PasswordForm*>>.
// The result will be null on failure. The |consumer| owns all PasswordForm's.
- Handle GetLogins(const webkit_glue::PasswordForm& form,
+ Handle GetLogins(const webkit::forms::PasswordForm& form,
WebDataServiceConsumer* consumer);
// Gets the complete list of password forms that have not been blacklisted and
@@ -467,7 +472,8 @@ class WebDataService
//////////////////////////////////////////////////////////////////////////////
// Schedules a task to add form fields to the web database.
- virtual void AddFormFields(const std::vector<webkit_glue::FormField>& fields);
+ virtual void AddFormFields(
+ const std::vector<webkit::forms::FormField>& fields);
// Initiates the request for a vector of values which have been entered in
// form input fields named |name|. The method OnWebDataServiceRequestDone of
@@ -653,12 +659,12 @@ class WebDataService
// Password manager.
//
//////////////////////////////////////////////////////////////////////////////
- void AddLoginImpl(GenericRequest<webkit_glue::PasswordForm>* request);
- void UpdateLoginImpl(GenericRequest<webkit_glue::PasswordForm>* request);
- void RemoveLoginImpl(GenericRequest<webkit_glue::PasswordForm>* request);
+ void AddLoginImpl(GenericRequest<webkit::forms::PasswordForm>* request);
+ void UpdateLoginImpl(GenericRequest<webkit::forms::PasswordForm>* request);
+ void RemoveLoginImpl(GenericRequest<webkit::forms::PasswordForm>* request);
void RemoveLoginsCreatedBetweenImpl(
GenericRequest2<base::Time, base::Time>* request);
- void GetLoginsImpl(GenericRequest<webkit_glue::PasswordForm>* request);
+ void GetLoginsImpl(GenericRequest<webkit::forms::PasswordForm>* request);
void GetAutofillableLoginsImpl(WebDataRequest* request);
void GetBlacklistLoginsImpl(WebDataRequest* request);
#if defined(OS_WIN)
@@ -673,7 +679,7 @@ class WebDataService
//
//////////////////////////////////////////////////////////////////////////////
void AddFormElementsImpl(
- GenericRequest<std::vector<webkit_glue::FormField> >* request);
+ GenericRequest<std::vector<webkit::forms::FormField> >* request);
void GetFormValuesForElementNameImpl(WebDataRequest* request,
const string16& name, const string16& prefix, int limit);
void RemoveFormElementsAddedBetweenImpl(
diff --git a/chrome/browser/webdata/web_data_service_unittest.cc b/chrome/browser/webdata/web_data_service_unittest.cc
index 8006e8a..a6e4891 100644
--- a/chrome/browser/webdata/web_data_service_unittest.cc
+++ b/chrome/browser/webdata/web_data_service_unittest.cc
@@ -33,7 +33,7 @@
#include "content/test/test_browser_thread.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "webkit/glue/form_field.h"
+#include "webkit/forms/form_field.h"
using base::Time;
using base::TimeDelta;
@@ -129,8 +129,8 @@ class WebDataServiceAutofillTest : public WebDataServiceTest {
void AppendFormField(const string16& name,
const string16& value,
- std::vector<webkit_glue::FormField>* form_fields) {
- webkit_glue::FormField field;
+ std::vector<webkit::forms::FormField>* form_fields) {
+ webkit::forms::FormField field;
field.name = name;
field.value = value;
form_fields->push_back(field);
@@ -224,7 +224,7 @@ TEST_F(WebDataServiceAutofillTest, FormFillAdd) {
Pointee(ElementsAreArray(expected_changes))))).
WillOnce(SignalEvent(&done_event_));
- std::vector<webkit_glue::FormField> form_fields;
+ std::vector<webkit::forms::FormField> form_fields;
AppendFormField(name1_, value1_, &form_fields);
AppendFormField(name2_, value2_, &form_fields);
wds_->AddFormFields(form_fields);
@@ -250,7 +250,7 @@ TEST_F(WebDataServiceAutofillTest, FormFillRemoveOne) {
// First add some values to autofill.
EXPECT_CALL(*observer_helper_->observer(), Observe(_, _, _)).
WillOnce(SignalEvent(&done_event_));
- std::vector<webkit_glue::FormField> form_fields;
+ std::vector<webkit::forms::FormField> form_fields;
AppendFormField(name1_, value1_, &form_fields);
wds_->AddFormFields(form_fields);
@@ -281,7 +281,7 @@ TEST_F(WebDataServiceAutofillTest, FormFillRemoveMany) {
EXPECT_CALL(*observer_helper_->observer(), Observe(_, _, _)).
WillOnce(SignalEvent(&done_event_));
- std::vector<webkit_glue::FormField> form_fields;
+ std::vector<webkit::forms::FormField> form_fields;
AppendFormField(name1_, value1_, &form_fields);
AppendFormField(name2_, value2_, &form_fields);
wds_->AddFormFields(form_fields);
diff --git a/chrome/common/DEPS b/chrome/common/DEPS
index bb31298..e637574 100644
--- a/chrome/common/DEPS
+++ b/chrome/common/DEPS
@@ -8,6 +8,7 @@ include_rules = [
"+remoting/client/plugin",
"+sandbox/src",
"+skia",
+ "+webkit/forms", # Defines some types that are marshalled over IPC.
"+webkit/glue",
"+webkit/plugins",
diff --git a/chrome/common/autofill_messages.h b/chrome/common/autofill_messages.h
index 39befaa..95adf65 100644
--- a/chrome/common/autofill_messages.h
+++ b/chrome/common/autofill_messages.h
@@ -11,16 +11,16 @@
#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_message_utils.h"
#include "ui/gfx/rect.h"
-#include "webkit/glue/form_data.h"
-#include "webkit/glue/form_data_predictions.h"
-#include "webkit/glue/form_field.h"
-#include "webkit/glue/form_field_predictions.h"
-#include "webkit/glue/password_form.h"
-#include "webkit/glue/password_form_dom_manager.h"
+#include "webkit/forms/form_data.h"
+#include "webkit/forms/form_data_predictions.h"
+#include "webkit/forms/form_field.h"
+#include "webkit/forms/form_field_predictions.h"
+#include "webkit/forms/password_form.h"
+#include "webkit/forms/password_form_dom_manager.h"
#define IPC_MESSAGE_START AutofillMsgStart
-IPC_STRUCT_TRAITS_BEGIN(webkit_glue::FormField)
+IPC_STRUCT_TRAITS_BEGIN(webkit::forms::FormField)
IPC_STRUCT_TRAITS_MEMBER(label)
IPC_STRUCT_TRAITS_MEMBER(name)
IPC_STRUCT_TRAITS_MEMBER(value)
@@ -34,7 +34,7 @@ IPC_STRUCT_TRAITS_BEGIN(webkit_glue::FormField)
IPC_STRUCT_TRAITS_MEMBER(option_contents)
IPC_STRUCT_TRAITS_END()
-IPC_STRUCT_TRAITS_BEGIN(webkit_glue::FormFieldPredictions)
+IPC_STRUCT_TRAITS_BEGIN(webkit::forms::FormFieldPredictions)
IPC_STRUCT_TRAITS_MEMBER(field)
IPC_STRUCT_TRAITS_MEMBER(signature)
IPC_STRUCT_TRAITS_MEMBER(heuristic_type)
@@ -42,7 +42,7 @@ IPC_STRUCT_TRAITS_BEGIN(webkit_glue::FormFieldPredictions)
IPC_STRUCT_TRAITS_MEMBER(overall_type)
IPC_STRUCT_TRAITS_END()
-IPC_STRUCT_TRAITS_BEGIN(webkit_glue::FormData)
+IPC_STRUCT_TRAITS_BEGIN(webkit::forms::FormData)
IPC_STRUCT_TRAITS_MEMBER(name)
IPC_STRUCT_TRAITS_MEMBER(method)
IPC_STRUCT_TRAITS_MEMBER(origin)
@@ -51,14 +51,14 @@ IPC_STRUCT_TRAITS_BEGIN(webkit_glue::FormData)
IPC_STRUCT_TRAITS_MEMBER(fields)
IPC_STRUCT_TRAITS_END()
-IPC_STRUCT_TRAITS_BEGIN(webkit_glue::FormDataPredictions)
+IPC_STRUCT_TRAITS_BEGIN(webkit::forms::FormDataPredictions)
IPC_STRUCT_TRAITS_MEMBER(data)
IPC_STRUCT_TRAITS_MEMBER(signature)
IPC_STRUCT_TRAITS_MEMBER(experiment_id)
IPC_STRUCT_TRAITS_MEMBER(fields)
IPC_STRUCT_TRAITS_END()
-IPC_STRUCT_TRAITS_BEGIN(webkit_glue::PasswordFormFillData)
+IPC_STRUCT_TRAITS_BEGIN(webkit::forms::PasswordFormFillData)
IPC_STRUCT_TRAITS_MEMBER(basic_data)
IPC_STRUCT_TRAITS_MEMBER(additional_logins)
IPC_STRUCT_TRAITS_MEMBER(wait_for_username)
@@ -79,17 +79,17 @@ IPC_MESSAGE_ROUTED5(AutofillMsg_SuggestionsReturned,
// Autofill form data.
IPC_MESSAGE_ROUTED2(AutofillMsg_FormDataFilled,
int /* id of the request message */,
- webkit_glue::FormData /* form data */)
+ webkit::forms::FormData /* form data */)
// Fill a password form and prepare field autocomplete for multiple
// matching logins.
IPC_MESSAGE_ROUTED1(AutofillMsg_FillPasswordForm,
- webkit_glue::PasswordFormFillData)
+ webkit::forms::PasswordFormFillData)
// Send the heuristic and server field type predictions to the renderer.
IPC_MESSAGE_ROUTED1(
AutofillMsg_FieldTypePredictionsAvailable,
- std::vector<webkit_glue::FormDataPredictions> /* forms */)
+ std::vector<webkit::forms::FormDataPredictions> /* forms */)
// Select an Autofill item when using an external delegate.
IPC_MESSAGE_ROUTED1(AutofillMsg_SelectAutofillSuggestionAtIndex,
@@ -100,35 +100,35 @@ IPC_MESSAGE_ROUTED1(AutofillMsg_SelectAutofillSuggestionAtIndex,
// Notification that forms have been seen that are candidates for
// filling/submitting by the AutofillManager.
IPC_MESSAGE_ROUTED2(AutofillHostMsg_FormsSeen,
- std::vector<webkit_glue::FormData> /* forms */,
+ std::vector<webkit::forms::FormData> /* forms */,
base::TimeTicks /* timestamp */)
// Notification that password forms have been seen that are candidates for
// filling/submitting by the password manager.
IPC_MESSAGE_ROUTED1(AutofillHostMsg_PasswordFormsFound,
- std::vector<webkit_glue::PasswordForm> /* forms */)
+ std::vector<webkit::forms::PasswordForm> /* forms */)
// Notification that initial layout has occurred and the following password
// forms are visible on the page (e.g. not set to display:none.)
IPC_MESSAGE_ROUTED1(AutofillHostMsg_PasswordFormsVisible,
- std::vector<webkit_glue::PasswordForm> /* forms */)
+ std::vector<webkit::forms::PasswordForm> /* forms */)
// Notification that a form has been submitted. The user hit the button.
IPC_MESSAGE_ROUTED2(AutofillHostMsg_FormSubmitted,
- webkit_glue::FormData /* form */,
+ webkit::forms::FormData /* form */,
base::TimeTicks /* timestamp */)
// Notification that a form field's value has changed.
IPC_MESSAGE_ROUTED3(AutofillHostMsg_TextFieldDidChange,
- webkit_glue::FormData /* the form */,
- webkit_glue::FormField /* the form field */,
+ webkit::forms::FormData /* the form */,
+ webkit::forms::FormField /* the form field */,
base::TimeTicks /* timestamp */)
// Queries the browser for Autofill suggestions for a form input field.
IPC_MESSAGE_ROUTED5(AutofillHostMsg_QueryFormFieldAutofill,
int /* id of this message */,
- webkit_glue::FormData /* the form */,
- webkit_glue::FormField /* the form field */,
+ webkit::forms::FormData /* the form */,
+ webkit::forms::FormField /* the form field */,
gfx::Rect /* input field bounds, window-relative */,
bool /* display warning if autofill disabled */)
@@ -140,8 +140,8 @@ IPC_MESSAGE_ROUTED1(AutofillHostMsg_DidShowAutofillSuggestions,
// profile data.
IPC_MESSAGE_ROUTED4(AutofillHostMsg_FillAutofillFormData,
int /* id of this message */,
- webkit_glue::FormData /* the form */,
- webkit_glue::FormField /* the form field */,
+ webkit::forms::FormData /* the form */,
+ webkit::forms::FormField /* the form field */,
int /* profile unique ID */)
// Sent when a form is previewed with Autofill suggestions.
diff --git a/chrome/common/chrome_notification_types.h b/chrome/common/chrome_notification_types.h
index 98a0bde..80b2143 100644
--- a/chrome/common/chrome_notification_types.h
+++ b/chrome/common/chrome_notification_types.h
@@ -882,7 +882,7 @@ enum NotificationType {
// store are changed. The detail of this notification is a list of changes
// represented by a vector of PasswordStoreChange. Each change includes a
// change type (ADD, UPDATE, or REMOVE) as well as the
- // |webkit_glue::PasswordForm|s that were affected.
+ // |webkit::forms::PasswordForm|s that were affected.
NOTIFICATION_LOGINS_CHANGED,
// Sent when an import process has ended.
diff --git a/chrome/renderer/DEPS b/chrome/renderer/DEPS
index 9ac9fae..5876b28 100644
--- a/chrome/renderer/DEPS
+++ b/chrome/renderer/DEPS
@@ -12,6 +12,7 @@ include_rules = [
"+sandbox/src",
"+skia",
"+webkit/extensions",
+ "+webkit/forms", # Defines some types that are marshalled over IPC.
"+webkit/glue",
"+webkit/glue/plugins",
"+webkit/gpu",
diff --git a/chrome/renderer/autofill/autofill_agent.cc b/chrome/renderer/autofill/autofill_agent.cc
index 7d1f915..e6cc6ad 100644
--- a/chrome/renderer/autofill/autofill_agent.cc
+++ b/chrome/renderer/autofill/autofill_agent.cc
@@ -19,14 +19,14 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h"
#include "ui/base/keycodes/keyboard_codes.h"
#include "ui/base/l10n/l10n_util.h"
-#include "webkit/glue/form_data.h"
-#include "webkit/glue/form_data_predictions.h"
-#include "webkit/glue/form_field.h"
-#include "webkit/glue/password_form.h"
+#include "webkit/forms/form_data.h"
+#include "webkit/forms/form_data_predictions.h"
+#include "webkit/forms/form_field.h"
+#include "webkit/forms/password_form.h"
using WebKit::WebFormControlElement;
using WebKit::WebFormElement;
@@ -35,8 +35,8 @@ using WebKit::WebInputElement;
using WebKit::WebKeyboardEvent;
using WebKit::WebNode;
using WebKit::WebString;
-using webkit_glue::FormData;
-using webkit_glue::FormDataPredictions;
+using webkit::forms::FormData;
+using webkit::forms::FormDataPredictions;
namespace {
@@ -83,7 +83,7 @@ bool AutofillAgent::OnMessageReceived(const IPC::Message& message) {
void AutofillAgent::DidFinishDocumentLoad(WebFrame* frame) {
// The document has now been fully loaded. Scan for forms to be sent up to
// the browser.
- std::vector<webkit_glue::FormData> forms;
+ std::vector<webkit::forms::FormData> forms;
form_cache_.ExtractForms(*frame, &forms);
if (!forms.empty()) {
@@ -226,8 +226,8 @@ void AutofillAgent::TextFieldDidChangeImpl(const WebInputElement& element) {
ShowSuggestions(element, false, true, false);
- webkit_glue::FormData form;
- webkit_glue::FormField field;
+ webkit::forms::FormData form;
+ webkit::forms::FormField field;
if (FindFormAndFieldForInputElement(element, &form, &field, REQUIRE_NONE)) {
Send(new AutofillHostMsg_TextFieldDidChange(routing_id(), form, field,
base::TimeTicks::Now()));
@@ -333,7 +333,7 @@ void AutofillAgent::OnSuggestionsReturned(int query_id,
}
void AutofillAgent::OnFormDataFilled(int query_id,
- const webkit_glue::FormData& form) {
+ const webkit::forms::FormData& form) {
if (!render_view()->GetWebView() || query_id != autofill_query_id_)
return;
@@ -409,8 +409,8 @@ void AutofillAgent::QueryAutofillSuggestions(const WebInputElement& element,
autofill_query_element_ = element;
display_warning_if_disabled_ = display_warning_if_disabled;
- webkit_glue::FormData form;
- webkit_glue::FormField field;
+ webkit::forms::FormData form;
+ webkit::forms::FormField field;
if (!FindFormAndFieldForInputElement(element, &form, &field,
REQUIRE_AUTOCOMPLETE)) {
// If we didn't find the cached form, at least let autocomplete have a shot
@@ -437,8 +437,8 @@ void AutofillAgent::FillAutofillFormData(const WebNode& node,
static int query_counter = 0;
autofill_query_id_ = query_counter++;
- webkit_glue::FormData form;
- webkit_glue::FormField field;
+ webkit::forms::FormData form;
+ webkit::forms::FormField field;
if (!FindFormAndFieldForInputElement(node.toConst<WebInputElement>(), &form,
&field, REQUIRE_AUTOCOMPLETE)) {
return;
diff --git a/chrome/renderer/autofill/autofill_agent.h b/chrome/renderer/autofill/autofill_agent.h
index 38a2e5d..85ea7e6 100644
--- a/chrome/renderer/autofill/autofill_agent.h
+++ b/chrome/renderer/autofill/autofill_agent.h
@@ -18,11 +18,13 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebAutofillClient.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h"
-namespace webkit_glue {
+namespace webkit {
+namespace forms {
struct FormData;
struct FormDataPredictions;
struct FormField;
}
+}
namespace WebKit {
class WebNode;
@@ -97,9 +99,9 @@ class AutofillAgent : public content::RenderViewObserver,
const std::vector<string16>& labels,
const std::vector<string16>& icons,
const std::vector<int>& unique_ids);
- void OnFormDataFilled(int query_id, const webkit_glue::FormData& form);
+ void OnFormDataFilled(int query_id, const webkit::forms::FormData& form);
void OnFieldTypePredictionsAvailable(
- const std::vector<webkit_glue::FormDataPredictions>& forms);
+ const std::vector<webkit::forms::FormDataPredictions>& forms);
// For external Autofill selection.
void OnSelectAutofillSuggestionAtIndex(int listIndex);
@@ -141,8 +143,8 @@ class AutofillAgent : public content::RenderViewObserver,
// |node|. Returns true if the data was found; and false otherwise.
bool FindFormAndFieldForNode(
const WebKit::WebNode& node,
- webkit_glue::FormData* form,
- webkit_glue::FormField* field) WARN_UNUSED_RESULT;
+ webkit::forms::FormData* form,
+ webkit::forms::FormField* field) WARN_UNUSED_RESULT;
FormCache form_cache_;
diff --git a/chrome/renderer/autofill/autofill_browsertest.cc b/chrome/renderer/autofill/autofill_browsertest.cc
index 699a670..50694dd 100644
--- a/chrome/renderer/autofill/autofill_browsertest.cc
+++ b/chrome/renderer/autofill/autofill_browsertest.cc
@@ -9,15 +9,15 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
-#include "webkit/glue/form_data.h"
-#include "webkit/glue/form_field.h"
+#include "webkit/forms/form_data.h"
+#include "webkit/forms/form_field.h"
using WebKit::WebDocument;
using WebKit::WebFrame;
using WebKit::WebInputElement;
using WebKit::WebString;
-using webkit_glue::FormData;
-using webkit_glue::FormField;
+using webkit::forms::FormData;
+using webkit::forms::FormField;
namespace autofill {
diff --git a/chrome/renderer/autofill/form_autocomplete_browsertest.cc b/chrome/renderer/autofill/form_autocomplete_browsertest.cc
index 6613424..0e5d662 100644
--- a/chrome/renderer/autofill/form_autocomplete_browsertest.cc
+++ b/chrome/renderer/autofill/form_autocomplete_browsertest.cc
@@ -10,10 +10,10 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFormElement.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLError.h"
-#include "webkit/glue/form_data.h"
+#include "webkit/forms/form_data.h"
#include "webkit/glue/web_io_operators.h"
-using webkit_glue::FormData;
+using webkit::forms::FormData;
using WebKit::WebFrame;
using WebKit::WebString;
using WebKit::WebTextDirection;
@@ -41,7 +41,7 @@ TEST_F(FormAutocompleteTest, NormalFormSubmit) {
AutofillHostMsg_FormSubmitted::Read(message, &forms);
ASSERT_EQ(2U, forms.a.fields.size());
- webkit_glue::FormField& form_field = forms.a.fields[0];
+ webkit::forms::FormField& form_field = forms.a.fields[0];
EXPECT_EQ(WebString("fname"), form_field.name);
EXPECT_EQ(WebString("Rick"), form_field.value);
@@ -90,7 +90,7 @@ TEST_F(FormAutocompleteTest, AutoCompleteOffInputSubmit) {
AutofillHostMsg_FormSubmitted::Read(message, &forms);
ASSERT_EQ(1U, forms.a.fields.size());
- webkit_glue::FormField& form_field = forms.a.fields[0];
+ webkit::forms::FormField& form_field = forms.a.fields[0];
EXPECT_EQ(WebString("fname"), form_field.name);
EXPECT_EQ(WebString("Rick"), form_field.value);
}
diff --git a/chrome/renderer/autofill/form_autofill_browsertest.cc b/chrome/renderer/autofill/form_autofill_browsertest.cc
index 45f06f6..ef2690d 100644
--- a/chrome/renderer/autofill/form_autofill_browsertest.cc
+++ b/chrome/renderer/autofill/form_autofill_browsertest.cc
@@ -22,7 +22,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSelectElement.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h"
-#include "webkit/glue/form_data.h"
+#include "webkit/forms/form_data.h"
#include "webkit/glue/web_io_operators.h"
using WebKit::WebDocument;
@@ -44,8 +44,8 @@ using autofill::FormCache;
using autofill::PreviewForm;
using autofill::WebFormControlElementToFormField;
-using webkit_glue::FormData;
-using webkit_glue::FormField;
+using webkit::forms::FormData;
+using webkit::forms::FormField;
class FormAutofillTest : public ChromeRenderViewTest {
public:
diff --git a/chrome/renderer/autofill/form_autofill_util.cc b/chrome/renderer/autofill/form_autofill_util.cc
index 297cdc7..d34dbf6 100644
--- a/chrome/renderer/autofill/form_autofill_util.cc
+++ b/chrome/renderer/autofill/form_autofill_util.cc
@@ -13,8 +13,8 @@
#include "base/utf_string_conversions.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebFormElement.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFormControlElement.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebFormElement.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebLabelElement.h"
@@ -24,8 +24,8 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSelectElement.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h"
-#include "webkit/glue/form_data.h"
-#include "webkit/glue/form_field.h"
+#include "webkit/forms/form_data.h"
+#include "webkit/forms/form_field.h"
using WebKit::WebElement;
using WebKit::WebFormControlElement;
@@ -39,8 +39,8 @@ using WebKit::WebOptionElement;
using WebKit::WebSelectElement;
using WebKit::WebString;
using WebKit::WebVector;
-using webkit_glue::FormData;
-using webkit_glue::FormField;
+using webkit::forms::FormData;
+using webkit::forms::FormField;
namespace {
@@ -417,7 +417,7 @@ void GetOptionStringsFromElement(const WebSelectElement& select_element,
// The callback type used by |ForEachMatchingFormField()|.
typedef void (*Callback)(WebKit::WebFormControlElement*,
- const webkit_glue::FormField*,
+ const webkit::forms::FormField*,
bool);
// For each autofillable field in |data| that matches a field in the |form|,
@@ -479,7 +479,7 @@ void ForEachMatchingFormField(const WebFormElement& form_element,
// Sets the |field|'s value to the value in |data|.
// Also sets the "autofilled" attribute, causing the background to be yellow.
void FillFormField(WebKit::WebFormControlElement* field,
- const webkit_glue::FormField* data,
+ const webkit::forms::FormField* data,
bool is_initiating_node) {
// Nothing to fill.
if (data->value.empty())
@@ -509,7 +509,7 @@ void FillFormField(WebKit::WebFormControlElement* field,
// Sets the |field|'s "suggested" (non JS visible) value to the value in |data|.
// Also sets the "autofilled" attribute, causing the background to be yellow.
void PreviewFormField(WebKit::WebFormControlElement* field,
- const webkit_glue::FormField* data,
+ const webkit::forms::FormField* data,
bool is_initiating_node) {
// Nothing to preview.
if (data->value.empty())
@@ -662,8 +662,8 @@ bool WebFormElementToFormData(
const WebKit::WebFormControlElement& form_control_element,
RequirementsMask requirements,
ExtractMask extract_mask,
- webkit_glue::FormData* form,
- webkit_glue::FormField* field) {
+ webkit::forms::FormData* form,
+ webkit::forms::FormField* field) {
const WebFrame* frame = form_element.document().frame();
if (!frame)
return false;
@@ -790,7 +790,7 @@ bool WebFormElementToFormData(
bool FindFormAndFieldForInputElement(const WebInputElement& element,
FormData* form,
- webkit_glue::FormField* field,
+ webkit::forms::FormField* field,
RequirementsMask requirements) {
if (!IsAutofillableElement(element))
return false;
diff --git a/chrome/renderer/autofill/form_autofill_util.h b/chrome/renderer/autofill/form_autofill_util.h
index 134cf6d..69b819c 100644
--- a/chrome/renderer/autofill/form_autofill_util.h
+++ b/chrome/renderer/autofill/form_autofill_util.h
@@ -10,16 +10,18 @@
#include "base/string16.h"
-namespace webkit_glue {
+namespace webkit {
+namespace forms {
struct FormData;
struct FormField;
-} // namespace webkit_glue
+}
+}
namespace WebKit {
class WebFormElement;
class WebFormControlElement;
class WebInputElement;
-} // namespace WebKit
+}
namespace autofill {
@@ -64,7 +66,7 @@ void ExtractAutofillableElements(
void WebFormControlElementToFormField(
const WebKit::WebFormControlElement& element,
ExtractMask extract_mask,
- webkit_glue::FormField* field);
+ webkit::forms::FormField* field);
// Fills |form| with the FormData object corresponding to the |form_element|.
// If |field| is non-NULL, also fills |field| with the FormField object
@@ -78,25 +80,25 @@ bool WebFormElementToFormData(
const WebKit::WebFormControlElement& form_control_element,
RequirementsMask requirements,
ExtractMask extract_mask,
- webkit_glue::FormData* form,
- webkit_glue::FormField* field);
+ webkit::forms::FormData* form,
+ webkit::forms::FormField* field);
// Finds the form that contains |element| and returns it in |form|. Fills
// |field| with the |FormField| representation for element.
// Returns false if the form is not found.
bool FindFormAndFieldForInputElement(const WebKit::WebInputElement& element,
- webkit_glue::FormData* form,
- webkit_glue::FormField* field,
+ webkit::forms::FormData* form,
+ webkit::forms::FormField* field,
RequirementsMask requirements);
// Fills the form represented by |form|. |element| is the input element that
// initiated the auto-fill process.
-void FillForm(const webkit_glue::FormData& form,
+void FillForm(const webkit::forms::FormData& form,
const WebKit::WebInputElement& element);
// Previews the form represented by |form|. |element| is the input element that
// initiated the preview process.
-void PreviewForm(const webkit_glue::FormData& form,
+void PreviewForm(const webkit::forms::FormData& form,
const WebKit::WebInputElement& element);
// Clears the placeholder values and the auto-filled background for any fields
diff --git a/chrome/renderer/autofill/form_cache.cc b/chrome/renderer/autofill/form_cache.cc
index acc0fee..9491210 100644
--- a/chrome/renderer/autofill/form_cache.cc
+++ b/chrome/renderer/autofill/form_cache.cc
@@ -17,10 +17,10 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h"
#include "ui/base/l10n/l10n_util.h"
-#include "webkit/glue/form_data.h"
-#include "webkit/glue/form_data_predictions.h"
-#include "webkit/glue/form_field.h"
-#include "webkit/glue/form_field_predictions.h"
+#include "webkit/forms/form_data.h"
+#include "webkit/forms/form_data_predictions.h"
+#include "webkit/forms/form_field.h"
+#include "webkit/forms/form_field_predictions.h"
using WebKit::WebDocument;
using WebKit::WebFormControlElement;
@@ -30,8 +30,8 @@ using WebKit::WebInputElement;
using WebKit::WebSelectElement;
using WebKit::WebString;
using WebKit::WebVector;
-using webkit_glue::FormData;
-using webkit_glue::FormDataPredictions;
+using webkit::forms::FormData;
+using webkit::forms::FormDataPredictions;
namespace {
diff --git a/chrome/renderer/autofill/form_cache.h b/chrome/renderer/autofill/form_cache.h
index a957524..f934c7e 100644
--- a/chrome/renderer/autofill/form_cache.h
+++ b/chrome/renderer/autofill/form_cache.h
@@ -12,17 +12,19 @@
#include "base/string16.h"
-namespace webkit_glue {
+namespace webkit {
+namespace forms {
struct FormData;
struct FormDataPredictions;
-} // namespace webkit_glue
+}
+}
namespace WebKit {
class WebDocument;
class WebFrame;
class WebInputElement;
class WebSelectElement;
-} // namespace WebKit
+}
namespace autofill {
@@ -35,7 +37,7 @@ class FormCache {
// Scans the DOM in |frame| extracting and storing forms.
// Returns a vector of the extracted forms.
void ExtractForms(const WebKit::WebFrame& frame,
- std::vector<webkit_glue::FormData>* forms);
+ std::vector<webkit::forms::FormData>* forms);
// Resets the forms for the specified |frame|.
void ResetFrame(const WebKit::WebFrame& frame);
@@ -48,7 +50,7 @@ class FormCache {
// field's overall predicted type. Also sets the title to include the field's
// heuristic type, server type, and signature; as well as the form's signature
// and the experiment id for the server predictions.
- bool ShowPredictions(const webkit_glue::FormDataPredictions& form);
+ bool ShowPredictions(const webkit::forms::FormDataPredictions& form);
private:
// The cached web frames.
diff --git a/chrome/renderer/autofill/password_autofill_manager.cc b/chrome/renderer/autofill/password_autofill_manager.cc
index 1377134..65dba44 100644
--- a/chrome/renderer/autofill/password_autofill_manager.cc
+++ b/chrome/renderer/autofill/password_autofill_manager.cc
@@ -15,12 +15,12 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h"
#include "ui/base/keycodes/keyboard_codes.h"
-#include "webkit/glue/form_field.h"
-#include "webkit/glue/password_form.h"
-#include "webkit/glue/password_form_dom_manager.h"
+#include "webkit/forms/form_field.h"
+#include "webkit/forms/password_form.h"
+#include "webkit/forms/password_form_dom_manager.h"
namespace {
@@ -46,7 +46,7 @@ typedef std::vector<FormElements*> FormElementsList;
// Helper to search the given form element for the specified input elements
// in |data|, and add results to |result|.
static bool FindFormInputElements(WebKit::WebFormElement* fe,
- const webkit_glue::FormData& data,
+ const webkit::forms::FormData& data,
FormElements* result) {
// Loop through the list of elements we need to find on the form in order to
// autofill it. If we don't find any one of them, abort processing this
@@ -94,7 +94,7 @@ static bool FindFormInputElements(WebKit::WebFormElement* fe,
// Helper to locate form elements identified by |data|.
void FindFormElements(WebKit::WebView* view,
- const webkit_glue::FormData& data,
+ const webkit::forms::FormData& data,
FormElementsList* results) {
DCHECK(view);
DCHECK(results);
@@ -148,7 +148,7 @@ bool IsElementEditable(const WebKit::WebInputElement& element) {
return element.isEnabled() && !element.isReadOnly();
}
-void FillForm(FormElements* fe, const webkit_glue::FormData& data) {
+void FillForm(FormElements* fe, const webkit::forms::FormData& data) {
if (!fe->form_element.autoComplete())
return;
@@ -217,7 +217,7 @@ bool PasswordAutofillManager::TextFieldDidEndEditing(
if (iter == login_to_password_info_.end())
return false;
- const webkit_glue::PasswordFormFillData& fill_data =
+ const webkit::forms::PasswordFormFillData& fill_data =
iter->second.fill_data;
// If wait_for_username is false, we should have filled when the text changed.
@@ -342,7 +342,7 @@ void PasswordAutofillManager::SendPasswordForms(WebKit::WebFrame* frame,
WebKit::WebVector<WebKit::WebFormElement> forms;
frame->document().forms(forms);
- std::vector<webkit_glue::PasswordForm> password_forms;
+ std::vector<webkit::forms::PasswordForm> password_forms;
for (size_t i = 0; i < forms.size(); ++i) {
const WebKit::WebFormElement& form = forms[i];
@@ -351,8 +351,8 @@ void PasswordAutofillManager::SendPasswordForms(WebKit::WebFrame* frame,
continue;
if (only_visible && !form.hasNonEmptyBoundingBox())
continue;
- scoped_ptr<webkit_glue::PasswordForm> password_form(
- webkit_glue::PasswordFormDomManager::CreatePasswordForm(form));
+ scoped_ptr<webkit::forms::PasswordForm> password_form(
+ webkit::forms::PasswordFormDomManager::CreatePasswordForm(form));
if (password_form.get())
password_forms.push_back(*password_form);
}
@@ -410,7 +410,7 @@ bool PasswordAutofillManager::InputElementLostFocus() {
}
void PasswordAutofillManager::OnFillPasswordForm(
- const webkit_glue::PasswordFormFillData& form_data) {
+ const webkit::forms::PasswordFormFillData& form_data) {
FormElementsList forms;
// We own the FormElements* in forms.
FindFormElements(render_view()->GetWebView(), form_data.basic_data, &forms);
@@ -450,13 +450,13 @@ void PasswordAutofillManager::OnFillPasswordForm(
// PasswordAutofillManager, private:
void PasswordAutofillManager::GetSuggestions(
- const webkit_glue::PasswordFormFillData& fill_data,
+ const webkit::forms::PasswordFormFillData& fill_data,
const string16& input,
std::vector<string16>* suggestions) {
if (StartsWith(fill_data.basic_data.fields[0].value, input, false))
suggestions->push_back(fill_data.basic_data.fields[0].value);
- webkit_glue::PasswordFormFillData::LoginCollection::const_iterator iter;
+ webkit::forms::PasswordFormFillData::LoginCollection::const_iterator iter;
for (iter = fill_data.additional_logins.begin();
iter != fill_data.additional_logins.end(); ++iter) {
if (StartsWith(iter->first, input, false))
@@ -465,7 +465,7 @@ void PasswordAutofillManager::GetSuggestions(
}
bool PasswordAutofillManager::ShowSuggestionPopup(
- const webkit_glue::PasswordFormFillData& fill_data,
+ const webkit::forms::PasswordFormFillData& fill_data,
const WebKit::WebInputElement& user_input) {
WebKit::WebFrame* frame = user_input.document().frame();
if (!frame)
@@ -493,7 +493,7 @@ bool PasswordAutofillManager::ShowSuggestionPopup(
bool PasswordAutofillManager::FillUserNameAndPassword(
WebKit::WebInputElement* username_element,
WebKit::WebInputElement* password_element,
- const webkit_glue::PasswordFormFillData& fill_data,
+ const webkit::forms::PasswordFormFillData& fill_data,
bool exact_username_match,
bool set_selection) {
string16 current_username = username_element->value();
@@ -508,7 +508,7 @@ bool PasswordAutofillManager::FillUserNameAndPassword(
password = fill_data.basic_data.fields[1].value;
} else {
// Scan additional logins for a match.
- webkit_glue::PasswordFormFillData::LoginCollection::const_iterator iter;
+ webkit::forms::PasswordFormFillData::LoginCollection::const_iterator iter;
for (iter = fill_data.additional_logins.begin();
iter != fill_data.additional_logins.end(); ++iter) {
if (DoUsernamesMatch(iter->first, current_username,
@@ -540,7 +540,7 @@ bool PasswordAutofillManager::FillUserNameAndPassword(
void PasswordAutofillManager::PerformInlineAutocomplete(
const WebKit::WebInputElement& username_input,
const WebKit::WebInputElement& password_input,
- const webkit_glue::PasswordFormFillData& fill_data) {
+ const webkit::forms::PasswordFormFillData& fill_data) {
DCHECK(!fill_data.wait_for_username);
// We need non-const versions of the username and password inputs.
diff --git a/chrome/renderer/autofill/password_autofill_manager.h b/chrome/renderer/autofill/password_autofill_manager.h
index cd4cdd8..254571a89 100644
--- a/chrome/renderer/autofill/password_autofill_manager.h
+++ b/chrome/renderer/autofill/password_autofill_manager.h
@@ -13,7 +13,7 @@
#include "chrome/renderer/page_click_listener.h"
#include "content/public/renderer/render_view_observer.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h"
-#include "webkit/glue/password_form_dom_manager.h"
+#include "webkit/forms/password_form_dom_manager.h"
namespace WebKit {
class WebInputElement;
@@ -55,7 +55,7 @@ class PasswordAutofillManager : public content::RenderViewObserver,
struct PasswordInfo {
WebKit::WebInputElement password_field;
- webkit_glue::PasswordFormFillData fill_data;
+ webkit::forms::PasswordFormFillData fill_data;
bool backspace_pressed_last;
PasswordInfo() : backspace_pressed_last(false) {}
};
@@ -75,23 +75,23 @@ class PasswordAutofillManager : public content::RenderViewObserver,
virtual bool InputElementLostFocus() OVERRIDE;
// RenderView IPC handlers:
- void OnFillPasswordForm(const webkit_glue::PasswordFormFillData& form_data);
+ void OnFillPasswordForm(const webkit::forms::PasswordFormFillData& form_data);
// Scans the given frame for password forms and sends them up to the browser.
// If |only_visible| is true, only forms visible in the layout are sent.
void SendPasswordForms(WebKit::WebFrame* frame, bool only_visible);
- void GetSuggestions(const webkit_glue::PasswordFormFillData& fill_data,
+ void GetSuggestions(const webkit::forms::PasswordFormFillData& fill_data,
const string16& input,
std::vector<string16>* suggestions);
- bool ShowSuggestionPopup(const webkit_glue::PasswordFormFillData& fill_data,
+ bool ShowSuggestionPopup(const webkit::forms::PasswordFormFillData& fill_data,
const WebKit::WebInputElement& user_input);
bool FillUserNameAndPassword(
WebKit::WebInputElement* username_element,
WebKit::WebInputElement* password_element,
- const webkit_glue::PasswordFormFillData& fill_data,
+ const webkit::forms::PasswordFormFillData& fill_data,
bool exact_username_match,
bool set_selection);
@@ -100,7 +100,7 @@ class PasswordAutofillManager : public content::RenderViewObserver,
void PerformInlineAutocomplete(
const WebKit::WebInputElement& username,
const WebKit::WebInputElement& password,
- const webkit_glue::PasswordFormFillData& fill_data);
+ const webkit::forms::PasswordFormFillData& fill_data);
// Invoked when the passed frame is closing. Gives us a chance to clear any
// reference we may have to elements in that frame.
diff --git a/chrome/renderer/autofill/password_autofill_manager_browsertest.cc b/chrome/renderer/autofill/password_autofill_manager_browsertest.cc
index b283c8b..b59bbda 100644
--- a/chrome/renderer/autofill/password_autofill_manager_browsertest.cc
+++ b/chrome/renderer/autofill/password_autofill_manager_browsertest.cc
@@ -17,13 +17,13 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h"
#include "ui/base/keycodes/keyboard_codes.h"
-#include "webkit/glue/form_data.h"
-#include "webkit/glue/form_field.h"
+#include "webkit/forms/form_data.h"
+#include "webkit/forms/form_field.h"
-using webkit_glue::FormField;
-using webkit_glue::PasswordFormFillData;
-using webkit_glue::PasswordForm;
-using webkit_glue::PasswordFormDomManager;
+using webkit::forms::FormField;
+using webkit::forms::PasswordFormFillData;
+using webkit::forms::PasswordForm;
+using webkit::forms::PasswordFormDomManager;
using WebKit::WebDocument;
using WebKit::WebElement;
using WebKit::WebFrame;