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

Unified Diff: base/path_service.cc

Issue 2667513003: Remove some LazyInstance use in base/ (Closed)
Patch Set: no message_window Created 3 years, 11 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
Index: base/path_service.cc
diff --git a/base/path_service.cc b/base/path_service.cc
index 3f954d79e4bd8f4a84f80a505eb2fdde93577254..17ba0d793e439c80eaa8deca64d72efdca4697c6 100644
--- a/base/path_service.cc
+++ b/base/path_service.cc
@@ -13,7 +13,6 @@
#include "base/containers/hash_tables.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
-#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/synchronization/lock.h"
#include "build/build_config.h"
@@ -129,10 +128,9 @@ struct PathData {
}
};
-static LazyInstance<PathData>::Leaky g_path_data = LAZY_INSTANCE_INITIALIZER;
-
static PathData* GetPathData() {
- return g_path_data.Pointer();
+ static auto path_data = new PathData();
+ return path_data;
}
// Tries to find |key| in the cache. |path_data| should be locked by the caller!

Powered by Google App Engine
This is Rietveld 408576698