Switch global error menu icon to vectorized MD asset
[chromium-blink-merge.git] / chrome / browser / chromeos / login / screen_manager.cc
blob8b2e4c6a384b27ab119c4b5f5f5bd70e334df096
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
3 // found in the LICENSE file.
5 #include "chrome/browser/chromeos/login/screen_manager.h"
7 namespace chromeos {
9 ScreenManager::ScreenManager() {
12 ScreenManager::~ScreenManager() {
15 BaseScreen* ScreenManager::GetScreen(const std::string& screen_name) {
16 ScreenMap::const_iterator iter = screens_.find(screen_name);
17 if (iter != screens_.end()) {
18 return iter->second.get();
20 BaseScreen* result = CreateScreen(screen_name);
21 DCHECK(result) << "Can not create screen named " << screen_name;
22 screens_[screen_name] = make_linked_ptr(result);
23 return result;
26 bool ScreenManager::HasScreen(const std::string& screen_name) {
27 return screens_.count(screen_name) > 0;
30 } // namespace chromeos