| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_host_impl.h" | 5 #include "chrome/browser/spellchecker/spellcheck_host_impl.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 using content::BrowserThread; | 38 using content::BrowserThread; |
| 39 | 39 |
| 40 namespace { | 40 namespace { |
| 41 | 41 |
| 42 FilePath GetFirstChoiceFilePath(const std::string& language) { | 42 FilePath GetFirstChoiceFilePath(const std::string& language) { |
| 43 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); | 43 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
| 44 | 44 |
| 45 FilePath dict_dir; | 45 FilePath dict_dir; |
| 46 PathService::Get(chrome::DIR_APP_DICTIONARIES, &dict_dir); | 46 PathService::Get(chrome::DIR_APP_DICTIONARIES, &dict_dir); |
| 47 return SpellCheckCommon::GetVersionedFileName(language, dict_dir); | 47 return chrome::spellcheck_common::GetVersionedFileName(language, dict_dir); |
| 48 } | 48 } |
| 49 | 49 |
| 50 #if defined(OS_WIN) | 50 #if defined(OS_WIN) |
| 51 FilePath GetFallbackFilePath(const FilePath& first_choice) { | 51 FilePath GetFallbackFilePath(const FilePath& first_choice) { |
| 52 FilePath dict_dir; | 52 FilePath dict_dir; |
| 53 PathService::Get(chrome::DIR_USER_DATA, &dict_dir); | 53 PathService::Get(chrome::DIR_USER_DATA, &dict_dir); |
| 54 return dict_dir.Append(first_choice.BaseName()); | 54 return dict_dir.Append(first_choice.BaseName()); |
| 55 } | 55 } |
| 56 #endif | 56 #endif |
| 57 | 57 |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 | 451 |
| 452 void SpellCheckHostImpl::AddWordComplete(const std::string& word) { | 452 void SpellCheckHostImpl::AddWordComplete(const std::string& word) { |
| 453 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 453 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 454 | 454 |
| 455 for (content::RenderProcessHost::iterator i( | 455 for (content::RenderProcessHost::iterator i( |
| 456 content::RenderProcessHost::AllHostsIterator()); | 456 content::RenderProcessHost::AllHostsIterator()); |
| 457 !i.IsAtEnd(); i.Advance()) { | 457 !i.IsAtEnd(); i.Advance()) { |
| 458 i.GetCurrentValue()->Send(new SpellCheckMsg_WordAdded(word)); | 458 i.GetCurrentValue()->Send(new SpellCheckMsg_WordAdded(word)); |
| 459 } | 459 } |
| 460 } | 460 } |
| OLD | NEW |