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

Side by Side Diff: chrome/browser/spellchecker/spellcheck_message_filter.cc

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/spellchecker/spellcheck_message_filter.h" 5 #include "chrome/browser/spellchecker/spellcheck_message_filter.h"
6 6
7 #include "chrome/browser/prefs/pref_service.h" 7 #include "chrome/browser/prefs/pref_service.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/spellchecker/spellcheck_host.h" 9 #include "chrome/browser/spellchecker/spellcheck_host.h"
10 #include "chrome/browser/spellchecker/spellcheck_host_metrics.h" 10 #include "chrome/browser/spellchecker/spellcheck_host_metrics.h"
11 #include "chrome/browser/spellchecker/spellchecker_platform_engine.h" 11 #include "chrome/browser/spellchecker/spellchecker_platform_engine.h"
12 #include "chrome/common/spellcheck_messages.h" 12 #include "chrome/common/spellcheck_messages.h"
13 #include "content/browser/renderer_host/render_process_host.h" 13 #include "content/browser/renderer_host/render_process_host.h"
14 14
15 using content::BrowserThread;
16
15 SpellCheckMessageFilter::SpellCheckMessageFilter(int render_process_id) 17 SpellCheckMessageFilter::SpellCheckMessageFilter(int render_process_id)
16 : render_process_id_(render_process_id) { 18 : render_process_id_(render_process_id) {
17 } 19 }
18 20
19 SpellCheckMessageFilter::~SpellCheckMessageFilter() { 21 SpellCheckMessageFilter::~SpellCheckMessageFilter() {
20 } 22 }
21 23
22 void SpellCheckMessageFilter::OverrideThreadForMessage( 24 void SpellCheckMessageFilter::OverrideThreadForMessage(
23 const IPC::Message& message, BrowserThread::ID* thread) { 25 const IPC::Message& message, BrowserThread::ID* thread) {
24 if (message.type() == SpellCheckHostMsg_RequestDictionary::ID || 26 if (message.type() == SpellCheckHostMsg_RequestDictionary::ID ||
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 bool misspelled) { 117 bool misspelled) {
116 RenderProcessHost* host = RenderProcessHost::FromID(render_process_id_); 118 RenderProcessHost* host = RenderProcessHost::FromID(render_process_id_);
117 if (!host) 119 if (!host)
118 return; // Teardown. 120 return; // Teardown.
119 // Delegates to SpellCheckHost which tracks the stats of our spellchecker. 121 // Delegates to SpellCheckHost which tracks the stats of our spellchecker.
120 Profile* profile = Profile::FromBrowserContext(host->browser_context()); 122 Profile* profile = Profile::FromBrowserContext(host->browser_context());
121 SpellCheckHost* spellcheck_host = profile->GetSpellCheckHost(); 123 SpellCheckHost* spellcheck_host = profile->GetSpellCheckHost();
122 if (spellcheck_host && spellcheck_host->GetMetrics()) 124 if (spellcheck_host && spellcheck_host->GetMetrics())
123 spellcheck_host->GetMetrics()->RecordCheckedWordStats(word, misspelled); 125 spellcheck_host->GetMetrics()->RecordCheckedWordStats(word, misspelled);
124 } 126 }
OLDNEW
« no previous file with comments | « chrome/browser/spellchecker/spellcheck_message_filter.h ('k') | chrome/browser/spellchecker/spellcheck_profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698