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

Unified Diff: chrome/common/sqlite_utils.cc

Issue 5682008: Make members of Singleton<T> private and only visible to the singleton type. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 10 years 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
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 {

Powered by Google App Engine
This is Rietveld 408576698