Index: chrome/browser/spellchecker/spellcheck_message_filter.cc |
=================================================================== |
--- chrome/browser/spellchecker/spellcheck_message_filter.cc (revision 222045) |
+++ chrome/browser/spellchecker/spellcheck_message_filter.cc (working copy) |
@@ -10,7 +10,6 @@ |
#include "base/bind.h" |
#include "base/prefs/pref_service.h" |
#include "base/strings/utf_string_conversions.h" |
-#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/spellchecker/spellcheck_factory.h" |
#include "chrome/browser/spellchecker/spellcheck_host_metrics.h" |
#include "chrome/browser/spellchecker/spellcheck_service.h" |
@@ -18,10 +17,12 @@ |
#include "chrome/common/pref_names.h" |
#include "chrome/common/spellcheck_marker.h" |
#include "chrome/common/spellcheck_messages.h" |
+#include "content/public/browser/browser_context.h" |
groby-ooo-7-16
2013/09/10 19:09:51
Nit: Don't need this (in most places). We're almos
msmith.v3
2013/09/13 17:02:14
Done.
|
#include "content/public/browser/render_process_host.h" |
#include "net/url_request/url_fetcher.h" |
using content::BrowserThread; |
+using content::BrowserContext; |
SpellCheckMessageFilter::SpellCheckMessageFilter(int render_process_id) |
: render_process_id_(render_process_id), |
@@ -69,13 +70,12 @@ |
content::RenderProcessHost::FromID(render_process_id_); |
if (!host) |
return; // Teardown. |
- Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext()); |
// 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 |
// (or when the dictionary changes in some way). |
SpellcheckService* spellcheck_service = |
- SpellcheckServiceFactory::GetForProfile(profile); |
+ SpellcheckServiceFactory::GetForContext(host->GetBrowserContext()); |
DCHECK(spellcheck_service); |
// The spellchecker initialization already started and finished; just send |
@@ -172,14 +172,14 @@ |
int route_id, |
int identifier, |
const std::vector<SpellCheckMarker>& markers) { |
- Profile* profile = NULL; |
+ BrowserContext* context = NULL; |
content::RenderProcessHost* host = |
content::RenderProcessHost::FromID(render_process_id_); |
if (host) |
- profile = Profile::FromBrowserContext(host->GetBrowserContext()); |
+ context = host->GetBrowserContext(); |
client_->RequestTextCheck( |
- profile, |
+ context, |
SpellingServiceClient::SPELLCHECK, |
text, |
base::Bind(&SpellCheckMessageFilter::OnTextCheckComplete, |