summaryrefslogtreecommitdiffstats
path: root/chrome/renderer
diff options
context:
space:
mode:
authorjshin@chromium.org <jshin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-04 23:16:30 +0000
committerjshin@chromium.org <jshin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-04 23:16:30 +0000
commit65127279b152049393928bf9a520fc26d4ede77d (patch)
treebdfcf1aa1e4f656e946b4b776b16f308f2056c0b /chrome/renderer
parent673fd2c0970496cf45b4724510590c9bc2c313bc (diff)
downloadchromium_src-65127279b152049393928bf9a520fc26d4ede77d.zip
chromium_src-65127279b152049393928bf9a520fc26d4ede77d.tar.gz
chromium_src-65127279b152049393928bf9a520fc26d4ede77d.tar.bz2
Clean up third_party/cld.
1. Remove files we don't use that come from toolbar 2. Simplify the directory structure by removing the redundant intermediary directories bar/toolbar/cld/i18n This will bring CLD a step closer to where it can be open-sourced separately (or along with CED for encoding detection.). It's not there yet. In addition to the clean-up, change |LanguageCode*| return 'nb', 'he', 'fil' instead of 'no', 'iw', and 'tl'. Also, use LanguageCodeWithDialects instead of LanguageCode to get 'zh-CN' instead of 'zh'. This is to simplify the 3-way mapping between Chrome's UI locale code, CLD's language code and what's accepted by Google Translate. It's also another preparation for open-sourcing because we'd better use the standard code rather than the obsolete code like 'iw' when open-sourcing. BUG=32759, 33613 TEST=third_party/cld builds on all platforms and pass the following tests: - unit_tests: Extension*.DetectTabLanguage and CompactLangDetTest.* - browser_tests: ExtensionBrowserTest.Toolstrip git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38146 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r--chrome/renderer/DEPS2
-rw-r--r--chrome/renderer/render_view.cc2
-rw-r--r--chrome/renderer/render_view.h13
3 files changed, 6 insertions, 11 deletions
diff --git a/chrome/renderer/DEPS b/chrome/renderer/DEPS
index 35f9fb6..55936c2 100644
--- a/chrome/renderer/DEPS
+++ b/chrome/renderer/DEPS
@@ -12,7 +12,7 @@ include_rules = [
"+webkit/glue",
"+webkit/glue/plugins",
"+v8/include",
- "+third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win",
+ "+third_party/cld/encodings/compact_lang_det/win",
"+third_party/npapi/bindings",
"+third_party/sqlite/preprocessed",
"+third_party/tcmalloc",
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index 872c518..cf74f81 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -67,7 +67,7 @@
#include "net/base/net_errors.h"
#include "skia/ext/bitmap_platform_device.h"
#include "skia/ext/image_operations.h"
-#include "third_party/cld/bar/toolbar/cld/i18n/encodings/compact_lang_det/win/cld_unicodetext.h"
+#include "third_party/cld/encodings/compact_lang_det/win/cld_unicodetext.h"
#include "third_party/WebKit/WebKit/chromium/public/WebAccessibilityCache.h"
#include "third_party/WebKit/WebKit/chromium/public/WebAccessibilityObject.h"
#include "third_party/WebKit/WebKit/chromium/public/WebCString.h"
diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h
index c09bf32..7245df1 100644
--- a/chrome/renderer/render_view.h
+++ b/chrome/renderer/render_view.h
@@ -458,15 +458,10 @@ class RenderView : public RenderWidget,
PageTranslator* page_translator() const { return page_translator_.get(); }
- // Returns the ISO 639 language code of the current page (e.g. en, fr, zh).
- // If ISO 639-1 code is not available for the language, ISO 639-2 3-letter code
- // will be returned (e.g. kha for Khasi and und for undtermined). For traditional
- // Chinse, 'zh-TW' will be returned while for simplified Chinse, 'zh' will be
- // returned.
- // TODO(jungshik): Make it return 'he' (the correct ISO 639 code for Hebrew)
- // instead of the obsolete 'iw'. Perhaps, it's also better to return 'zh-Hans'
- // (or 'zh-CN') for Simplified Chinese instead of 'zh' to be aligned with
- // 'zh-TW' for Traditional Chinse.
+ // Returns the ISO 639 language code of the current page (e.g. en, fr).
+ // If ISO 639-1 code is not available for the language, ISO 639-2 3-letter
+ // code will be returned (e.g. fil for Filipino and und for undtermined). For
+ // traditional and simplified Chinse, 'zh-TW' and 'zh-CN' will be returned.
std::string DetectLanguage();
#if defined(OS_MACOSX)