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

Unified Diff: chrome/common/sqlite_utils.h

Issue 2804042: Incomplete changes to make scoped_ptr_malloc use plain functions. (Closed)
Patch Set: chrome now builds & links Created 10 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/gtk/certificate_dialogs.cc ('k') | chrome/gpu/gpu_backing_store_glx_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/sqlite_utils.h
diff --git a/chrome/common/sqlite_utils.h b/chrome/common/sqlite_utils.h
index 7ae6572ac4b1090dd8d0e33f92987fa72c1216d2..263178ae5884663b4f6ab5bc435dd46e5492a813 100644
--- a/chrome/common/sqlite_utils.h
+++ b/chrome/common/sqlite_utils.h
@@ -351,14 +351,8 @@ namespace sqlite_utils {
//------------------------------------------------------------------------------
// A scoped sqlite database that closes when it goes out of scope.
//------------------------------------------------------------------------------
-class DBClose {
- public:
- inline void operator()(sqlite3* x) const {
- sqlite3_close(x);
- }
-};
-
-typedef scoped_ptr_malloc<sqlite3, DBClose> scoped_sqlite_db_ptr;
+typedef scoped_ptr_malloc<sqlite3, FreeFnIgnoreReturn<sqlite3, sqlite3_close> >
+ scoped_sqlite_db_ptr;
// Opens the DB in the file pointed to by |filepath|. This method forces the
// database to be in UTF-8 mode on all platforms. See
« no previous file with comments | « chrome/browser/gtk/certificate_dialogs.cc ('k') | chrome/gpu/gpu_backing_store_glx_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698