OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/extensions/api/language_settings_private/language_setti
ngs_private_api.h" | 5 #include "chrome/browser/extensions/api/language_settings_private/language_setti
ngs_private_api.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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 SpellcheckService* service = | 225 SpellcheckService* service = |
226 SpellcheckServiceFactory::GetForContext(browser_context()); | 226 SpellcheckServiceFactory::GetForContext(browser_context()); |
227 SpellcheckCustomDictionary* dictionary = service->GetCustomDictionary(); | 227 SpellcheckCustomDictionary* dictionary = service->GetCustomDictionary(); |
228 DCHECK(dictionary->IsLoaded()); | 228 DCHECK(dictionary->IsLoaded()); |
229 | 229 |
230 // TODO(michaelpg): Sort using app locale. | 230 // TODO(michaelpg): Sort using app locale. |
231 scoped_ptr<base::ListValue> word_list(new base::ListValue()); | 231 scoped_ptr<base::ListValue> word_list(new base::ListValue()); |
232 const std::set<std::string>& words = dictionary->GetWords(); | 232 const std::set<std::string>& words = dictionary->GetWords(); |
233 for (const std::string& word : words) | 233 for (const std::string& word : words) |
234 word_list->AppendString(word); | 234 word_list->AppendString(word); |
235 return word_list.Pass(); | 235 return word_list; |
236 } | 236 } |
237 | 237 |
238 LanguageSettingsPrivateAddSpellcheckWordFunction:: | 238 LanguageSettingsPrivateAddSpellcheckWordFunction:: |
239 LanguageSettingsPrivateAddSpellcheckWordFunction() { | 239 LanguageSettingsPrivateAddSpellcheckWordFunction() { |
240 } | 240 } |
241 | 241 |
242 LanguageSettingsPrivateAddSpellcheckWordFunction:: | 242 LanguageSettingsPrivateAddSpellcheckWordFunction:: |
243 ~LanguageSettingsPrivateAddSpellcheckWordFunction() { | 243 ~LanguageSettingsPrivateAddSpellcheckWordFunction() { |
244 } | 244 } |
245 | 245 |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 LanguageSettingsPrivateRemoveInputMethodFunction:: | 386 LanguageSettingsPrivateRemoveInputMethodFunction:: |
387 ~LanguageSettingsPrivateRemoveInputMethodFunction() { | 387 ~LanguageSettingsPrivateRemoveInputMethodFunction() { |
388 } | 388 } |
389 | 389 |
390 ExtensionFunction::ResponseAction | 390 ExtensionFunction::ResponseAction |
391 LanguageSettingsPrivateRemoveInputMethodFunction::Run() { | 391 LanguageSettingsPrivateRemoveInputMethodFunction::Run() { |
392 return RespondNow(OneArgument(new base::FundamentalValue(true))); | 392 return RespondNow(OneArgument(new base::FundamentalValue(true))); |
393 } | 393 } |
394 | 394 |
395 } // namespace extensions | 395 } // namespace extensions |
OLD | NEW |