Chromium Code Reviews| Index: chrome/browser/spellchecker/spellcheck_service.cc |
| diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc |
| index 2bb13aebe3f747f25e292106606dee5dbc40e1bf..0e79ee05f3087b3296f4618df3db1d5a358e5a78 100644 |
| --- a/chrome/browser/spellchecker/spellcheck_service.cc |
| +++ b/chrome/browser/spellchecker/spellcheck_service.cc |
| @@ -168,19 +168,8 @@ void SpellcheckService::InitForRenderer(content::RenderProcessHost* process) { |
| if (hunspell_dictionary_->GetDictionaryFile() != |
| base::kInvalidPlatformFileValue) { |
| -#if defined(OS_POSIX) |
| - file = base::FileDescriptor(hunspell_dictionary_->GetDictionaryFile(), |
| - false); |
| -#elif defined(OS_WIN) |
| - BOOL ok = ::DuplicateHandle(::GetCurrentProcess(), |
| - hunspell_dictionary_->GetDictionaryFile(), |
| - process->GetHandle(), |
| - &file, |
| - 0, |
| - false, |
| - DUPLICATE_SAME_ACCESS); |
| - DCHECK(ok) << ::GetLastError(); |
| -#endif |
| + file = IPC::GetFileHandleForProcess( |
| + hunspell_dictionary_->GetDictionaryFile(), process->GetHandle(), false); |
|
please use gerrit instead
2013/12/30 17:21:24
DHCECK(file != base::kInvalidPlatformFileValue)
groby-ooo-7-16
2014/01/02 17:48:44
Which error is this supposed to catch?
please use gerrit instead
2014/01/02 17:54:25
This would catch ::DuplicateHandle() returning fal
groby-ooo-7-16
2014/01/02 19:15:28
Technically, DCHECK should document invalid states
|
| } |
| process->Send(new SpellCheckMsg_Init( |