OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/session_restore_delegate.h" | 5 #include "chrome/browser/sessions/session_restore_delegate.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 9 #include "base/macros.h" |
7 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
8 #include "chrome/browser/sessions/session_restore_stats_collector.h" | 11 #include "chrome/browser/sessions/session_restore_stats_collector.h" |
9 #include "chrome/browser/sessions/tab_loader.h" | 12 #include "chrome/browser/sessions/tab_loader.h" |
10 #include "chrome/common/url_constants.h" | 13 #include "chrome/common/url_constants.h" |
11 #include "components/favicon/content/content_favicon_driver.h" | 14 #include "components/favicon/content/content_favicon_driver.h" |
12 #include "content/public/browser/web_contents.h" | 15 #include "content/public/browser/web_contents.h" |
13 | 16 |
14 namespace { | 17 namespace { |
15 | 18 |
16 bool IsInternalPage(const GURL& url) { | 19 bool IsInternalPage(const GURL& url) { |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 stats_collector->TrackTabs(tabs); | 101 stats_collector->TrackTabs(tabs); |
99 for (const auto& restored_tab : tabs) { | 102 for (const auto& restored_tab : tabs) { |
100 if (!restored_tab.is_active()) { | 103 if (!restored_tab.is_active()) { |
101 // Non-active tabs aren't being loaded, so mark them as deferred. | 104 // Non-active tabs aren't being loaded, so mark them as deferred. |
102 auto tab_controller = &restored_tab.contents()->GetController(); | 105 auto tab_controller = &restored_tab.contents()->GetController(); |
103 stats_collector->DeferTab(tab_controller); | 106 stats_collector->DeferTab(tab_controller); |
104 } | 107 } |
105 } | 108 } |
106 } | 109 } |
107 } | 110 } |
OLD | NEW |