Popular sites on the NTP: check that experiment group StartsWith (rather than IS...
[chromium-blink-merge.git] / chrome / browser / chromeos / login / screens / wrong_hwid_screen.cc
blobb5baca113b604c9e905b5816ae809b3ef8697be1
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/chromeos/login/screens/wrong_hwid_screen.h"
7 #include "chrome/browser/chromeos/login/screens/base_screen_delegate.h"
8 #include "chrome/browser/chromeos/login/wizard_controller.h"
10 namespace chromeos {
12 WrongHWIDScreen::WrongHWIDScreen(BaseScreenDelegate* base_screen_delegate,
13 WrongHWIDScreenActor* actor)
14 : BaseScreen(base_screen_delegate), actor_(actor) {
15 DCHECK(actor_);
16 if (actor_)
17 actor_->SetDelegate(this);
20 WrongHWIDScreen::~WrongHWIDScreen() {
21 if (actor_)
22 actor_->SetDelegate(NULL);
25 void WrongHWIDScreen::PrepareToShow() {
26 if (actor_)
27 actor_->PrepareToShow();
30 void WrongHWIDScreen::Show() {
31 if (actor_)
32 actor_->Show();
35 void WrongHWIDScreen::Hide() {
36 if (actor_)
37 actor_->Hide();
40 std::string WrongHWIDScreen::GetName() const {
41 return WizardController::kWrongHWIDScreenName;
44 void WrongHWIDScreen::OnExit() {
45 Finish(BaseScreenDelegate::WRONG_HWID_WARNING_SKIPPED);
48 void WrongHWIDScreen::OnActorDestroyed(WrongHWIDScreenActor* actor) {
49 if (actor_ == actor)
50 actor_ = NULL;
53 } // namespace chromeos