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

Side by Side Diff: chrome/browser/extensions/api/font_settings/font_settings_api.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 // Font Settings Extension API implementation. 5 // Font Settings Extension API implementation.
6 6
7 #include "chrome/browser/extensions/api/font_settings/font_settings_api.h" 7 #include "chrome/browser/extensions/api/font_settings/font_settings_api.h"
8 8
9 #include <stddef.h> 9 #include <stddef.h>
10 10
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 bool success = CopyFontsToResult(list.get()); 294 bool success = CopyFontsToResult(list.get());
295 SendResponse(success); 295 SendResponse(success);
296 } 296 }
297 297
298 bool FontSettingsGetFontListFunction::CopyFontsToResult( 298 bool FontSettingsGetFontListFunction::CopyFontsToResult(
299 base::ListValue* fonts) { 299 base::ListValue* fonts) {
300 std::unique_ptr<base::ListValue> result(new base::ListValue()); 300 std::unique_ptr<base::ListValue> result(new base::ListValue());
301 for (base::ListValue::iterator it = fonts->begin(); 301 for (base::ListValue::iterator it = fonts->begin();
302 it != fonts->end(); ++it) { 302 it != fonts->end(); ++it) {
303 base::ListValue* font_list_value; 303 base::ListValue* font_list_value;
304 if (!it->GetAsList(&font_list_value)) { 304 if (!(*it)->GetAsList(&font_list_value)) {
305 NOTREACHED(); 305 NOTREACHED();
306 return false; 306 return false;
307 } 307 }
308 308
309 std::string name; 309 std::string name;
310 if (!font_list_value->GetString(0, &name)) { 310 if (!font_list_value->GetString(0, &name)) {
311 NOTREACHED(); 311 NOTREACHED();
312 return false; 312 return false;
313 } 313 }
314 314
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 431
432 const char* FontSettingsSetMinimumFontSizeFunction::GetPrefName() { 432 const char* FontSettingsSetMinimumFontSizeFunction::GetPrefName() {
433 return prefs::kWebKitMinimumFontSize; 433 return prefs::kWebKitMinimumFontSize;
434 } 434 }
435 435
436 const char* FontSettingsSetMinimumFontSizeFunction::GetKey() { 436 const char* FontSettingsSetMinimumFontSizeFunction::GetKey() {
437 return kPixelSizeKey; 437 return kPixelSizeKey;
438 } 438 }
439 439
440 } // namespace extensions 440 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698