mirror of
				https://bitbucket.org/chromiumembedded/cef
				synced 2025-06-05 21:39:12 +02:00 
			
		
		
		
	- Linux/Mac: Load V8 initial snapshot from external bin files (see http://crbug.com/421063). - Windows: 8.1 SDK is now required (issue #1470). - Remove CefDOMDocument::GetSelectionStartNode and GetSelectionEndNode methods(see https://codereview.chromium.org/763043004). - Rename internal namespace used in base headers to avoid linker conflicts with cef_sandbox.lib. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1956 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
		
			
				
	
	
		
			50 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			50 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
diff --git spellcheck_factory.cc spellcheck_factory.cc
 | 
						|
index 7d7e1df..b623657 100644
 | 
						|
--- spellcheck_factory.cc
 | 
						|
+++ spellcheck_factory.cc
 | 
						|
@@ -15,6 +15,13 @@
 | 
						|
 #include "content/public/browser/render_process_host.h"
 | 
						|
 #include "ui/base/l10n/l10n_util.h"
 | 
						|
 
 | 
						|
+namespace {
 | 
						|
+
 | 
						|
+static base::LazyInstance<SpellcheckServiceFactory>::Leaky
 | 
						|
+    g_spellcheck_service_factory = LAZY_INSTANCE_INITIALIZER;
 | 
						|
+
 | 
						|
+}  // namespace
 | 
						|
+
 | 
						|
 // static
 | 
						|
 SpellcheckService* SpellcheckServiceFactory::GetForContext(
 | 
						|
     content::BrowserContext* context) {
 | 
						|
@@ -37,7 +44,7 @@ SpellcheckService* SpellcheckServiceFactory::GetForRenderProcessId(
 | 
						|
 
 | 
						|
 // static
 | 
						|
 SpellcheckServiceFactory* SpellcheckServiceFactory::GetInstance() {
 | 
						|
-  return Singleton<SpellcheckServiceFactory>::get();
 | 
						|
+  return g_spellcheck_service_factory.Pointer();
 | 
						|
 }
 | 
						|
 
 | 
						|
 SpellcheckServiceFactory::SpellcheckServiceFactory()
 | 
						|
diff --git spellcheck_factory.h spellcheck_factory.h
 | 
						|
index 3e4ad0e..d52b881 100644
 | 
						|
--- spellcheck_factory.h
 | 
						|
+++ spellcheck_factory.h
 | 
						|
@@ -7,7 +7,7 @@
 | 
						|
 
 | 
						|
 #include "base/basictypes.h"
 | 
						|
 #include "base/gtest_prod_util.h"
 | 
						|
-#include "base/memory/singleton.h"
 | 
						|
+#include "base/lazy_instance.h"
 | 
						|
 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
 | 
						|
 
 | 
						|
 class SpellcheckService;
 | 
						|
@@ -26,7 +26,7 @@ class SpellcheckServiceFactory : public BrowserContextKeyedServiceFactory {
 | 
						|
   static SpellcheckServiceFactory* GetInstance();
 | 
						|
 
 | 
						|
  private:
 | 
						|
-  friend struct DefaultSingletonTraits<SpellcheckServiceFactory>;
 | 
						|
+  friend struct base::DefaultLazyInstanceTraits<SpellcheckServiceFactory>;
 | 
						|
 
 | 
						|
   SpellcheckServiceFactory();
 | 
						|
   ~SpellcheckServiceFactory() override;
 |