Refactor WebsiteSettings to operate on a SecurityInfo
[chromium-blink-merge.git] / chrome / browser / sessions / session_service_utils.cc
blobcb36b4afa44c44b2be3c341e44d0622bb7e5e6b3
1 // Copyright 2014 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/sessions/session_service_utils.h"
7 sessions::SessionWindow::WindowType WindowTypeForBrowserType(
8 Browser::Type type) {
9 switch (type) {
10 case Browser::TYPE_POPUP:
11 return sessions::SessionWindow::TYPE_POPUP;
12 case Browser::TYPE_TABBED:
13 return sessions::SessionWindow::TYPE_TABBED;
15 NOTREACHED();
16 return sessions::SessionWindow::TYPE_TABBED;
19 Browser::Type BrowserTypeForWindowType(
20 sessions::SessionWindow::WindowType type) {
21 switch (type) {
22 case sessions::SessionWindow::TYPE_POPUP:
23 return Browser::TYPE_POPUP;
24 case sessions::SessionWindow::TYPE_TABBED:
25 return Browser::TYPE_TABBED;
27 NOTREACHED();
28 return Browser::TYPE_TABBED;