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

Side by Side Diff: chrome/browser/spellcheck_host_impl.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, 4 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 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/spellcheck_host_impl.h" 5 #include "chrome/browser/spellcheck_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 136
137 observer_ = NULL; 137 observer_ = NULL;
138 request_context_getter_ = NULL; 138 request_context_getter_ = NULL;
139 fetcher_.reset(); 139 fetcher_.reset();
140 registrar_.RemoveAll(); 140 registrar_.RemoveAll();
141 } 141 }
142 142
143 void SpellCheckHostImpl::InitForRenderer(RenderProcessHost* process) { 143 void SpellCheckHostImpl::InitForRenderer(RenderProcessHost* process) {
144 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 144 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
145 145
146 PrefService* prefs = process->profile()->GetPrefs(); 146 Profile* profile = Profile::FromBrowserContext(process->browser_context());
147 PrefService* prefs = profile->GetPrefs();
147 IPC::PlatformFileForTransit file; 148 IPC::PlatformFileForTransit file;
148 149
149 if (GetDictionaryFile() != base::kInvalidPlatformFileValue) { 150 if (GetDictionaryFile() != base::kInvalidPlatformFileValue) {
150 #if defined(OS_POSIX) 151 #if defined(OS_POSIX)
151 file = base::FileDescriptor(GetDictionaryFile(), false); 152 file = base::FileDescriptor(GetDictionaryFile(), false);
152 #elif defined(OS_WIN) 153 #elif defined(OS_WIN)
153 ::DuplicateHandle(::GetCurrentProcess(), 154 ::DuplicateHandle(::GetCurrentProcess(),
154 GetDictionaryFile(), 155 GetDictionaryFile(),
155 process->GetHandle(), 156 process->GetHandle(),
156 &file, 157 &file,
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 return custom_words_.back(); 404 return custom_words_.back();
404 } 405 }
405 406
406 const std::string& SpellCheckHostImpl::GetLanguage() const { 407 const std::string& SpellCheckHostImpl::GetLanguage() const {
407 return language_; 408 return language_;
408 } 409 }
409 410
410 bool SpellCheckHostImpl::IsUsingPlatformChecker() const { 411 bool SpellCheckHostImpl::IsUsingPlatformChecker() const {
411 return use_platform_spellchecker_; 412 return use_platform_spellchecker_;
412 } 413 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698