summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill
diff options
context:
space:
mode:
authorisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-23 21:19:43 +0000
committerisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-23 21:19:43 +0000
commit3acebf3891b172b9b5c63b34adfdcf3e0c9f139c (patch)
tree72ed9c376a49c68d629c7f692e34e7ee19234c03 /chrome/browser/autofill
parent3c0b9837b3e3dee0a40cc1c9da6c4e54ada8b097 (diff)
downloadchromium_src-3acebf3891b172b9b5c63b34adfdcf3e0c9f139c.zip
chromium_src-3acebf3891b172b9b5c63b34adfdcf3e0c9f139c.tar.gz
chromium_src-3acebf3891b172b9b5c63b34adfdcf3e0c9f139c.tar.bz2
[Autofill] Cleanup: Remove a redundant method.
All implementations of OnQueryPlatformSpecific() simply update the bounds, so remove the method and call SetBounds() instead. BUG=51644 TBR=erg@chromium.org, sky@chromium.org, tedchoc@chromium.org Review URL: https://chromiumcodereview.appspot.com/11190065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163678 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill')
-rw-r--r--chrome/browser/autofill/autofill_external_delegate.cc2
-rw-r--r--chrome/browser/autofill/autofill_external_delegate.h6
-rw-r--r--chrome/browser/autofill/autofill_external_delegate_unittest.cc13
-rw-r--r--chrome/browser/autofill/autofill_manager_unittest.cc5
-rw-r--r--chrome/browser/autofill/test_autofill_external_delegate.cc6
-rw-r--r--chrome/browser/autofill/test_autofill_external_delegate.h6
6 files changed, 4 insertions, 34 deletions
diff --git a/chrome/browser/autofill/autofill_external_delegate.cc b/chrome/browser/autofill/autofill_external_delegate.cc
index 045a682..d37a356 100644
--- a/chrome/browser/autofill/autofill_external_delegate.cc
+++ b/chrome/browser/autofill/autofill_external_delegate.cc
@@ -52,7 +52,7 @@ void AutofillExternalDelegate::OnQuery(int query_id,
display_warning_if_disabled_ = display_warning_if_disabled;
autofill_query_id_ = query_id;
- OnQueryPlatformSpecific(query_id, form, field, bounds);
+ SetBounds(bounds);
}
void AutofillExternalDelegate::OnSuggestionsReturned(
diff --git a/chrome/browser/autofill/autofill_external_delegate.h b/chrome/browser/autofill/autofill_external_delegate.h
index a42aeaa..ca3efd4 100644
--- a/chrome/browser/autofill/autofill_external_delegate.h
+++ b/chrome/browser/autofill/autofill_external_delegate.h
@@ -126,12 +126,6 @@ class AutofillExternalDelegate
const std::vector<string16>& autofill_icons,
const std::vector<int>& autofill_unique_ids) = 0;
- // Handle instance specific OnQueryCode.
- virtual void OnQueryPlatformSpecific(int query_id,
- const FormData& form,
- const FormFieldData& field,
- const gfx::Rect& bounds) = 0;
-
// Handle platform-dependent hiding.
virtual void HideAutofillPopupInternal() = 0;
diff --git a/chrome/browser/autofill/autofill_external_delegate_unittest.cc b/chrome/browser/autofill/autofill_external_delegate_unittest.cc
index 9085167..91af326 100644
--- a/chrome/browser/autofill/autofill_external_delegate_unittest.cc
+++ b/chrome/browser/autofill/autofill_external_delegate_unittest.cc
@@ -45,16 +45,12 @@ class MockAutofillExternalDelegate : public TestAutofillExternalDelegate {
const std::vector<string16>& autofill_icons,
const std::vector<int>& autofill_unique_ids));
- MOCK_METHOD4(OnQueryPlatformSpecific,
- void(int query_id,
- const FormData& form,
- const FormFieldData& field,
- const gfx::Rect& bounds));
-
MOCK_METHOD0(ClearPreviewedForm, void());
MOCK_METHOD0(HideAutofillPopup, void());
+ MOCK_METHOD1(SetBounds, void(const gfx::Rect& bounds));
+
private:
virtual void HideAutofillPopupInternal() {};
};
@@ -96,10 +92,7 @@ class AutofillExternalDelegateUnitTest : public TabContentsTestHarness {
field.should_autocomplete = true;
const gfx::Rect bounds;
- EXPECT_CALL(*external_delegate_,
- OnQueryPlatformSpecific(query_id, form, field, bounds));
-
- // This should call OnQueryPlatform specific.
+ EXPECT_CALL(*external_delegate_, SetBounds(bounds));
external_delegate_->OnQuery(query_id, form, field, bounds, false);
}
diff --git a/chrome/browser/autofill/autofill_manager_unittest.cc b/chrome/browser/autofill/autofill_manager_unittest.cc
index 93e00b6..e032b3e 100644
--- a/chrome/browser/autofill/autofill_manager_unittest.cc
+++ b/chrome/browser/autofill/autofill_manager_unittest.cc
@@ -3086,11 +3086,6 @@ class MockAutofillExternalDelegate : public TestAutofillExternalDelegate {
const gfx::Rect& bounds,
bool display_warning));
- virtual void OnQueryPlatformSpecific(int query_id,
- const FormData& form,
- const FormFieldData& field,
- const gfx::Rect& bounds) OVERRIDE {}
-
private:
DISALLOW_COPY_AND_ASSIGN(MockAutofillExternalDelegate);
};
diff --git a/chrome/browser/autofill/test_autofill_external_delegate.cc b/chrome/browser/autofill/test_autofill_external_delegate.cc
index 19acdd3..b35ee66 100644
--- a/chrome/browser/autofill/test_autofill_external_delegate.cc
+++ b/chrome/browser/autofill/test_autofill_external_delegate.cc
@@ -18,12 +18,6 @@ void TestAutofillExternalDelegate::ApplyAutofillSuggestions(
const std::vector<string16>& autofill_icons,
const std::vector<int>& autofill_unique_ids) {}
-void TestAutofillExternalDelegate::OnQueryPlatformSpecific(
- int query_id,
- const FormData& form,
- const FormFieldData& field,
- const gfx::Rect& bounds) {}
-
void TestAutofillExternalDelegate::HideAutofillPopupInternal() {}
void TestAutofillExternalDelegate::SetBounds(const gfx::Rect& bounds) {}
diff --git a/chrome/browser/autofill/test_autofill_external_delegate.h b/chrome/browser/autofill/test_autofill_external_delegate.h
index 1fa7ac3..5045929 100644
--- a/chrome/browser/autofill/test_autofill_external_delegate.h
+++ b/chrome/browser/autofill/test_autofill_external_delegate.h
@@ -24,12 +24,6 @@ class TestAutofillExternalDelegate : public AutofillExternalDelegate {
const std::vector<string16>& autofill_icons,
const std::vector<int>& autofill_unique_ids) OVERRIDE;
- virtual void OnQueryPlatformSpecific(int query_id,
- const FormData& form,
- const FormFieldData& field,
- const gfx::Rect& bounds) OVERRIDE;
-
-
virtual void HideAutofillPopupInternal() OVERRIDE;
virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;