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

Unified Diff: components/translate/common/translate_util.cc

Issue 25531002: Move language detection to a component (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix compilation Created 7 years, 3 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
Index: components/translate/common/translate_util.cc
diff --git a/chrome/common/translate/translate_util.cc b/components/translate/common/translate_util.cc
similarity index 86%
rename from chrome/common/translate/translate_util.cc
rename to components/translate/common/translate_util.cc
index 4391870ce84140f80344aeab214f83edb42e4965..06273a13d4c2ead25f4720d246e98ffb7dabfa32 100644
--- a/chrome/common/translate/translate_util.cc
+++ b/components/translate/common/translate_util.cc
@@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/common/translate/translate_util.h"
+#include "components/translate/common/translate_util.h"
#include "base/basictypes.h"
#include "base/command_line.h"
-#include "chrome/common/chrome_switches.h"
+#include "components/translate/common/translate_switches.h"
#include "url/gurl.h"
-namespace TranslateUtil {
+namespace translate {
// Language code synonyms. Some languages have changed codes over the years
// and sometimes the older codes are used, so we must see them as synonyms.
@@ -55,11 +55,11 @@ void ToChromeLanguageSynonym(std::string* language) {
GURL GetTranslateSecurityOrigin() {
std::string security_origin(kSecurityOrigin);
CommandLine* command_line = CommandLine::ForCurrentProcess();
- if (command_line->HasSwitch(switches::kTranslateSecurityOrigin)) {
+ if (command_line->HasSwitch(kTranslateSecurityOrigin)) {
security_origin =
- command_line->GetSwitchValueASCII(switches::kTranslateSecurityOrigin);
+ command_line->GetSwitchValueASCII(kTranslateSecurityOrigin);
}
return GURL(security_origin);
}
-} // namespace TranslateUtil
+} // namespace translate

Powered by Google App Engine
This is Rietveld 408576698