cef/patch/patches/spellcheck_137.patch
Marshall Greenblatt 8aac23386e Update to Chromium revision cb947c01 (#352221)
- Implement CefRequestHandler::OnBeforeBrowse using NavigationThrottle
  instead of ResourceThrottle (see http://crbug.com/537634). The CefRequest
  object passed to OnBeforeBrowse will no longer have an associated request
  identifier.
- Mac: Remove additional helper apps which are no longer required (see
  http://crbug.com/520680)
- Remove the UR_FLAG_REPORT_RAW_HEADERS flag which is no longer supported (see
  http://crbug.com/517114)
- Remove the CefBrowserSettings.java parameter. Java is an NPAPI plugin and
  NPAPI plugins are no longer supported (see http://crbug.com/470301#c11)
- Add CefFormatUrlForSecurityDisplay function in cef_parser.h
- Fix crash when passing `--disable-extensions` command-line flag (issue #1721)
- Linux: Fix NSS handler loading (issue #1727)
2015-10-09 17:31:27 -04:00

50 lines
1.6 KiB
Diff

diff --git spellcheck_factory.cc spellcheck_factory.cc
index fcf2ce8..9e4f3d1 100644
--- spellcheck_factory.cc
+++ spellcheck_factory.cc
@@ -16,6 +16,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) {
@@ -38,7 +45,7 @@ SpellcheckService* SpellcheckServiceFactory::GetForRenderProcessId(
// static
SpellcheckServiceFactory* SpellcheckServiceFactory::GetInstance() {
- return base::Singleton<SpellcheckServiceFactory>::get();
+ return g_spellcheck_service_factory.Pointer();
}
SpellcheckServiceFactory::SpellcheckServiceFactory()
diff --git spellcheck_factory.h spellcheck_factory.h
index 7cdf471..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 base::DefaultSingletonTraits<SpellcheckServiceFactory>;
+ friend struct base::DefaultLazyInstanceTraits<SpellcheckServiceFactory>;
SpellcheckServiceFactory();
~SpellcheckServiceFactory() override;