diff options
author | hbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-15 10:12:14 +0000 |
---|---|---|
committer | hbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-15 10:12:14 +0000 |
commit | a7944aaf310b20db30b9c6d40527101a91201d3e (patch) | |
tree | 3d8fffbfa917dcf941ed1080526647920d890471 /content/browser/hyphenator | |
parent | 4d48603926845950ab46173aeaf963061a887efb (diff) | |
download | chromium_src-a7944aaf310b20db30b9c6d40527101a91201d3e.zip chromium_src-a7944aaf310b20db30b9c6d40527101a91201d3e.tar.gz chromium_src-a7944aaf310b20db30b9c6d40527101a91201d3e.tar.bz2 |
Change the directory containing hyphenation dictionaries.
Even though content shell and DumpRenderTree can use sample dictionaries in 'third_party/hyphen', Chrome cannot use them and it needs to use dictionaries downloaded to 'chrome::DIR_APP_DICTIONARIES'. This change adds the ContentBrowserClient::GetHyphenDictionaryDirectory function so Chrome can change the directory to 'chrome::DIR_APP_DICTIONARIES' and read hyphenation dictionaries from the directory.
BUG=47083
TEST=none
Review URL: https://chromiumcodereview.appspot.com/11036054
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161845 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/hyphenator')
-rw-r--r-- | content/browser/hyphenator/hyphenator_message_filter.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/content/browser/hyphenator/hyphenator_message_filter.cc b/content/browser/hyphenator/hyphenator_message_filter.cc index b8e13ab..2132f76 100644 --- a/content/browser/hyphenator/hyphenator_message_filter.cc +++ b/content/browser/hyphenator/hyphenator_message_filter.cc @@ -10,8 +10,8 @@ #include "content/browser/hyphenator/hyphenator_message_filter.h" #include "content/common/hyphenator_messages.h" #include "content/public/browser/browser_thread.h" +#include "content/public/browser/content_browser_client.h" #include "content/public/browser/render_process_host.h" -#include "content/public/common/content_paths.h" namespace { @@ -85,8 +85,10 @@ void HyphenatorMessageFilter::OnOpenDictionary(const string16& locale) { void HyphenatorMessageFilter::OpenDictionary(const string16& locale) { DCHECK(dictionary_file_ == base::kInvalidPlatformFileValue); - if (dictionary_base_.empty()) - PathService::Get(base::DIR_EXE, &dictionary_base_); + if (dictionary_base_.empty()) { + dictionary_base_ = + GetContentClient()->browser()->GetHyphenDictionaryDirectory(); + } std::string rule_file = locale.empty() ? "en-US" : UTF16ToASCII(locale); rule_file.append("-1-0.dic"); FilePath rule_path = dictionary_base_.AppendASCII(rule_file); |