Chromium Code Reviews| 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/memory/tab_manager.h" | 5 #include "chrome/browser/memory/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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 79 // Tabs.Discard.DiscardInLastMinute must be replaced with a new statistic. | 79 // Tabs.Discard.DiscardInLastMinute must be replaced with a new statistic. |
| 80 const int kRecentTabDiscardIntervalSeconds = 60; | 80 const int kRecentTabDiscardIntervalSeconds = 60; |
| 81 #endif | 81 #endif |
| 82 | 82 |
| 83 // If there has been no priority adjustment in this interval, assume the | 83 // If there has been no priority adjustment in this interval, assume the |
| 84 // machine was suspended and correct the timing statistics. | 84 // machine was suspended and correct the timing statistics. |
| 85 const int kSuspendThresholdSeconds = kAdjustmentIntervalSeconds * 4; | 85 const int kSuspendThresholdSeconds = kAdjustmentIntervalSeconds * 4; |
| 86 | 86 |
| 87 // A suspended renderer is suspended for this duration. | 87 // A suspended renderer is suspended for this duration. |
| 88 constexpr base::TimeDelta kDurationOfRendererSuspension = | 88 constexpr base::TimeDelta kDurationOfRendererSuspension = |
| 89 base::TimeDelta::FromSeconds(120); | 89 base::TimeDelta::FromSeconds(1200); |
|
bashi
2017/01/13 02:11:42
We no longer suspend renderers. Shouldn't we chang
tasak
2017/01/13 03:27:04
Acknowledged.
But currelty it is difficult to rena
bashi
2017/01/13 04:36:23
Yeah, currently it's difficult to rename as purgin
| |
| 90 | 90 |
| 91 // A resumed renderer is resumed for this duration. | 91 // A resumed renderer is resumed for this duration. |
| 92 constexpr base::TimeDelta kDurationOfRendererResumption = | 92 constexpr base::TimeDelta kDurationOfRendererResumption = |
| 93 base::TimeDelta::FromSeconds(10); | 93 base::TimeDelta::FromSeconds(10); |
| 94 | 94 |
| 95 // The time during which a tab is protected from discarding after it stops being | 95 // The time during which a tab is protected from discarding after it stops being |
| 96 // audible. | 96 // audible. |
| 97 const int kAudioProtectionTimeSeconds = 60; | 97 const int kAudioProtectionTimeSeconds = 60; |
| 98 | 98 |
| 99 int FindTabStripModelById(int64_t target_web_contents_id, | 99 int FindTabStripModelById(int64_t target_web_contents_id, |
| (...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1028 // platform. | 1028 // platform. |
| 1029 std::string allow_multiple_discards = variations::GetVariationParamValue( | 1029 std::string allow_multiple_discards = variations::GetVariationParamValue( |
| 1030 features::kAutomaticTabDiscarding.name, "AllowMultipleDiscards"); | 1030 features::kAutomaticTabDiscarding.name, "AllowMultipleDiscards"); |
| 1031 return (allow_multiple_discards != "true"); | 1031 return (allow_multiple_discards != "true"); |
| 1032 #else | 1032 #else |
| 1033 return false; | 1033 return false; |
| 1034 #endif | 1034 #endif |
| 1035 } | 1035 } |
| 1036 | 1036 |
| 1037 } // namespace memory | 1037 } // namespace memory |
| OLD | NEW |