| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #include "chrome/browser/tab_restore_service.h" | 5 #include "chrome/browser/tab_restore_service.h" |
| 6 | 6 |
| 7 #include "chrome/browser/profile.h" | 7 #include "chrome/browser/profile.h" |
| 8 #include "chrome/browser/navigation_controller.h" | 8 #include "chrome/browser/navigation_controller.h" |
| 9 #include "chrome/browser/navigation_entry.h" | 9 #include "chrome/browser/navigation_entry.h" |
| 10 | 10 |
| 11 using base::Time; |
| 12 |
| 11 // HistoricalTab -------------------------------------------------------------- | 13 // HistoricalTab -------------------------------------------------------------- |
| 12 | 14 |
| 13 // ID of the next HistoricalTab. | 15 // ID of the next HistoricalTab. |
| 14 static int next_historical_tab_id = 1; | 16 static int next_historical_tab_id = 1; |
| 15 | 17 |
| 16 TabRestoreService::HistoricalTab::HistoricalTab() | 18 TabRestoreService::HistoricalTab::HistoricalTab() |
| 17 : close_time(Time::Now()), | 19 : close_time(Time::Now()), |
| 18 from_last_session(false), | 20 from_last_session(false), |
| 19 current_navigation_index(-1), | 21 current_navigation_index(-1), |
| 20 id(next_historical_tab_id++) { | 22 id(next_historical_tab_id++) { |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 SessionTab* session_tab, | 174 SessionTab* session_tab, |
| 173 HistoricalTab* tab) { | 175 HistoricalTab* tab) { |
| 174 tab->navigations.swap(session_tab->navigations); | 176 tab->navigations.swap(session_tab->navigations); |
| 175 tab->from_last_session = true; | 177 tab->from_last_session = true; |
| 176 tab->current_navigation_index = session_tab->current_navigation_index; | 178 tab->current_navigation_index = session_tab->current_navigation_index; |
| 177 } | 179 } |
| 178 | 180 |
| 179 void TabRestoreService::NotifyTabsChanged() { | 181 void TabRestoreService::NotifyTabsChanged() { |
| 180 FOR_EACH_OBSERVER(Observer, observer_list_, TabRestoreServiceChanged(this)); | 182 FOR_EACH_OBSERVER(Observer, observer_list_, TabRestoreServiceChanged(this)); |
| 181 } | 183 } |
| 182 | |
| OLD | NEW |