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

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

Issue 13770003: Translate: URL check should be done at once (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase for dcommit Created 7 years, 8 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 | « no previous file | chrome/browser/translate/translate_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 static bool IsSupportedLanguage(const std::string& language); 107 static bool IsSupportedLanguage(const std::string& language);
108 108
109 // static const values shared with our browser tests. 109 // static const values shared with our browser tests.
110 static const char* const kLanguageListCallbackName; 110 static const char* const kLanguageListCallbackName;
111 static const char* const kTargetLanguagesKey; 111 static const char* const kTargetLanguagesKey;
112 protected: 112 protected:
113 TranslateManager(); 113 TranslateManager();
114 114
115 private: 115 private:
116 friend struct DefaultSingletonTraits<TranslateManager>; 116 friend struct DefaultSingletonTraits<TranslateManager>;
117 friend class TranslateManagerTest;
118 FRIEND_TEST_ALL_PREFIXES(TranslateManagerTest, LanguageCodeSynonyms);
119 117
120 // Structure that describes a translate request. 118 // Structure that describes a translate request.
121 // Translation may be deferred while the translate script is being retrieved 119 // Translation may be deferred while the translate script is being retrieved
122 // from the translate server. 120 // from the translate server.
123 struct PendingRequest { 121 struct PendingRequest {
124 int render_process_id; 122 int render_process_id;
125 int render_view_id; 123 int render_view_id;
126 int page_id; 124 int page_id;
127 std::string source_lang; 125 std::string source_lang;
128 std::string target_lang; 126 std::string target_lang;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 // server. 209 // server.
212 std::vector<PendingRequest> pending_requests_; 210 std::vector<PendingRequest> pending_requests_;
213 211
214 // The languages supported by the translation server. 212 // The languages supported by the translation server.
215 static base::LazyInstance<std::set<std::string> > supported_languages_; 213 static base::LazyInstance<std::set<std::string> > supported_languages_;
216 214
217 DISALLOW_COPY_AND_ASSIGN(TranslateManager); 215 DISALLOW_COPY_AND_ASSIGN(TranslateManager);
218 }; 216 };
219 217
220 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_MANAGER_H_ 218 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/translate/translate_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698