Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(316)

Unified Diff: chrome/browser/sessions/session_service.cc

Issue 329040: Take 2 at this. The only change between this and the first is to add the GetT... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/sessions/session_service.h ('k') | chrome/browser/sessions/session_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sessions/session_service.cc
===================================================================
--- chrome/browser/sessions/session_service.cc (revision 30237)
+++ chrome/browser/sessions/session_service.cc (working copy)
@@ -119,14 +119,14 @@
SessionService::SessionService(Profile* profile)
: BaseSessionService(SESSION_RESTORE, profile, FilePath()),
- has_open_tabbed_browsers_(false),
+ has_open_trackable_browsers_(false),
move_on_new_browser_(false) {
Init();
}
SessionService::SessionService(const FilePath& save_path)
: BaseSessionService(SESSION_RESTORE, NULL, save_path),
- has_open_tabbed_browsers_(false),
+ has_open_trackable_browsers_(false),
move_on_new_browser_(false) {
Init();
}
@@ -216,7 +216,7 @@
// User closed the last tab in the last tabbed browser. Don't mark the
// tab closed.
pending_tab_close_ids_.insert(tab_id.id());
- has_open_tabbed_browsers_ = false;
+ has_open_trackable_browsers_ = false;
}
}
@@ -229,12 +229,12 @@
//
// NOTE: if the user chooses the exit menu item session service is destroyed
// and this code isn't hit.
- if (has_open_tabbed_browsers_) {
- // Closing a window can never make has_open_tabbed_browsers_ go from false
- // to true, so only update it if already true.
- has_open_tabbed_browsers_ = HasOpenTabbedBrowsers(window_id);
+ if (has_open_trackable_browsers_) {
+ // Closing a window can never make has_open_trackable_browsers_ go from
+ // false to true, so only update it if already true.
+ has_open_trackable_browsers_ = HasOpenTrackableBrowsers(window_id);
}
- if (!has_open_tabbed_browsers_)
+ if (!has_open_trackable_browsers_)
pending_window_close_ids_.insert(window_id.id());
else
window_closing_ids_.insert(window_id.id());
@@ -252,8 +252,8 @@
} else if (pending_window_close_ids_.find(window_id.id()) ==
pending_window_close_ids_.end()) {
// We'll hit this if user closed the last tab in a window.
- has_open_tabbed_browsers_ = HasOpenTabbedBrowsers(window_id);
- if (!has_open_tabbed_browsers_)
+ has_open_trackable_browsers_ = HasOpenTrackableBrowsers(window_id);
+ if (!has_open_trackable_browsers_)
pending_window_close_ids_.insert(window_id.id());
else
ScheduleCommand(CreateWindowClosedCommand(window_id.id()));
@@ -271,7 +271,7 @@
// pending closes.
CommitPendingCloses();
- has_open_tabbed_browsers_ = true;
+ has_open_trackable_browsers_ = true;
move_on_new_browser_ = true;
ScheduleCommand(CreateSetWindowTypeCommand(window_id, type));
@@ -409,7 +409,7 @@
return;
}
- if (!has_open_tabbed_browsers_ && !BrowserInit::InProcessStartup()) {
+ if (!has_open_trackable_browsers_ && !BrowserInit::InProcessStartup()) {
// We're going from no tabbed browsers to a tabbed browser (and not in
// process startup), restore the last session.
if (move_on_new_browser_) {
@@ -1019,7 +1019,7 @@
if (!windows_tracking_.empty()) {
// We're lazily created on startup and won't get an initial batch of
// SetWindowType messages. Set these here to make sure our state is correct.
- has_open_tabbed_browsers_ = true;
+ has_open_trackable_browsers_ = true;
move_on_new_browser_ = true;
}
StartSaveTimer();
@@ -1108,7 +1108,7 @@
}
// NOTE: This uses the original profile so that closing the last non-off the
- // record window while there are open off the record window resets state).
+ // record window while there are open off the record windows resets state).
int window_count = 0;
for (BrowserList::const_iterator i = BrowserList::begin();
i != BrowserList::end(); ++i) {
@@ -1127,7 +1127,7 @@
return true;
}
-bool SessionService::HasOpenTabbedBrowsers(const SessionID& window_id) {
+bool SessionService::HasOpenTrackableBrowsers(const SessionID& window_id) {
if (!profile()) {
// We're testing, always return false.
return true;
« no previous file with comments | « chrome/browser/sessions/session_service.h ('k') | chrome/browser/sessions/session_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698