Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Side by Side Diff: webkit/appcache/appcache_database.cc

Issue 10171014: Changed to Reset(bool clear_bound_vars) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix mac build error. Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sync/syncable/directory_backing_store.cc ('k') | webkit/appcache/appcache_database_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/appcache/appcache_database.h" 5 #include "webkit/appcache/appcache_database.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after
845 if (!transaction.Begin()) 845 if (!transaction.Begin())
846 return false; 846 return false;
847 847
848 sql::Statement statement(db_->GetCachedStatement(statement_id, sql)); 848 sql::Statement statement(db_->GetCachedStatement(statement_id, sql));
849 849
850 std::vector<int64>::const_iterator iter = ids.begin(); 850 std::vector<int64>::const_iterator iter = ids.begin();
851 while (iter != ids.end()) { 851 while (iter != ids.end()) {
852 statement.BindInt64(0, *iter); 852 statement.BindInt64(0, *iter);
853 if (!statement.Run()) 853 if (!statement.Run())
854 return false; 854 return false;
855 statement.Reset(); 855 statement.Reset(true);
856 ++iter; 856 ++iter;
857 } 857 }
858 858
859 return transaction.Commit(); 859 return transaction.Commit();
860 } 860 }
861 861
862 bool AppCacheDatabase::RunUniqueStatementWithInt64Result( 862 bool AppCacheDatabase::RunUniqueStatementWithInt64Result(
863 const char* sql, int64* result) { 863 const char* sql, int64* result) {
864 DCHECK(sql); 864 DCHECK(sql);
865 sql::Statement statement(db_->GetUniqueStatement(sql)); 865 sql::Statement statement(db_->GetUniqueStatement(sql));
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
1125 1125
1126 // So we can't go recursive. 1126 // So we can't go recursive.
1127 if (is_recreating_) 1127 if (is_recreating_)
1128 return false; 1128 return false;
1129 1129
1130 AutoReset<bool> auto_reset(&is_recreating_, true); 1130 AutoReset<bool> auto_reset(&is_recreating_, true);
1131 return LazyOpen(true); 1131 return LazyOpen(true);
1132 } 1132 }
1133 1133
1134 } // namespace appcache 1134 } // namespace appcache
OLDNEW
« no previous file with comments | « sync/syncable/directory_backing_store.cc ('k') | webkit/appcache/appcache_database_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698