OLD | NEW |
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_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/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "content/public/browser/notification_types.h" | 27 #include "content/public/browser/notification_types.h" |
28 #include "content/public/common/url_fetcher.h" | 28 #include "content/public/common/url_fetcher.h" |
29 #include "googleurl/src/gurl.h" | 29 #include "googleurl/src/gurl.h" |
30 #include "net/url_request/url_request_context_getter.h" | 30 #include "net/url_request/url_request_context_getter.h" |
31 #include "third_party/hunspell/google/bdict.h" | 31 #include "third_party/hunspell/google/bdict.h" |
32 #include "ui/base/l10n/l10n_util.h" | 32 #include "ui/base/l10n/l10n_util.h" |
33 #if defined(OS_MACOSX) | 33 #if defined(OS_MACOSX) |
34 #include "base/metrics/histogram.h" | 34 #include "base/metrics/histogram.h" |
35 #endif | 35 #endif |
36 | 36 |
| 37 using content::BrowserThread; |
| 38 |
37 namespace { | 39 namespace { |
38 | 40 |
39 FilePath GetFirstChoiceFilePath(const std::string& language) { | 41 FilePath GetFirstChoiceFilePath(const std::string& language) { |
40 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); | 42 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
41 | 43 |
42 FilePath dict_dir; | 44 FilePath dict_dir; |
43 PathService::Get(chrome::DIR_APP_DICTIONARIES, &dict_dir); | 45 PathService::Get(chrome::DIR_APP_DICTIONARIES, &dict_dir); |
44 return SpellCheckCommon::GetVersionedFileName(language, dict_dir); | 46 return SpellCheckCommon::GetVersionedFileName(language, dict_dir); |
45 } | 47 } |
46 | 48 |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 return file_; | 445 return file_; |
444 } | 446 } |
445 | 447 |
446 const std::string& SpellCheckHostImpl::GetLanguage() const { | 448 const std::string& SpellCheckHostImpl::GetLanguage() const { |
447 return language_; | 449 return language_; |
448 } | 450 } |
449 | 451 |
450 bool SpellCheckHostImpl::IsUsingPlatformChecker() const { | 452 bool SpellCheckHostImpl::IsUsingPlatformChecker() const { |
451 return use_platform_spellchecker_; | 453 return use_platform_spellchecker_; |
452 } | 454 } |
OLD | NEW |