| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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/sessions/session_service_utils.h" | 5 #include "chrome/browser/sessions/session_service_utils.h" |
| 6 | 6 |
| 7 const int gMaxPersistNavigationCount = 6; |
| 8 |
| 7 SessionWindow::WindowType WindowTypeForBrowserType(Browser::Type type) { | 9 SessionWindow::WindowType WindowTypeForBrowserType(Browser::Type type) { |
| 8 switch (type) { | 10 switch (type) { |
| 9 case Browser::TYPE_POPUP: | 11 case Browser::TYPE_POPUP: |
| 10 return SessionWindow::TYPE_POPUP; | 12 return SessionWindow::TYPE_POPUP; |
| 11 case Browser::TYPE_TABBED: | 13 case Browser::TYPE_TABBED: |
| 12 return SessionWindow::TYPE_TABBED; | 14 return SessionWindow::TYPE_TABBED; |
| 13 } | 15 } |
| 14 NOTREACHED(); | 16 NOTREACHED(); |
| 15 return SessionWindow::TYPE_TABBED; | 17 return SessionWindow::TYPE_TABBED; |
| 16 } | 18 } |
| 17 | 19 |
| 18 Browser::Type BrowserTypeForWindowType(SessionWindow::WindowType type) { | 20 Browser::Type BrowserTypeForWindowType(SessionWindow::WindowType type) { |
| 19 switch (type) { | 21 switch (type) { |
| 20 case SessionWindow::TYPE_POPUP: | 22 case SessionWindow::TYPE_POPUP: |
| 21 return Browser::TYPE_POPUP; | 23 return Browser::TYPE_POPUP; |
| 22 case SessionWindow::TYPE_TABBED: | 24 case SessionWindow::TYPE_TABBED: |
| 23 return Browser::TYPE_TABBED; | 25 return Browser::TYPE_TABBED; |
| 24 } | 26 } |
| 25 NOTREACHED(); | 27 NOTREACHED(); |
| 26 return Browser::TYPE_TABBED; | 28 return Browser::TYPE_TABBED; |
| 27 } | 29 } |
| OLD | NEW |