Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1698)

Unified Diff: chrome/browser/spellcheck_message_filter.cc

Issue 7480028: Removal of Profile from content part 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/spellcheck_message_filter.cc
diff --git a/chrome/browser/spellcheck_message_filter.cc b/chrome/browser/spellcheck_message_filter.cc
index 54de49e7270e8a441292f1d0b30cf5cee334ff2c..483d560d2538bf4c43de264a64b3268729a5913f 100644
--- a/chrome/browser/spellcheck_message_filter.cc
+++ b/chrome/browser/spellcheck_message_filter.cc
@@ -94,7 +94,7 @@ void SpellCheckMessageFilter::OnSpellCheckerRequestDictionary() {
RenderProcessHost* host = RenderProcessHost::FromID(render_process_id_);
if (!host)
return; // Teardown.
- Profile* profile = host->profile();
+ Profile* profile = Profile::FromBrowserContext(host->browser_context());
// The renderer has requested that we initialize its spellchecker. This should
// generally only be called once per session, as after the first call, all
// future renderers will be passed the initialization information on startup
@@ -117,7 +117,8 @@ void SpellCheckMessageFilter::OnNotifyChecked(const string16& word,
if (!host)
return; // Teardown.
// Delegates to SpellCheckHost which tracks the stats of our spellchecker.
- SpellCheckHost* spellcheck_host = host->profile()->GetSpellCheckHost();
+ Profile* profile = Profile::FromBrowserContext(host->browser_context());
+ SpellCheckHost* spellcheck_host = profile->GetSpellCheckHost();
if (spellcheck_host && spellcheck_host->GetMetrics())
spellcheck_host->GetMetrics()->RecordCheckedWordStats(word, misspelled);
}

Powered by Google App Engine
This is Rietveld 408576698