summaryrefslogtreecommitdiffstats
path: root/chrome/browser/session_restore.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/session_restore.cc')
-rw-r--r--chrome/browser/session_restore.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/chrome/browser/session_restore.cc b/chrome/browser/session_restore.cc
index b8ec569..258ed7c 100644
--- a/chrome/browser/session_restore.cc
+++ b/chrome/browser/session_restore.cc
@@ -12,6 +12,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/navigation_controller.h"
#include "chrome/browser/profile.h"
+#include "chrome/browser/session_service.h"
#include "chrome/browser/tab_contents.h"
#include "chrome/common/notification_registrar.h"
#include "chrome/common/notification_service.h"
@@ -286,14 +287,14 @@ class SessionRestoreImpl : public NotificationObserver {
for (std::vector<SessionWindow*>::iterator i = windows->begin();
i != windows->end(); ++i) {
Browser* browser = NULL;
- if (!has_tabbed_browser && (*i)->type == BrowserType::TABBED_BROWSER)
+ if (!has_tabbed_browser && (*i)->type == Browser::TYPE_NORMAL)
has_tabbed_browser = true;
- if (i == windows->begin() && (*i)->type == BrowserType::TABBED_BROWSER &&
+ if (i == windows->begin() && (*i)->type == Browser::TYPE_NORMAL &&
!clobber_existing_window_) {
// If there is an open tabbed browser window, use it. Otherwise fall
// through and create a new one.
browser = current_browser;
- if (browser && (browser->type() != BrowserType::TABBED_BROWSER ||
+ if (browser && (browser->type() != Browser::TYPE_NORMAL ||
browser->profile()->IsOffTheRecord())) {
browser = NULL;
}
@@ -304,7 +305,7 @@ class SessionRestoreImpl : public NotificationObserver {
browser->set_override_maximized((*i)->is_maximized);
browser->CreateBrowserWindow();
}
- if ((*i)->type == BrowserType::TABBED_BROWSER)
+ if ((*i)->type == Browser::TYPE_NORMAL)
last_browser = browser;
const int initial_tab_count = browser->tab_count();
RestoreTabsToBrowser(*(*i), browser);
@@ -316,7 +317,7 @@ class SessionRestoreImpl : public NotificationObserver {
// included at least one tabbed browser, then close the browser window
// that was opened when the user clicked to restore the session.
if (clobber_existing_window_ && current_browser && has_tabbed_browser &&
- current_browser->type() == BrowserType::TABBED_BROWSER) {
+ current_browser->type() == Browser::TYPE_NORMAL) {
current_browser->CloseAllTabs();
}
if (last_browser && !urls_to_open_.empty())