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

Unified Diff: base/path_service.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: base/path_service.cc
diff --git a/base/path_service.cc b/base/path_service.cc
index 4381998b4791ac3d504bff872a918ff0052b5ff4..56ce5fa4336a6e3830c85487de9187dc1760506e 100644
--- a/base/path_service.cc
+++ b/base/path_service.cc
@@ -13,9 +13,9 @@
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/hash_tables.h"
+#include "base/lazy_instance.h"
#include "base/lock.h"
#include "base/logging.h"
-#include "base/singleton.h"
namespace base {
bool PathProvider(int key, FilePath* result);
@@ -118,8 +118,10 @@ struct PathData {
}
};
+static base::LazyInstance<PathData> g_path_data(base::LINKER_INITIALIZED);
Evan Martin 2010/12/13 17:38:30 *
+
static PathData* GetPathData() {
- return Singleton<PathData>::get();
+ return g_path_data.Pointer();
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698