diff options
5 files changed, 1 insertions, 67 deletions
diff --git a/chrome/renderer/autofill/autofill_agent.cc b/chrome/renderer/autofill/autofill_agent.cc index deb1266..72110d0 100644 --- a/chrome/renderer/autofill/autofill_agent.cc +++ b/chrome/renderer/autofill/autofill_agent.cc @@ -56,11 +56,7 @@ AutofillAgent::AutofillAgent( suggestions_clear_index_(-1), suggestions_options_index_(-1), ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)) { -#if defined(CRBUG_72758_FIXED) render_view->webview()->setAutofillClient(this); -#else - render_view->webview()->setAutoFillClient(this); -#endif } AutofillAgent::~AutofillAgent() {} @@ -122,11 +118,7 @@ bool AutofillAgent::InputElementClicked(const WebInputElement& element, return false; } -#if defined(CRBUG_72758_FIXED) void AutofillAgent::didAcceptAutofillSuggestion(const WebNode& node, -#else -void AutofillAgent::didAcceptAutoFillSuggestion(const WebNode& node, -#endif const WebString& value, const WebString& label, int unique_id, @@ -162,11 +154,7 @@ void AutofillAgent::didAcceptAutoFillSuggestion(const WebNode& node, suggestions_options_index_ = -1; } -#if defined(CRBUG_72758_FIXED) void AutofillAgent::didSelectAutofillSuggestion(const WebNode& node, -#else -void AutofillAgent::didSelectAutoFillSuggestion(const WebNode& node, -#endif const WebString& value, const WebString& label, int unique_id) { @@ -174,19 +162,11 @@ void AutofillAgent::didSelectAutoFillSuggestion(const WebNode& node, if (password_autofill_manager_->DidSelectAutofillSuggestion(node)) return; -#if defined(CRBUG_72758_FIXED) didClearAutofillSelection(node); -#else - didClearAutoFillSelection(node); -#endif FillAutofillFormData(node, unique_id, AUTOFILL_PREVIEW); } -#if defined(CRBUG_72758_FIXED) void AutofillAgent::didClearAutofillSelection(const WebNode& node) { -#else -void AutofillAgent::didClearAutoFillSelection(const WebNode& node) { -#endif form_manager_.ClearPreviewedFormWithNode(node, was_query_node_autofilled_); } @@ -303,11 +283,7 @@ void AutofillAgent::OnSuggestionsReturned(int query_id, // Send to WebKit for display. if (!v.empty() && !autofill_query_node_.isNull() && autofill_query_node_.isFocusable()) { -#if defined(CRBUG_72758_FIXED) web_view->applyAutofillSuggestions( -#else - web_view->applyAutoFillSuggestions( -#endif autofill_query_node_, v, l, i, ids, separator_index); } diff --git a/chrome/renderer/autofill/autofill_agent.h b/chrome/renderer/autofill/autofill_agent.h index c183a26..d26b96f 100644 --- a/chrome/renderer/autofill/autofill_agent.h +++ b/chrome/renderer/autofill/autofill_agent.h @@ -14,16 +14,11 @@ #include "chrome/renderer/autofill/form_manager.h" #include "chrome/renderer/page_click_listener.h" #include "content/renderer/render_view_observer.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebAutofillClient.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h" #include "webkit/glue/form_data.h" #include "webkit/glue/form_field.h" -#if defined(CRBUG_72758_FIXED) -#include "third_party/WebKit/Source/WebKit/chromium/public/WebAutofillClient.h" -#else -#include "third_party/WebKit/Source/WebKit/chromium/public/WebAutoFillClient.h" -#endif - namespace webkit_glue { struct FormDataPredictions; } @@ -42,11 +37,7 @@ class PasswordAutofillManager; class AutofillAgent : public RenderViewObserver, public PageClickListener, -#if defined(CRBUG_72758_FIXED) public WebKit::WebAutofillClient { -#else - public WebKit::WebAutoFillClient { -#endif public: // PasswordAutofillManager is guaranteed to outlive AutofillAgent. AutofillAgent(RenderView* render_view, @@ -58,7 +49,6 @@ class AutofillAgent : public RenderViewObserver, void FrameTranslated(WebKit::WebFrame* frame); // WebKit::WebAutofillClient implementation. Public for tests. -#if defined(CRBUG_72758_FIXED) virtual void didAcceptAutofillSuggestion(const WebKit::WebNode& node, const WebKit::WebString& value, const WebKit::WebString& label, @@ -69,18 +59,6 @@ class AutofillAgent : public RenderViewObserver, const WebKit::WebString& label, int unique_id); virtual void didClearAutofillSelection(const WebKit::WebNode& node); -#else - virtual void didAcceptAutoFillSuggestion(const WebKit::WebNode& node, - const WebKit::WebString& value, - const WebKit::WebString& label, - int unique_id, - unsigned index); - virtual void didSelectAutoFillSuggestion(const WebKit::WebNode& node, - const WebKit::WebString& value, - const WebKit::WebString& label, - int unique_id); - virtual void didClearAutoFillSelection(const WebKit::WebNode& node); -#endif virtual void removeAutocompleteSuggestion(const WebKit::WebString& name, const WebKit::WebString& value); virtual void textFieldDidEndEditing(const WebKit::WebInputElement& element); diff --git a/chrome/renderer/autofill/autofill_browsertest.cc b/chrome/renderer/autofill/autofill_browsertest.cc index 6124e85..55e7176 100644 --- a/chrome/renderer/autofill/autofill_browsertest.cc +++ b/chrome/renderer/autofill/autofill_browsertest.cc @@ -78,11 +78,7 @@ TEST_F(RenderViewTest, SendForms) { // Accept suggestion that contains a label. Labeled items indicate Autofill // as opposed to Autocomplete. We're testing this distinction below with // the |AutofillHostMsg_FillAutofillFormData::ID| message. -#if defined(CRBUG_72758_FIXED) autofill_agent_->didAcceptAutofillSuggestion( -#else - autofill_agent_->didAcceptAutoFillSuggestion( -#endif firstname, WebKit::WebString::fromUTF8("Johnny"), WebKit::WebString::fromUTF8("Home"), @@ -149,11 +145,7 @@ TEST_F(RenderViewTest, FillFormElement) { // Accept a suggestion in a form that has been auto-filled. This triggers // the direct filling of the firstname element with value parameter. -#if defined(CRBUG_72758_FIXED) autofill_agent_->didAcceptAutofillSuggestion(firstname, -#else - autofill_agent_->didAcceptAutoFillSuggestion(firstname, -#endif WebString::fromUTF8("David"), WebString(), 0, diff --git a/chrome/renderer/autofill/password_autofill_manager.cc b/chrome/renderer/autofill/password_autofill_manager.cc index 450566c..d2954cc 100644 --- a/chrome/renderer/autofill/password_autofill_manager.cc +++ b/chrome/renderer/autofill/password_autofill_manager.cc @@ -467,11 +467,7 @@ bool PasswordAutofillManager::ShowSuggestionPopup( std::vector<string16> labels(suggestions.size()); std::vector<string16> icons(suggestions.size()); std::vector<int> ids(suggestions.size(), 0); -#if defined(CRBUG_72758_FIXED) webview->applyAutofillSuggestions( -#else - webview->applyAutoFillSuggestions( -#endif user_input, suggestions, labels, icons, ids, -1); return true; } diff --git a/chrome/renderer/autofill/password_autofill_manager_unittest.cc b/chrome/renderer/autofill/password_autofill_manager_unittest.cc index 6ff1b1d..eb0a0fb 100644 --- a/chrome/renderer/autofill/password_autofill_manager_unittest.cc +++ b/chrome/renderer/autofill/password_autofill_manager_unittest.cc @@ -391,11 +391,7 @@ TEST_F(PasswordAutofillManagerTest, SuggestionAccept) { // To simulate accepting an item in the suggestion drop-down we just mimic // what the WebView does: it sets the element value then calls // didAcceptAutofillSuggestion on the renderer. -#if defined(CRBUG_72758_FIXED) autofill_agent_->didAcceptAutofillSuggestion(username_element_, -#else - autofill_agent_->didAcceptAutoFillSuggestion(username_element_, -#endif ASCIIToUTF16(kAliceUsername), WebKit::WebString(), 0, @@ -415,11 +411,7 @@ TEST_F(PasswordAutofillManagerTest, SuggestionSelect) { // To simulate accepting an item in the suggestion drop-down we just mimic // what the WebView does: it sets the element value then calls // didSelectAutofillSuggestion on the renderer. -#if defined(CRBUG_72758_FIXED) autofill_agent_->didSelectAutofillSuggestion(username_element_, -#else - autofill_agent_->didSelectAutoFillSuggestion(username_element_, -#endif ASCIIToUTF16(kAliceUsername), WebKit::WebString(), 0); |