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..1c15d3e4c5633f3c81202acc9f2720b8673e1652 100644 |
--- a/components/autofill/browser/webdata/autofill_table.cc |
+++ b/components/autofill/browser/webdata/autofill_table.cc |
@@ -463,6 +463,17 @@ bool AutofillTable::GetFormValuesForElementName( |
return s.Succeeded(); |
} |
+bool AutofillTable::HasFormElements() { |
+ sql::Statement s(db_->GetUniqueStatement( |
+ "SELECT COUNT(*) FROM autofill")); |
+ if (!s.Step()) { |
+ NOTREACHED(); |
+ return false; |
+ } else { |
Ilya Sherman
2013/04/27 00:05:55
nit: No else stmt after a return stmt, please.
sgurun-gerrit only
2013/04/29 17:55:16
Done.
benm (inactive)
2013/04/29 18:00:03
return s.Step() ? s.ColumnInt(0) > 0 : false;
loo
sgurun-gerrit only
2013/04/29 19:32:39
himm, notreached is used all over this file in sim
|
+ return s.ColumnInt(0) > 0; |
+ } |
+} |
+ |
bool AutofillTable::RemoveFormElementsAddedBetween( |
const Time& delete_begin, |
const Time& delete_end, |