Index: chrome/browser/ui/webui/translate_internals/translate_internals_ui.cc |
diff --git a/chrome/browser/ui/webui/translate_internals/translate_internals_ui.cc b/chrome/browser/ui/webui/translate_internals/translate_internals_ui.cc |
index 3763105111831fabd3402e1e4d4bf4213402ea9d..35896a5522d1eada3f924b0e4ebc90c9982d5904 100644 |
--- a/chrome/browser/ui/webui/translate_internals/translate_internals_ui.cc |
+++ b/chrome/browser/ui/webui/translate_internals/translate_internals_ui.cc |
@@ -23,6 +23,11 @@ |
#include "ui/base/l10n/l10n_util.h" |
#include "ui/base/resource/resource_bundle.h" |
+// Macro stringification. |
+// https://gcc.gnu.org/onlinedocs/cpp/Stringification.html |
+#define XSTR(S) STR(S) |
+#define STR(S) #S |
+ |
namespace { |
// Sets the languages to |dict|. Each key is a language code and each value is |
@@ -63,16 +68,20 @@ content::WebUIDataSource* CreateTranslateInternalsHTMLSource() { |
} |
std::string cld_version = ""; |
+ std::string cld_data_source = ""; |
// The version strings are hardcoded here to avoid linking with the CLD |
// library, see http://crbug.com/297777. |
#if CLD_VERSION==1 |
cld_version = "1.6"; |
+ cld_data_source = "static"; // CLD1.x does not support dynamic data loading |
#elif CLD_VERSION==2 |
cld_version = "2"; |
+ cld_data_source = std::string(XSTR(CLD2_DATA_SOURCE)); |
#else |
NOTREACHED(); |
#endif |
source->AddString("cld-version", cld_version); |
+ source->AddString("cld-data-source", cld_data_source); |
return source; |
} |