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

Side by Side Diff: components/translate/language_detection/language_detection_util.cc

Issue 93603006: Move Translate-related files to components/translate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 6 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/translate/language_detection/language_detection_util.h" 5 #include "components/translate/language_detection/language_detection_util.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/metrics/field_trial.h" 8 #include "base/metrics/field_trial.h"
9 #include "base/strings/string_split.h" 9 #include "base/strings/string_split.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
11 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "components/translate/common/translate_constants.h" 13 #include "components/translate/core/common/translate_constants.h"
14 #include "components/translate/common/translate_metrics.h" 14 #include "components/translate/core/common/translate_metrics.h"
15 #include "components/translate/common/translate_util.h" 15 #include "components/translate/core/common/translate_util.h"
16 16
17 #if !defined(CLD_VERSION) || CLD_VERSION==1 17 #if !defined(CLD_VERSION) || CLD_VERSION==1
18 #include "third_party/cld/encodings/compact_lang_det/compact_lang_det.h" 18 #include "third_party/cld/encodings/compact_lang_det/compact_lang_det.h"
19 #include "third_party/cld/encodings/compact_lang_det/win/cld_unicodetext.h" 19 #include "third_party/cld/encodings/compact_lang_det/win/cld_unicodetext.h"
20 #endif 20 #endif
21 21
22 #if !defined(CLD_VERSION) || CLD_VERSION==2 22 #if !defined(CLD_VERSION) || CLD_VERSION==2
23 #include "third_party/cld_2/src/public/compact_lang_det.h" 23 #include "third_party/cld_2/src/public/compact_lang_det.h"
24 #endif 24 #endif
25 25
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 // distinguish from English, and the language is one of well-known languages 377 // distinguish from English, and the language is one of well-known languages
378 // which often provide "en-*" meta information mistakenly. 378 // which often provide "en-*" meta information mistakenly.
379 for (size_t i = 0; i < arraysize(kWellKnownCodesOnWrongConfiguration); ++i) { 379 for (size_t i = 0; i < arraysize(kWellKnownCodesOnWrongConfiguration); ++i) {
380 if (cld_language == kWellKnownCodesOnWrongConfiguration[i]) 380 if (cld_language == kWellKnownCodesOnWrongConfiguration[i])
381 return true; 381 return true;
382 } 382 }
383 return false; 383 return false;
384 } 384 }
385 385
386 } // namespace translate 386 } // namespace translate
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698