Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(863)

Unified Diff: chrome/browser/memory/tab_manager_delegate_chromeos.h

Issue 2855003003: (Manually reverted) Revert of Do not kill recently killed ARC processes again (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/memory/tab_manager_delegate_chromeos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/memory/tab_manager_delegate_chromeos.h
diff --git a/chrome/browser/memory/tab_manager_delegate_chromeos.h b/chrome/browser/memory/tab_manager_delegate_chromeos.h
index 07cad6f423b0447bc5a626fc936bae4c2f6773d3..ec9d4cad972b986ccc181849f91ccb665e3e9aca 100644
--- a/chrome/browser/memory/tab_manager_delegate_chromeos.h
+++ b/chrome/browser/memory/tab_manager_delegate_chromeos.h
@@ -6,7 +6,6 @@
#define CHROME_BROWSER_MEMORY_TAB_MANAGER_DELEGATE_CHROMEOS_H_
#include <memory>
-#include <string>
#include <utility>
#include <vector>
@@ -79,11 +78,6 @@
// Called when the timer fires, sets oom_adjust_score for all renderers.
void AdjustOomPriorities(const TabStatsList& tab_list);
- // Returns true if the process has recently been killed.
- // Virtual for unit testing.
- virtual bool IsRecentlyKilledArcProcess(const std::string& process_name,
- const base::TimeTicks& now);
-
protected:
// Kills an ARC process. Returns true if the kill request is successfully sent
// to Android. Virtual for unit testing.
@@ -93,14 +87,11 @@
// Virtual for unit testing.
virtual bool KillTab(int64_t tab_id);
- // Get debugd client instance. Virtual for unit testing.
+ // Get debugd client instance.
virtual chromeos::DebugDaemonClient* GetDebugDaemonClient();
private:
FRIEND_TEST_ALL_PREFIXES(TabManagerDelegateTest, CandidatesSorted);
- FRIEND_TEST_ALL_PREFIXES(TabManagerDelegateTest, IsRecentlyKilledArcProcess);
- FRIEND_TEST_ALL_PREFIXES(TabManagerDelegateTest,
- DoNotKillRecentlyKilledArcProcesses);
FRIEND_TEST_ALL_PREFIXES(TabManagerDelegateTest, KillMultipleProcesses);
FRIEND_TEST_ALL_PREFIXES(TabManagerDelegateTest, SetOomScoreAdj);
@@ -120,9 +111,6 @@
// Cache OOM scores in memory.
typedef base::hash_map<base::ProcessHandle, int> ProcessScoreMap;
-
- // A map from an ARC process name to a monotonic timestamp when it's killed.
- typedef base::hash_map<std::string, base::TimeTicks> KilledArcProcessesMap;
// Get the list of candidates to kill, sorted by descending importance.
static std::vector<Candidate> GetSortedCandidates(
@@ -161,14 +149,6 @@
// Initiates an oom priority adjustment.
void ScheduleEarlyOomPrioritiesAdjustment();
- // Returns a TimeDelta object that represents a minimum delay for killing
- // the same ARC process again. ARC processes sometimes respawn right after
- // being killed. In that case, killing them every time is just a waste of
- // resources.
- static constexpr base::TimeDelta GetArcRespawnKillDelay() {
- return base::TimeDelta::FromSeconds(60);
- }
-
// Holds a reference to the owning TabManager.
const base::WeakPtr<TabManager> tab_manager_;
@@ -184,9 +164,6 @@
// Map maintaining the process handle - oom_score mapping.
ProcessScoreMap oom_score_map_;
-
- // Map maintaing ARC process names and their last killed time.
- KilledArcProcessesMap recently_killed_arc_processes_;
// Util for getting system memory status.
std::unique_ptr<TabManagerDelegate::MemoryStat> mem_stat_;
« no previous file with comments | « no previous file | chrome/browser/memory/tab_manager_delegate_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698