| Index: chrome/browser/sessions/session_service.h
|
| diff --git a/chrome/browser/sessions/session_service.h b/chrome/browser/sessions/session_service.h
|
| index d1b5f05bb2fdee81fbb87b990c4030cc2cd37dc8..98276fe4c83028ea1ad5c36a964eeb5138e8e24a 100644
|
| --- a/chrome/browser/sessions/session_service.h
|
| +++ b/chrome/browser/sessions/session_service.h
|
| @@ -9,6 +9,7 @@
|
|
|
| #include "base/basictypes.h"
|
| #include "chrome/browser/browser.h"
|
| +#include "chrome/browser/browser_list.h"
|
| #include "chrome/browser/defaults.h"
|
| #include "chrome/browser/sessions/base_session_service.h"
|
| #include "chrome/browser/sessions/session_id.h"
|
| @@ -330,6 +331,18 @@ class SessionService : public BaseSessionService,
|
| (type == Browser::TYPE_POPUP && browser_defaults::kRestorePopups);
|
| }
|
|
|
| + // Returns true if we should record a window close as pending.
|
| + // |has_open_trackable_browsers_| must be up-to-date before calling this.
|
| + bool should_record_close_as_pending() const {
|
| + // When this is called, the browser window being closed is still open, hence
|
| + // still in the browser list. If there is a browser window other than the
|
| + // one being closed but no trackable windows, then the others must be App
|
| + // windows or similar. In this case, we record the close as pending.
|
| + return !has_open_trackable_browsers_ &&
|
| + (!browser_defaults::kBrowserAliveWithNoWindows ||
|
| + BrowserList::size() > 1);
|
| + }
|
| +
|
| // Convert back/forward between the Browser and SessionService DB window
|
| // types.
|
| static WindowType WindowTypeForBrowserType(Browser::Type type);
|
|
|