summaryrefslogtreecommitdiffstats
path: root/chrome/common/sqlite_utils.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/common/sqlite_utils.cc')
-rw-r--r--chrome/common/sqlite_utils.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/chrome/common/sqlite_utils.cc b/chrome/common/sqlite_utils.cc
index d11b925..9d16c7f 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 {