Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Unified Diff: chrome/browser/ui/webui/translate_internals/translate_internals_ui.cc

Issue 424123003: Replace the use of CLD_DATA_FROM* and CLD-related ifdefs with runtime checks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/translate/chrome_translate_client.cc ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 35896a5522d1eada3f924b0e4ebc90c9982d5904..0a13ad36b439ea2c33cb93666622667a6b7f84ae 100644
--- a/chrome/browser/ui/webui/translate_internals/translate_internals_ui.cc
+++ b/chrome/browser/ui/webui/translate_internals/translate_internals_ui.cc
@@ -15,6 +15,7 @@
#include "chrome/browser/ui/webui/translate_internals/translate_internals_handler.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/url_constants.h"
+#include "components/translate/content/common/cld_data_source.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_ui.h"
#include "content/public/browser/web_ui_data_source.h"
@@ -23,11 +24,6 @@
#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
@@ -76,7 +72,7 @@ content::WebUIDataSource* CreateTranslateInternalsHTMLSource() {
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));
+ cld_data_source = translate::CldDataSource::GetName();
#else
NOTREACHED();
#endif
« no previous file with comments | « chrome/browser/translate/chrome_translate_client.cc ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698