mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-09 08:38:41 +01:00
243a9c26d7
- Delete include/cef_runnable.h (issue #1336). - Build the cef_unittests target using all Chromium headers. Add a USING_CHROMIUM_INCLUDES define and libcef_dll_wrapper_unittests target to support this. This change avoids compile errors due to the divergence of CEF and Chromium base/ header implementations. The libcef_dll_wrapper sources must now compile successfully with both CEF and Chromium base/ headers (issue #1632). - The onbeforeunload message specified via JavaScript is no longer passed to the client (see http://crbug.com/587940).
49 lines
1.4 KiB
Diff
49 lines
1.4 KiB
Diff
diff --git prefs_tab_helper.cc prefs_tab_helper.cc
|
|
index f8ca619..872050c 100644
|
|
--- prefs_tab_helper.cc
|
|
+++ prefs_tab_helper.cc
|
|
@@ -11,8 +11,8 @@
|
|
#include <string>
|
|
|
|
#include "base/command_line.h"
|
|
+#include "base/lazy_instance.h"
|
|
#include "base/macros.h"
|
|
-#include "base/memory/singleton.h"
|
|
#include "base/strings/string_number_conversions.h"
|
|
#include "base/strings/string_util.h"
|
|
#include "base/strings/stringprintf.h"
|
|
@@ -423,12 +423,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",
|
|
@@ -449,6 +447,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);
|