summaryrefslogtreecommitdiffstats
path: root/chrome/browser/spellcheck_host.cc
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-01 21:38:51 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-01 21:38:51 +0000
commit1f34afe4a27a389978d259588ee7b4ea9e63fa8d (patch)
tree8b600655bc307b3de72660675500456a65707e1d /chrome/browser/spellcheck_host.cc
parentd0f06b75b0c17b7ec95a6ac44f6efce413bc6fd4 (diff)
downloadchromium_src-1f34afe4a27a389978d259588ee7b4ea9e63fa8d.zip
chromium_src-1f34afe4a27a389978d259588ee7b4ea9e63fa8d.tar.gz
chromium_src-1f34afe4a27a389978d259588ee7b4ea9e63fa8d.tar.bz2
FilePath: add a convertor to ASCII
This is needed for cases where we need to work with known-ASCII filenames, like locale paths. Review URL: http://codereview.chromium.org/6597075 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76426 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/spellcheck_host.cc')
-rw-r--r--chrome/browser/spellcheck_host.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/chrome/browser/spellcheck_host.cc b/chrome/browser/spellcheck_host.cc
index 0ea7ba8..d532b36 100644
--- a/chrome/browser/spellcheck_host.cc
+++ b/chrome/browser/spellcheck_host.cc
@@ -268,9 +268,13 @@ void SpellCheckHost::DownloadDictionary() {
// Determine URL of file to download.
static const char kDownloadServerUrl[] =
"http://cache.pack.google.com/edgedl/chrome/dict/";
+ std::string bdict_file = bdict_file_path_.BaseName().MaybeAsASCII();
+ if (bdict_file.empty()) {
+ NOTREACHED();
+ return;
+ }
GURL url = GURL(std::string(kDownloadServerUrl) +
- StringToLowerASCII(WideToUTF8(
- bdict_file_path_.BaseName().ToWStringHack())));
+ StringToLowerASCII(bdict_file));
fetcher_.reset(new URLFetcher(url, URLFetcher::GET, this));
fetcher_->set_request_context(request_context_getter_);
tried_to_download_ = true;