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

Side by Side Diff: chrome/browser/translate/translate_manager.h

Issue 15311006: Added and replaced some UMAs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 7 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_BROWSER_TRANSLATE_TRANSLATE_MANAGER_H_ 5 #ifndef CHROME_BROWSER_TRANSLATE_TRANSLATE_MANAGER_H_
6 #define CHROME_BROWSER_TRANSLATE_TRANSLATE_MANAGER_H_ 6 #define CHROME_BROWSER_TRANSLATE_TRANSLATE_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 // translate to and from. 106 // translate to and from.
107 static void GetSupportedLanguages(std::vector<std::string>* languages); 107 static void GetSupportedLanguages(std::vector<std::string>* languages);
108 108
109 // Returns the language code that can be used with the Translate method for a 109 // Returns the language code that can be used with the Translate method for a
110 // specified |chrome_locale|. 110 // specified |chrome_locale|.
111 static std::string GetLanguageCode(const std::string& chrome_locale); 111 static std::string GetLanguageCode(const std::string& chrome_locale);
112 112
113 // Returns true if |language| is supported by the translation server. 113 // Returns true if |language| is supported by the translation server.
114 static bool IsSupportedLanguage(const std::string& language); 114 static bool IsSupportedLanguage(const std::string& language);
115 115
116 // Returns true if |language| is shown as a candidate in the inforbar.
Takashi Toyoshima 2013/05/21 11:11:43 This description looks vague. "If infobar can disp
hajimehoshi 2013/05/22 04:19:27 Done.
117 static bool IsAvailableLanguage(const std::string& language);
118
116 // static const values shared with our browser tests. 119 // static const values shared with our browser tests.
117 static const char kLanguageListCallbackName[]; 120 static const char kLanguageListCallbackName[];
118 static const char kTargetLanguagesKey[]; 121 static const char kTargetLanguagesKey[];
119 protected: 122 protected:
120 TranslateManager(); 123 TranslateManager();
121 124
122 private: 125 private:
123 friend struct DefaultSingletonTraits<TranslateManager>; 126 friend struct DefaultSingletonTraits<TranslateManager>;
124 127
125 // Structure that describes a translate request. 128 // Structure that describes a translate request.
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 // server. 225 // server.
223 std::vector<PendingRequest> pending_requests_; 226 std::vector<PendingRequest> pending_requests_;
224 227
225 // The languages supported by the translation server. 228 // The languages supported by the translation server.
226 static base::LazyInstance<std::set<std::string> > supported_languages_; 229 static base::LazyInstance<std::set<std::string> > supported_languages_;
227 230
228 DISALLOW_COPY_AND_ASSIGN(TranslateManager); 231 DISALLOW_COPY_AND_ASSIGN(TranslateManager);
229 }; 232 };
230 233
231 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_MANAGER_H_ 234 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698