mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-04-17 04:07:24 +02:00
- Building on Windows now requires the Windows 10.0.10586 SDK. - Remove CefParseCSSColor which was implemented using Blink code in the browser process. This is longer advisable now that the Oilpan GC is enabled. - Avoid potential renderer process crashes by disabling script actions on the CefV8Context passed to CefRenderProcessHandler::OnContextReleased.
48 lines
1.4 KiB
Diff
48 lines
1.4 KiB
Diff
diff --git prefs_tab_helper.cc prefs_tab_helper.cc
|
|
index 36d6fe9..a875d1e 100644
|
|
--- prefs_tab_helper.cc
|
|
+++ prefs_tab_helper.cc
|
|
@@ -12,7 +12,7 @@
|
|
|
|
#include "base/command_line.h"
|
|
#include "base/macros.h"
|
|
-#include "base/memory/singleton.h"
|
|
+#include "base/lazy_instance.h"
|
|
#include "base/metrics/field_trial.h"
|
|
#include "base/strings/string_number_conversions.h"
|
|
#include "base/strings/string_util.h"
|
|
@@ -431,12 +431,10 @@ class PrefWatcherFactory : public BrowserContextKeyedServiceFactory {
|
|
GetInstance()->GetServiceForBrowserContext(profile, true));
|
|
}
|
|
|
|
- static PrefWatcherFactory* GetInstance() {
|
|
- return base::Singleton<PrefWatcherFactory>::get();
|
|
- }
|
|
+ static PrefWatcherFactory* GetInstance();
|
|
|
|
private:
|
|
- friend struct base::DefaultSingletonTraits<PrefWatcherFactory>;
|
|
+ friend struct base::DefaultLazyInstanceTraits<PrefWatcherFactory>;
|
|
|
|
PrefWatcherFactory() : BrowserContextKeyedServiceFactory(
|
|
"PrefWatcher",
|
|
@@ -457,6 +455,18 @@ class PrefWatcherFactory : public BrowserContextKeyedServiceFactory {
|
|
}
|
|
};
|
|
|
|
+namespace {
|
|
+
|
|
+base::LazyInstance<PrefWatcherFactory>::Leaky g_pref_watcher_factory =
|
|
+ LAZY_INSTANCE_INITIALIZER;
|
|
+
|
|
+} // namespace
|
|
+
|
|
+// static
|
|
+PrefWatcherFactory* PrefWatcherFactory::GetInstance() {
|
|
+ return g_pref_watcher_factory.Pointer();
|
|
+}
|
|
+
|
|
// static
|
|
PrefWatcher* PrefWatcher::Get(Profile* profile) {
|
|
return PrefWatcherFactory::GetForProfile(profile);
|