| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_SESSIONS_SESSION_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SESSIONS_SESSION_SERVICE_H_ |
| 6 #define CHROME_BROWSER_SESSIONS_SESSION_SERVICE_H_ | 6 #define CHROME_BROWSER_SESSIONS_SESSION_SERVICE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 | 195 |
| 196 // Overridden from BaseSessionService because we want some UMA reporting on | 196 // Overridden from BaseSessionService because we want some UMA reporting on |
| 197 // session update activities. | 197 // session update activities. |
| 198 virtual void Save() OVERRIDE; | 198 virtual void Save() OVERRIDE; |
| 199 | 199 |
| 200 private: | 200 private: |
| 201 // Allow tests to access our innards for testing purposes. | 201 // Allow tests to access our innards for testing purposes. |
| 202 FRIEND_TEST_ALL_PREFIXES(SessionServiceTest, RestoreActivation1); | 202 FRIEND_TEST_ALL_PREFIXES(SessionServiceTest, RestoreActivation1); |
| 203 FRIEND_TEST_ALL_PREFIXES(SessionServiceTest, RestoreActivation2); | 203 FRIEND_TEST_ALL_PREFIXES(SessionServiceTest, RestoreActivation2); |
| 204 FRIEND_TEST_ALL_PREFIXES(NoStartupWindowTest, DontInitSessionServiceForApps); | 204 FRIEND_TEST_ALL_PREFIXES(NoStartupWindowTest, DontInitSessionServiceForApps); |
| 205 friend class BetterSessionRestoreTest; |
| 205 | 206 |
| 206 typedef std::map<SessionID::id_type, std::pair<int, int> > IdToRange; | 207 typedef std::map<SessionID::id_type, std::pair<int, int> > IdToRange; |
| 207 typedef std::map<SessionID::id_type, SessionTab*> IdToSessionTab; | 208 typedef std::map<SessionID::id_type, SessionTab*> IdToSessionTab; |
| 208 typedef std::map<SessionID::id_type, SessionWindow*> IdToSessionWindow; | 209 typedef std::map<SessionID::id_type, SessionWindow*> IdToSessionWindow; |
| 209 | 210 |
| 210 | 211 |
| 211 // These types mirror Browser::Type, but are re-defined here because these | 212 // These types mirror Browser::Type, but are re-defined here because these |
| 212 // specific enumeration _values_ are written into the session database and | 213 // specific enumeration _values_ are written into the session database and |
| 213 // are needed to maintain forward compatibility. | 214 // are needed to maintain forward compatibility. |
| 214 // Note that we only store browsers of type TYPE_TABBED and TYPE_POPUP. | 215 // Note that we only store browsers of type TYPE_TABBED and TYPE_POPUP. |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 const base::TimeDelta save_delay_in_hrs_; | 497 const base::TimeDelta save_delay_in_hrs_; |
| 497 | 498 |
| 498 // For browser_tests, since we want to simulate the browser shutting down | 499 // For browser_tests, since we want to simulate the browser shutting down |
| 499 // without quitting. | 500 // without quitting. |
| 500 bool force_browser_not_alive_with_no_windows_; | 501 bool force_browser_not_alive_with_no_windows_; |
| 501 | 502 |
| 502 DISALLOW_COPY_AND_ASSIGN(SessionService); | 503 DISALLOW_COPY_AND_ASSIGN(SessionService); |
| 503 }; | 504 }; |
| 504 | 505 |
| 505 #endif // CHROME_BROWSER_SESSIONS_SESSION_SERVICE_H_ | 506 #endif // CHROME_BROWSER_SESSIONS_SESSION_SERVICE_H_ |
| OLD | NEW |