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

Side by Side Diff: chrome/browser/spellcheck_host_impl.cc

Issue 7492051: Revert 94332 - 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
« no previous file with comments | « chrome/browser/memory_details.cc ('k') | chrome/browser/spellcheck_message_filter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 Profile* profile = Profile::FromBrowserContext(process->browser_context()); 146 PrefService* prefs = process->profile()->GetPrefs();
147 PrefService* prefs = profile->GetPrefs();
148 IPC::PlatformFileForTransit file; 147 IPC::PlatformFileForTransit file;
149 148
150 if (GetDictionaryFile() != base::kInvalidPlatformFileValue) { 149 if (GetDictionaryFile() != base::kInvalidPlatformFileValue) {
151 #if defined(OS_POSIX) 150 #if defined(OS_POSIX)
152 file = base::FileDescriptor(GetDictionaryFile(), false); 151 file = base::FileDescriptor(GetDictionaryFile(), false);
153 #elif defined(OS_WIN) 152 #elif defined(OS_WIN)
154 ::DuplicateHandle(::GetCurrentProcess(), 153 ::DuplicateHandle(::GetCurrentProcess(),
155 GetDictionaryFile(), 154 GetDictionaryFile(),
156 process->GetHandle(), 155 process->GetHandle(),
157 &file, 156 &file,
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 return custom_words_.back(); 403 return custom_words_.back();
405 } 404 }
406 405
407 const std::string& SpellCheckHostImpl::GetLanguage() const { 406 const std::string& SpellCheckHostImpl::GetLanguage() const {
408 return language_; 407 return language_;
409 } 408 }
410 409
411 bool SpellCheckHostImpl::IsUsingPlatformChecker() const { 410 bool SpellCheckHostImpl::IsUsingPlatformChecker() const {
412 return use_platform_spellchecker_; 411 return use_platform_spellchecker_;
413 } 412 }
OLDNEW
« no previous file with comments | « chrome/browser/memory_details.cc ('k') | chrome/browser/spellcheck_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698