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/tab_loader.h" | 5 #include "chrome/browser/sessions/tab_loader.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/memory_pressure_monitor.h" | 10 #include "base/memory/memory_pressure_monitor.h" |
11 #include "base/metrics/histogram.h" | 11 #include "base/metrics/histogram.h" |
12 #include "base/strings/stringprintf.h" | 12 #include "base/strings/stringprintf.h" |
| 13 #include "build/build_config.h" |
13 #include "chrome/browser/sessions/session_restore_stats_collector.h" | 14 #include "chrome/browser/sessions/session_restore_stats_collector.h" |
14 #include "chrome/browser/ui/browser.h" | 15 #include "chrome/browser/ui/browser.h" |
15 #include "chrome/browser/ui/browser_finder.h" | 16 #include "chrome/browser/ui/browser_finder.h" |
16 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 17 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
17 #include "components/favicon/content/content_favicon_driver.h" | 18 #include "components/favicon/content/content_favicon_driver.h" |
18 #include "components/variations/variations_associated_data.h" | 19 #include "components/variations/variations_associated_data.h" |
19 #include "content/public/browser/navigation_controller.h" | 20 #include "content/public/browser/navigation_controller.h" |
20 #include "content/public/browser/notification_service.h" | 21 #include "content/public/browser/notification_service.h" |
21 #include "content/public/browser/notification_types.h" | 22 #include "content/public/browser/notification_types.h" |
22 #include "content/public/browser/render_widget_host.h" | 23 #include "content/public/browser/render_widget_host.h" |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 // memory pressure. | 284 // memory pressure. |
284 stats_collector_->DeferTab(tab); | 285 stats_collector_->DeferTab(tab); |
285 } | 286 } |
286 // By calling |LoadNextTab| explicitly, we make sure that the | 287 // By calling |LoadNextTab| explicitly, we make sure that the |
287 // |NOTIFICATION_SESSION_RESTORE_DONE| event gets sent. | 288 // |NOTIFICATION_SESSION_RESTORE_DONE| event gets sent. |
288 LoadNextTab(); | 289 LoadNextTab(); |
289 } | 290 } |
290 | 291 |
291 // static | 292 // static |
292 TabLoader* TabLoader::shared_tab_loader_ = nullptr; | 293 TabLoader* TabLoader::shared_tab_loader_ = nullptr; |
OLD | NEW |