Index: components/autofill/browser/webdata/autofill_table.cc |
diff --git a/components/autofill/browser/webdata/autofill_table.cc b/components/autofill/browser/webdata/autofill_table.cc |
index a9c736738da738b33b1debf8092625e0702bbf6b..99eeeb48024b1f1d2cf328f9b0e3c8b1d41c9016 100644 |
--- a/components/autofill/browser/webdata/autofill_table.cc |
+++ b/components/autofill/browser/webdata/autofill_table.cc |
@@ -463,6 +463,16 @@ bool AutofillTable::GetFormValuesForElementName( |
return s.Succeeded(); |
} |
+bool AutofillTable::HasFormElements() { |
+ sql::Statement s(db_->GetUniqueStatement( |
+ "SELECT COUNT(*) FROM autofill")); |
+ if (!s.Step()) { |
+ NOTREACHED(); |
+ return false; |
+ } |
+ return s.ColumnInt(0) > 0; |
+} |
+ |
bool AutofillTable::RemoveFormElementsAddedBetween( |
const Time& delete_begin, |
const Time& delete_end, |