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

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

Issue 2740143002: Change base::Value::ListStorage to std::vector<base::Value> (Closed)
Patch Set: Comment Updates Created 3 years, 9 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/chromeos/display_options_handler.h" 5 #include "chrome/browser/ui/webui/options/chromeos/display_options_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 if (!args->GetList(0, &layouts)) 428 if (!args->GetList(0, &layouts))
429 NOTREACHED(); 429 NOTREACHED();
430 content::RecordAction(base::UserMetricsAction("Options_DisplayRearrange")); 430 content::RecordAction(base::UserMetricsAction("Options_DisplayRearrange"));
431 431
432 display::DisplayManager* display_manager = GetDisplayManager(); 432 display::DisplayManager* display_manager = GetDisplayManager();
433 display::DisplayLayoutBuilder builder( 433 display::DisplayLayoutBuilder builder(
434 display_manager->GetCurrentDisplayLayout()); 434 display_manager->GetCurrentDisplayLayout());
435 builder.ClearPlacements(); 435 builder.ClearPlacements();
436 for (const auto& layout : *layouts) { 436 for (const auto& layout : *layouts) {
437 const base::DictionaryValue* dictionary; 437 const base::DictionaryValue* dictionary;
438 if (!layout->GetAsDictionary(&dictionary)) { 438 if (!layout.GetAsDictionary(&dictionary)) {
439 LOG(ERROR) << "Invalid layout dictionary: " << *dictionary; 439 LOG(ERROR) << "Invalid layout dictionary: " << *dictionary;
440 continue; 440 continue;
441 } 441 }
442 442
443 int64_t parent_id = GetDisplayIdFromDictionary(dictionary, "parentId"); 443 int64_t parent_id = GetDisplayIdFromDictionary(dictionary, "parentId");
444 if (parent_id == display::kInvalidDisplayId) 444 if (parent_id == display::kInvalidDisplayId)
445 continue; // No placement for root (primary) display. 445 continue; // No placement for root (primary) display.
446 446
447 int64_t display_id = GetDisplayIdFromDictionary(dictionary, "id"); 447 int64_t display_id = GetDisplayIdFromDictionary(dictionary, "id");
448 if (display_id == display::kInvalidDisplayId) { 448 if (display_id == display::kInvalidDisplayId) {
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 if (!args->GetBoolean(0, &enable)) 575 if (!args->GetBoolean(0, &enable))
576 NOTREACHED(); 576 NOTREACHED();
577 577
578 GetDisplayManager()->SetDefaultMultiDisplayModeForCurrentDisplays( 578 GetDisplayManager()->SetDefaultMultiDisplayModeForCurrentDisplays(
579 enable ? display::DisplayManager::UNIFIED 579 enable ? display::DisplayManager::UNIFIED
580 : display::DisplayManager::EXTENDED); 580 : display::DisplayManager::EXTENDED);
581 } 581 }
582 582
583 } // namespace options 583 } // namespace options
584 } // namespace chromeos 584 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698