| 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 const SessionID& tab_id, | 208 const SessionID& tab_id, |
| 209 base::TimeTicks last_active_time); | 209 base::TimeTicks last_active_time); |
| 210 | 210 |
| 211 // Fetches the contents of the last session, notifying the callback when | 211 // Fetches the contents of the last session, notifying the callback when |
| 212 // done. If the callback is supplied an empty vector of SessionWindows | 212 // done. If the callback is supplied an empty vector of SessionWindows |
| 213 // it means the session could not be restored. | 213 // it means the session could not be restored. |
| 214 base::CancelableTaskTracker::TaskId GetLastSession( | 214 base::CancelableTaskTracker::TaskId GetLastSession( |
| 215 const sessions::GetLastSessionCallback& callback, | 215 const sessions::GetLastSessionCallback& callback, |
| 216 base::CancelableTaskTracker* tracker); | 216 base::CancelableTaskTracker* tracker); |
| 217 | 217 |
| 218 // sessions::BaseSessionServiceDelegate: | 218 // BaseSessionServiceDelegate: |
| 219 base::SequencedWorkerPool* GetBlockingPool() override; | 219 base::SequencedWorkerPool* GetBlockingPool() override; |
| 220 bool ShouldUseDelayedSave() override; | 220 bool ShouldUseDelayedSave() override; |
| 221 void OnSavedCommands() override; | 221 void OnSavedCommands() override; |
| 222 | 222 |
| 223 private: | 223 private: |
| 224 // Allow tests to access our innards for testing purposes. | 224 // Allow tests to access our innards for testing purposes. |
| 225 FRIEND_TEST_ALL_PREFIXES(SessionServiceTest, SavedSessionNotification); | 225 FRIEND_TEST_ALL_PREFIXES(SessionServiceTest, SavedSessionNotification); |
| 226 FRIEND_TEST_ALL_PREFIXES(SessionServiceTest, RestoreActivation1); | 226 FRIEND_TEST_ALL_PREFIXES(SessionServiceTest, RestoreActivation1); |
| 227 FRIEND_TEST_ALL_PREFIXES(SessionServiceTest, RestoreActivation2); | 227 FRIEND_TEST_ALL_PREFIXES(SessionServiceTest, RestoreActivation2); |
| 228 FRIEND_TEST_ALL_PREFIXES(SessionServiceTest, RemoveUnusedRestoreWindowsTest); | 228 FRIEND_TEST_ALL_PREFIXES(SessionServiceTest, RemoveUnusedRestoreWindowsTest); |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 // For browser_tests, since we want to simulate the browser shutting down | 399 // For browser_tests, since we want to simulate the browser shutting down |
| 400 // without quitting. | 400 // without quitting. |
| 401 bool force_browser_not_alive_with_no_windows_; | 401 bool force_browser_not_alive_with_no_windows_; |
| 402 | 402 |
| 403 base::WeakPtrFactory<SessionService> weak_factory_; | 403 base::WeakPtrFactory<SessionService> weak_factory_; |
| 404 | 404 |
| 405 DISALLOW_COPY_AND_ASSIGN(SessionService); | 405 DISALLOW_COPY_AND_ASSIGN(SessionService); |
| 406 }; | 406 }; |
| 407 | 407 |
| 408 #endif // CHROME_BROWSER_SESSIONS_SESSION_SERVICE_H_ | 408 #endif // CHROME_BROWSER_SESSIONS_SESSION_SERVICE_H_ |
| OLD | NEW |