| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_RESTORE_H_ | 5 #ifndef CHROME_BROWSER_SESSIONS_SESSION_RESTORE_H_ |
| 6 #define CHROME_BROWSER_SESSIONS_SESSION_RESTORE_H_ | 6 #define CHROME_BROWSER_SESSIONS_SESSION_RESTORE_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "chrome/browser/history/history.h" | 10 #include "chrome/browser/history/history.h" |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 35 const std::vector<GURL>& urls_to_open); | 35 const std::vector<GURL>& urls_to_open); |
| 36 | 36 |
| 37 // Synchronously restores the last session. At least one tabbed browser is | 37 // Synchronously restores the last session. At least one tabbed browser is |
| 38 // created, even if there is an error in restoring. | 38 // created, even if there is an error in restoring. |
| 39 // | 39 // |
| 40 // If urls_to_open is non-empty, a tab is added for each of the URLs. | 40 // If urls_to_open is non-empty, a tab is added for each of the URLs. |
| 41 static void RestoreSessionSynchronously( | 41 static void RestoreSessionSynchronously( |
| 42 Profile* profile, | 42 Profile* profile, |
| 43 const std::vector<GURL>& urls_to_open); | 43 const std::vector<GURL>& urls_to_open); |
| 44 | 44 |
| 45 // Returns true if we're in the process of restoring. |
| 46 static bool IsRestoring(); |
| 47 |
| 45 // The max number of non-selected tabs SessionRestore loads when restoring | 48 // The max number of non-selected tabs SessionRestore loads when restoring |
| 46 // a session. A value of 0 indicates all tabs are loaded at once. | 49 // a session. A value of 0 indicates all tabs are loaded at once. |
| 47 static size_t num_tabs_to_load_; | 50 static size_t num_tabs_to_load_; |
| 48 | 51 |
| 49 private: | 52 private: |
| 50 SessionRestore(); | 53 SessionRestore(); |
| 51 | 54 |
| 52 DISALLOW_COPY_AND_ASSIGN(SessionRestore); | 55 DISALLOW_COPY_AND_ASSIGN(SessionRestore); |
| 53 }; | 56 }; |
| 54 | 57 |
| 55 #endif // CHROME_BROWSER_SESSIONS_SESSION_RESTORE_H_ | 58 #endif // CHROME_BROWSER_SESSIONS_SESSION_RESTORE_H_ |
| OLD | NEW |