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

Side by Side Diff: components/translate/core/common/translate_util.h

Issue 195553002: Consider the origin flag when loading the translate language list (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « components/translate/core/browser/translate_language_list.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_TRANSLATE_UTIL_H_ 5 #ifndef COMPONENTS_TRANSLATE_CORE_COMMON_TRANSLATE_UTIL_H_
6 #define COMPONENTS_TRANSLATE_CORE_COMMON_TRANSLATE_UTIL_H_ 6 #define COMPONENTS_TRANSLATE_CORE_COMMON_TRANSLATE_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 class GURL; 10 class GURL;
11 11
12 namespace translate { 12 namespace translate {
13 13
14 // Isolated world sets following security-origin by default. 14 // Isolated world sets following security-origin by default.
15 extern const char kSecurityOrigin[]; 15 extern const char kSecurityOrigin[];
16 16
17 // Converts language code synonym to use at Translate server. 17 // Converts language code synonym to use at Translate server.
18 void ToTranslateLanguageSynonym(std::string* language); 18 void ToTranslateLanguageSynonym(std::string* language);
19 19
20 // Converts language code synonym to use at Chrome internal. 20 // Converts language code synonym to use at Chrome internal.
21 void ToChromeLanguageSynonym(std::string* language); 21 void ToChromeLanguageSynonym(std::string* language);
22 22
23 // Get Security origin with which Translate runs. 23 // Get Security origin with which Translate runs. This is used both for
24 // language checks and to obtain the list of available languages.
24 GURL GetTranslateSecurityOrigin(); 25 GURL GetTranslateSecurityOrigin();
25 26
26 } // namespace translate 27 } // namespace translate
27 28
28 #endif // COMPONENTS_TRANSLATE_CORE_COMMON_TRANSLATE_UTIL_H_ 29 #endif // COMPONENTS_TRANSLATE_CORE_COMMON_TRANSLATE_UTIL_H_
OLDNEW
« no previous file with comments | « components/translate/core/browser/translate_language_list.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698