OLD | NEW |
1 // Copyright (c) 2010 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 #include "chrome/browser/sessions/tab_restore_service.h" | 5 #include "chrome/browser/sessions/tab_restore_service.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <iterator> | 8 #include <iterator> |
9 #include <map> | 9 #include <map> |
10 | 10 |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/metrics/histogram.h" | 12 #include "base/metrics/histogram.h" |
13 #include "base/scoped_vector.h" | 13 #include "base/scoped_vector.h" |
14 #include "base/stl_util-inl.h" | 14 #include "base/stl_util-inl.h" |
15 #include "chrome/browser/browser_list.h" | 15 #include "chrome/browser/browser_list.h" |
16 #include "chrome/browser/browser_window.h" | 16 #include "chrome/browser/browser_window.h" |
17 #include "chrome/browser/extensions/extension_service.h" | 17 #include "chrome/browser/extensions/extension_service.h" |
18 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
19 #include "chrome/browser/sessions/session_service.h" | 19 #include "chrome/browser/sessions/session_service.h" |
20 #include "chrome/browser/sessions/session_command.h" | 20 #include "chrome/browser/sessions/session_command.h" |
21 #include "chrome/browser/sessions/session_types.h" | 21 #include "chrome/browser/sessions/session_types.h" |
22 #include "chrome/browser/sessions/tab_restore_service_observer.h" | 22 #include "chrome/browser/sessions/tab_restore_service_observer.h" |
23 #include "chrome/browser/tab_contents/navigation_controller.h" | |
24 #include "chrome/browser/tab_contents/navigation_entry.h" | |
25 #include "chrome/browser/tab_contents/tab_contents.h" | |
26 #include "chrome/browser/tabs/tab_strip_model.h" | 23 #include "chrome/browser/tabs/tab_strip_model.h" |
27 #include "chrome/common/extensions/extension.h" | 24 #include "chrome/common/extensions/extension.h" |
28 #include "chrome/common/extensions/extension_constants.h" | 25 #include "chrome/common/extensions/extension_constants.h" |
| 26 #include "content/browser/tab_contents/navigation_controller.h" |
| 27 #include "content/browser/tab_contents/navigation_entry.h" |
| 28 #include "content/browser/tab_contents/tab_contents.h" |
29 | 29 |
30 using base::Time; | 30 using base::Time; |
31 | 31 |
32 // TimeFactory----------------------------------------------------------------- | 32 // TimeFactory----------------------------------------------------------------- |
33 | 33 |
34 TabRestoreService::TimeFactory::~TimeFactory() {} | 34 TabRestoreService::TimeFactory::~TimeFactory() {} |
35 | 35 |
36 // Entry ---------------------------------------------------------------------- | 36 // Entry ---------------------------------------------------------------------- |
37 | 37 |
38 // ID of the next Entry. | 38 // ID of the next Entry. |
(...skipping 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1078 // correctly write out the entries when Save is invoked (Save starts from | 1078 // correctly write out the entries when Save is invoked (Save starts from |
1079 // the front, not the end and we just added the entries to the end). | 1079 // the front, not the end and we just added the entries to the end). |
1080 entries_to_write_ = staging_entries_.size(); | 1080 entries_to_write_ = staging_entries_.size(); |
1081 | 1081 |
1082 PruneAndNotify(); | 1082 PruneAndNotify(); |
1083 } | 1083 } |
1084 | 1084 |
1085 Time TabRestoreService::TimeNow() const { | 1085 Time TabRestoreService::TimeNow() const { |
1086 return time_factory_ ? time_factory_->TimeNow() : Time::Now(); | 1086 return time_factory_ ? time_factory_->TimeNow() : Time::Now(); |
1087 } | 1087 } |
OLD | NEW |