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

Side by Side Diff: chrome/browser/ui/webui/options/language_options_handler_common.cc

Issue 2816513002: Revert of Change base::Value::ListStorage to std::vector<base::Value> (Closed)
Patch Set: Created 3 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
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/options/language_options_handler_common.h" 5 #include "chrome/browser/ui/webui/options/language_options_handler_common.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 const base::ListValue* args) { 259 const base::ListValue* args) {
260 CHECK_EQ(args->GetSize(), 1u); 260 CHECK_EQ(args->GetSize(), 1u);
261 const base::ListValue* language_list; 261 const base::ListValue* language_list;
262 args->GetList(0, &language_list); 262 args->GetList(0, &language_list);
263 DCHECK(language_list); 263 DCHECK(language_list);
264 264
265 std::vector<std::string> languages; 265 std::vector<std::string> languages;
266 for (base::ListValue::const_iterator it = language_list->begin(); 266 for (base::ListValue::const_iterator it = language_list->begin();
267 it != language_list->end(); ++it) { 267 it != language_list->end(); ++it) {
268 std::string lang; 268 std::string lang;
269 it->GetAsString(&lang); 269 (*it)->GetAsString(&lang);
270 languages.push_back(lang); 270 languages.push_back(lang);
271 } 271 }
272 272
273 Profile* profile = Profile::FromWebUI(web_ui()); 273 Profile* profile = Profile::FromWebUI(web_ui());
274 std::unique_ptr<translate::TranslatePrefs> translate_prefs = 274 std::unique_ptr<translate::TranslatePrefs> translate_prefs =
275 ChromeTranslateClient::CreateTranslatePrefs(profile->GetPrefs()); 275 ChromeTranslateClient::CreateTranslatePrefs(profile->GetPrefs());
276 translate_prefs->UpdateLanguageList(languages); 276 translate_prefs->UpdateLanguageList(languages);
277 } 277 }
278 278
279 void LanguageOptionsHandlerCommon::RetrySpellcheckDictionaryDownload( 279 void LanguageOptionsHandlerCommon::RetrySpellcheckDictionaryDownload(
(...skipping 10 matching lines...) Expand all
290 return; 290 return;
291 } 291 }
292 } 292 }
293 } 293 }
294 294
295 SpellcheckService* LanguageOptionsHandlerCommon::GetSpellcheckService() { 295 SpellcheckService* LanguageOptionsHandlerCommon::GetSpellcheckService() {
296 return SpellcheckServiceFactory::GetForContext(Profile::FromWebUI(web_ui())); 296 return SpellcheckServiceFactory::GetForContext(Profile::FromWebUI(web_ui()));
297 } 297 }
298 298
299 } // namespace options 299 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/content_settings_handler.cc ('k') | chrome/browser/ui/webui/settings/certificates_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698