diff options
author | michaelbai@chromium.org <michaelbai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-04 23:02:32 +0000 |
---|---|---|
committer | michaelbai@chromium.org <michaelbai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-04 23:02:32 +0000 |
commit | 6315d166de217368aac830d79d0d26a6e408adef (patch) | |
tree | 69e018411ad0abb91a3f1645e89f3379d1445c0e /chrome | |
parent | 5d328e4f383812f22fba1134b974908b45128f75 (diff) | |
download | chromium_src-6315d166de217368aac830d79d0d26a6e408adef.zip chromium_src-6315d166de217368aac830d79d0d26a6e408adef.tar.gz chromium_src-6315d166de217368aac830d79d0d26a6e408adef.tar.bz2 |
Only clear the android_url table when it exists.
BUG=
TEST=Passed the existing tests.
Review URL: http://codereview.chromium.org/10209031
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135476 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/history/android/android_urls_database.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/chrome/browser/history/android/android_urls_database.cc b/chrome/browser/history/android/android_urls_database.cc index b76703a..f03cc63 100644 --- a/chrome/browser/history/android/android_urls_database.cc +++ b/chrome/browser/history/android/android_urls_database.cc @@ -141,7 +141,12 @@ bool AndroidURLsDatabase::UpdateAndroidURLRow(AndroidURLID id, } bool AndroidURLsDatabase::ClearAndroidURLRows() { - return GetDB().Execute("DELETE FROM android_urls"); + // The android_urls table might not exist if the Android content provider is + // never used, especially in the unit tests. See http://b/6385692. + if (GetDB().DoesTableExist("android_urls")) + return GetDB().Execute("DELETE FROM android_urls"); + + return true; } bool AndroidURLsDatabase::MigrateToVersion22() { |