Chromium Code Reviews

Unified Diff: chrome/browser/ui/webui/options/language_dictionary_overlay_handler.cc

Issue 23868013: Refactor dependency on Profile to BrowserContext in spell check. (Closed) Base URL: http://src.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: chrome/browser/ui/webui/options/language_dictionary_overlay_handler.cc
===================================================================
--- chrome/browser/ui/webui/options/language_dictionary_overlay_handler.cc (revision 223601)
+++ chrome/browser/ui/webui/options/language_dictionary_overlay_handler.cc (working copy)
@@ -85,8 +85,9 @@
return;
if (!dictionary_) {
- dictionary_ = SpellcheckServiceFactory::GetForProfile(
- Profile::FromWebUI(web_ui()))->GetCustomDictionary();
+ SpellcheckService* service = SpellcheckServiceFactory::GetForContext(
+ Profile::FromWebUI(web_ui()));
+ dictionary_ = service->GetCustomDictionary();
dictionary_->AddObserver(this);
}

Powered by Google App Engine