diff options
author | michaelbai@chromium.org <michaelbai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-25 21:36:41 +0000 |
---|---|---|
committer | michaelbai@chromium.org <michaelbai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-25 21:36:41 +0000 |
commit | 389e0a485fe2c33cd25677ef5adf36b6f246c26c (patch) | |
tree | 2571a4bedd0047ee8b2f6fa6f8cab7e35f2ae17b /webkit/appcache | |
parent | 680ca65370fa194b8eea14b1c9c822e66fb2dd32 (diff) | |
download | chromium_src-389e0a485fe2c33cd25677ef5adf36b6f246c26c.zip chromium_src-389e0a485fe2c33cd25677ef5adf36b6f246c26c.tar.gz chromium_src-389e0a485fe2c33cd25677ef5adf36b6f246c26c.tar.bz2 |
Added parameter 'clear_bound_vars', so we could reset the statement without clearing bound variables, so and current row is reset to the beginning.
It is used to support the Andorid' sqlite cursor feature which could move the cursor around the result set.
BUG=
TEST=Added a new test.
TBR=agl,akalin,michaeln
Review URL: http://codereview.chromium.org/10171014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133985 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/appcache')
-rw-r--r-- | webkit/appcache/appcache_database.cc | 2 | ||||
-rw-r--r-- | webkit/appcache/appcache_database_unittest.cc | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/webkit/appcache/appcache_database.cc b/webkit/appcache/appcache_database.cc index 1f5c6de..90c2d7c 100644 --- a/webkit/appcache/appcache_database.cc +++ b/webkit/appcache/appcache_database.cc @@ -852,7 +852,7 @@ bool AppCacheDatabase::RunCachedStatementWithIds( statement.BindInt64(0, *iter); if (!statement.Run()) return false; - statement.Reset(); + statement.Reset(true); ++iter; } diff --git a/webkit/appcache/appcache_database_unittest.cc b/webkit/appcache/appcache_database_unittest.cc index 014a569..e147850 100644 --- a/webkit/appcache/appcache_database_unittest.cc +++ b/webkit/appcache/appcache_database_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -790,7 +790,7 @@ TEST(AppCacheDatabaseTest, UpgradeSchema3to4) { statement.BindString(2, namespace_url.spec().c_str()); statement.BindString(3, target_url.spec().c_str()); ASSERT_TRUE(statement.Run()); - statement.Reset(); + statement.Reset(true); } EXPECT_TRUE(transaction.Commit()); |