Index: chrome/common/sqlite_utils.cc |
diff --git a/chrome/common/sqlite_utils.cc b/chrome/common/sqlite_utils.cc |
index d11b925a7ebe74711874c4d7d10ad59a7b0266de..9d16c7fe086276db20ae37a21a82d94997fd1b27 100644 |
--- a/chrome/common/sqlite_utils.cc |
+++ b/chrome/common/sqlite_utils.cc |
@@ -8,8 +8,8 @@ |
#include "base/file_path.h" |
#include "base/lock.h" |
+#include "base/lazy_instance.h" |
#include "base/logging.h" |
-#include "base/singleton.h" |
#include "base/stl_util-inl.h" |
#include "base/string16.h" |
@@ -76,10 +76,13 @@ class DefaultSQLErrorHandlerFactory : public SQLErrorHandlerFactory { |
Lock lock_; |
}; |
+static base::LazyInstance<DefaultSQLErrorHandlerFactory> |
+ g_default_sql_error_handler_factory(base::LINKER_INITIALIZED); |
+ |
SQLErrorHandlerFactory* GetErrorHandlerFactory() { |
// TODO(cpu): Testing needs to override the error handler. |
// Destruction of DefaultSQLErrorHandlerFactory handled by at_exit manager. |
- return Singleton<DefaultSQLErrorHandlerFactory>::get(); |
+ return g_default_sql_error_handler_factory.Pointer(); |
} |
namespace sqlite_utils { |