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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/oobe_ui.cc

Issue 2497123002: chromeos: Move device shutdown handling out of chrome into ash (Closed)
Patch Set: rebase Created 4 years, 1 month 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
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/oobe_ui.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/chromeos/login/oobe_ui.h" 5 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 for (size_t i = 0; i < handlers_.size(); ++i) { 532 for (size_t i = 0; i < handlers_.size(); ++i) {
533 if (handlers_[i]->async_assets_load_id().empty()) 533 if (handlers_[i]->async_assets_load_id().empty())
534 handlers_[i]->InitializeBase(); 534 handlers_[i]->InitializeBase();
535 } 535 }
536 536
537 // Instantiate the ShutdownPolicyHandler. 537 // Instantiate the ShutdownPolicyHandler.
538 shutdown_policy_handler_.reset( 538 shutdown_policy_handler_.reset(
539 new ShutdownPolicyHandler(CrosSettings::Get(), this)); 539 new ShutdownPolicyHandler(CrosSettings::Get(), this));
540 540
541 // Trigger an initial update. 541 // Trigger an initial update.
542 shutdown_policy_handler_->CheckIfRebootOnShutdown( 542 shutdown_policy_handler_->NotifyDelegateWithShutdownPolicy();
543 base::Bind(&OobeUI::OnShutdownPolicyChanged, base::Unretained(this)));
544 } 543 }
545 544
546 void OobeUI::OnScreenAssetsLoaded(const std::string& async_assets_load_id) { 545 void OobeUI::OnScreenAssetsLoaded(const std::string& async_assets_load_id) {
547 DCHECK(!async_assets_load_id.empty()); 546 DCHECK(!async_assets_load_id.empty());
548 547
549 for (size_t i = 0; i < handlers_.size(); ++i) { 548 for (size_t i = 0; i < handlers_.size(); ++i) {
550 if (handlers_[i]->async_assets_load_id() == async_assets_load_id) 549 if (handlers_[i]->async_assets_load_id() == async_assets_load_id)
551 handlers_[i]->InitializeBase(); 550 handlers_[i]->InitializeBase();
552 } 551 }
553 } 552 }
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 // http://crbug.com/646034. 616 // http://crbug.com/646034.
618 NOTIMPLEMENTED(); 617 NOTIMPLEMENTED();
619 } 618 }
620 619
621 current_screen_ = new_screen; 620 current_screen_ = new_screen;
622 for (Observer& observer : observer_list_) 621 for (Observer& observer : observer_list_)
623 observer.OnCurrentScreenChanged(current_screen_, new_screen); 622 observer.OnCurrentScreenChanged(current_screen_, new_screen);
624 } 623 }
625 624
626 } // namespace chromeos 625 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/oobe_ui.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698