Don't preload rarely seen large images
[chromium-blink-merge.git] / components / translate / core / common / translate_util.h
blobd7548dd43f2ced7c357ce9ed6f5c11169dca8de6
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
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_TRANSLATE_CORE_COMMON_TRANSLATE_UTIL_H_
6 #define COMPONENTS_TRANSLATE_CORE_COMMON_TRANSLATE_UTIL_H_
8 #include <string>
10 class GURL;
12 namespace translate {
14 // Isolated world sets following security-origin by default.
15 extern const char kSecurityOrigin[];
17 // Converts language code synonym to use at Translate server.
19 // The same logic exists at language_options.js, and please keep consistency
20 // with the JavaScript file.
21 void ToTranslateLanguageSynonym(std::string* language);
23 // Converts language code synonym to use at Chrome internal.
24 void ToChromeLanguageSynonym(std::string* language);
26 // Get Security origin with which Translate runs. This is used both for
27 // language checks and to obtain the list of available languages.
28 GURL GetTranslateSecurityOrigin();
30 } // namespace translate
32 #endif // COMPONENTS_TRANSLATE_CORE_COMMON_TRANSLATE_UTIL_H_