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

Side by Side Diff: chrome/browser/ui/webui/options2/language_options_handler_common2.cc

Issue 10573017: Rename SpellCheckCommon namespace to chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 8 years, 6 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
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 #include "chrome/browser/ui/webui/options2/language_options_handler_common2.h" 5 #include "chrome/browser/ui/webui/options2/language_options_handler_common2.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 l10n_util::GetAvailableLocales(); 125 l10n_util::GetAvailableLocales();
126 for (size_t i = 0; i < available_locales.size(); ++i) { 126 for (size_t i = 0; i < available_locales.size(); ++i) {
127 dictionary->SetBoolean(available_locales[i], true); 127 dictionary->SetBoolean(available_locales[i], true);
128 } 128 }
129 return dictionary; 129 return dictionary;
130 } 130 }
131 131
132 DictionaryValue* LanguageOptionsHandlerCommon::GetSpellCheckLanguageCodeSet() { 132 DictionaryValue* LanguageOptionsHandlerCommon::GetSpellCheckLanguageCodeSet() {
133 DictionaryValue* dictionary = new DictionaryValue(); 133 DictionaryValue* dictionary = new DictionaryValue();
134 std::vector<std::string> spell_check_languages; 134 std::vector<std::string> spell_check_languages;
135 SpellCheckCommon::SpellCheckLanguages(&spell_check_languages); 135 chrome::spellcheck_common::SpellCheckLanguages(&spell_check_languages);
136 for (size_t i = 0; i < spell_check_languages.size(); ++i) { 136 for (size_t i = 0; i < spell_check_languages.size(); ++i) {
137 dictionary->SetBoolean(spell_check_languages[i], true); 137 dictionary->SetBoolean(spell_check_languages[i], true);
138 } 138 }
139 return dictionary; 139 return dictionary;
140 } 140 }
141 141
142 void LanguageOptionsHandlerCommon::LanguageOptionsOpenCallback( 142 void LanguageOptionsHandlerCommon::LanguageOptionsOpenCallback(
143 const ListValue* args) { 143 const ListValue* args) {
144 content::RecordAction(UserMetricsAction("LanguageOptions_Open")); 144 content::RecordAction(UserMetricsAction("LanguageOptions_Open"));
145 } 145 }
(...skipping 14 matching lines...) Expand all
160 void LanguageOptionsHandlerCommon::SpellCheckLanguageChangeCallback( 160 void LanguageOptionsHandlerCommon::SpellCheckLanguageChangeCallback(
161 const ListValue* args) { 161 const ListValue* args) {
162 const std::string language_code = UTF16ToASCII(ExtractStringValue(args)); 162 const std::string language_code = UTF16ToASCII(ExtractStringValue(args));
163 CHECK(!language_code.empty()); 163 CHECK(!language_code.empty());
164 const std::string action = base::StringPrintf( 164 const std::string action = base::StringPrintf(
165 "LanguageOptions_SpellCheckLanguageChange_%s", language_code.c_str()); 165 "LanguageOptions_SpellCheckLanguageChange_%s", language_code.c_str());
166 content::RecordComputedAction(action); 166 content::RecordComputedAction(action);
167 } 167 }
168 168
169 } // namespace options2 169 } // namespace options2
OLDNEW
« no previous file with comments | « chrome/browser/spellchecker/spellcheck_platform_mac.mm ('k') | chrome/common/spellcheck_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698