OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/resource_coordinator/tab_manager.h" | 5 #include "chrome/browser/resource_coordinator/tab_manager.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <set> | 10 #include <set> |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 | 104 |
105 TabManager::TabManager() | 105 TabManager::TabManager() |
106 : discard_count_(0), | 106 : discard_count_(0), |
107 recent_tab_discard_(false), | 107 recent_tab_discard_(false), |
108 discard_once_(false), | 108 discard_once_(false), |
109 #if !defined(OS_CHROMEOS) | 109 #if !defined(OS_CHROMEOS) |
110 minimum_protection_time_(base::TimeDelta::FromMinutes(10)), | 110 minimum_protection_time_(base::TimeDelta::FromMinutes(10)), |
111 #endif | 111 #endif |
112 browser_tab_strip_tracker_(this, nullptr, nullptr), | 112 browser_tab_strip_tracker_(this, nullptr, nullptr), |
113 test_tick_clock_(nullptr), | 113 test_tick_clock_(nullptr), |
| 114 is_during_session_restore_(false), |
114 weak_ptr_factory_(this) { | 115 weak_ptr_factory_(this) { |
115 #if defined(OS_CHROMEOS) | 116 #if defined(OS_CHROMEOS) |
116 delegate_.reset(new TabManagerDelegate(weak_ptr_factory_.GetWeakPtr())); | 117 delegate_.reset(new TabManagerDelegate(weak_ptr_factory_.GetWeakPtr())); |
117 #endif | 118 #endif |
118 browser_tab_strip_tracker_.Init(); | 119 browser_tab_strip_tracker_.Init(); |
119 } | 120 } |
120 | 121 |
121 TabManager::~TabManager() { | 122 TabManager::~TabManager() { |
122 Stop(); | 123 Stop(); |
123 } | 124 } |
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
875 // platform. | 876 // platform. |
876 std::string allow_multiple_discards = variations::GetVariationParamValue( | 877 std::string allow_multiple_discards = variations::GetVariationParamValue( |
877 features::kAutomaticTabDiscarding.name, "AllowMultipleDiscards"); | 878 features::kAutomaticTabDiscarding.name, "AllowMultipleDiscards"); |
878 return (allow_multiple_discards != "true"); | 879 return (allow_multiple_discards != "true"); |
879 #else | 880 #else |
880 return false; | 881 return false; |
881 #endif | 882 #endif |
882 } | 883 } |
883 | 884 |
884 } // namespace resource_coordinator | 885 } // namespace resource_coordinator |
OLD | NEW |