| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef COMPONENTS_TRANSLATE_CORE_COMMON_LANGUAGE_DETECTION_DETAILS_H_ | 5 #ifndef COMPONENTS_TRANSLATE_CORE_COMMON_LANGUAGE_DETECTION_DETAILS_H_ |
| 6 #define COMPONENTS_TRANSLATE_CORE_COMMON_LANGUAGE_DETECTION_DETAILS_H_ | 6 #define COMPONENTS_TRANSLATE_CORE_COMMON_LANGUAGE_DETECTION_DETAILS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| 11 #include "base/time/time.h" | 11 #include "base/time/time.h" |
| 12 #include "url/gurl.h" | 12 #include "url/gurl.h" |
| 13 | 13 |
| 14 namespace translate { |
| 15 |
| 14 struct LanguageDetectionDetails { | 16 struct LanguageDetectionDetails { |
| 15 LanguageDetectionDetails(); | 17 LanguageDetectionDetails(); |
| 16 ~LanguageDetectionDetails(); | 18 ~LanguageDetectionDetails(); |
| 17 | 19 |
| 18 // The time when this was created. | 20 // The time when this was created. |
| 19 base::Time time; | 21 base::Time time; |
| 20 | 22 |
| 21 // The URL. | 23 // The URL. |
| 22 GURL url; | 24 GURL url; |
| 23 | 25 |
| 24 // The language detected by the content (Content-Language). | 26 // The language detected by the content (Content-Language). |
| 25 std::string content_language; | 27 std::string content_language; |
| 26 | 28 |
| 27 // The language detected by CLD. | 29 // The language detected by CLD. |
| 28 std::string cld_language; | 30 std::string cld_language; |
| 29 | 31 |
| 30 // Whether the CLD detection is reliable or not. | 32 // Whether the CLD detection is reliable or not. |
| 31 bool is_cld_reliable; | 33 bool is_cld_reliable; |
| 32 | 34 |
| 33 // The language written in the lang attribute of the html element. | 35 // The language written in the lang attribute of the html element. |
| 34 std::string html_root_language; | 36 std::string html_root_language; |
| 35 | 37 |
| 36 // The adopted language. | 38 // The adopted language. |
| 37 std::string adopted_language; | 39 std::string adopted_language; |
| 38 | 40 |
| 39 // The contents which is used for detection. | 41 // The contents which is used for detection. |
| 40 base::string16 contents; | 42 base::string16 contents; |
| 41 }; | 43 }; |
| 42 | 44 |
| 45 } // namespace translate |
| 46 |
| 43 #endif // COMPONENTS_TRANSLATE_CORE_COMMON_LANGUAGE_DETECTION_DETAILS_H_ | 47 #endif // COMPONENTS_TRANSLATE_CORE_COMMON_LANGUAGE_DETECTION_DETAILS_H_ |
| OLD | NEW |