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

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

Issue 2882513004: Remove renderer notifications of memory pressure. (Closed)
Patch Set: Merge Created 3 years, 7 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 | « chrome/browser/memory/tab_manager_unittest.cc ('k') | chrome/browser/memory/tab_stats.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/memory/tab_stats.h
diff --git a/chrome/browser/memory/tab_stats.h b/chrome/browser/memory/tab_stats.h
index b2be60adab6deb973810bc1da484a2dd57c1aba8..38cdb0179680bc28159e4c0003bac1deba59d419 100644
--- a/chrome/browser/memory/tab_stats.h
+++ b/chrome/browser/memory/tab_stats.h
@@ -23,26 +23,31 @@ namespace memory {
struct TabStats {
TabStats();
TabStats(const TabStats& other);
+ TabStats(TabStats&& other) noexcept;
~TabStats();
- bool is_app; // Browser window is an app.
- bool is_internal_page; // Internal page, such as NTP or Settings.
- bool is_media; // Playing audio, acessing cam/mic or mirroring display.
- bool is_pinned;
- bool is_selected; // Selected in the currently active browser window.
- bool is_discarded;
- bool has_form_entry; // User has entered text in a form.
- int discard_count;
+
+ TabStats& operator=(const TabStats& other);
+
+ bool is_app = false; // Browser window is an app.
+ bool is_internal_page = false; // Internal page, such as NTP or Settings.
+ // Playing audio, accessing cam/mic or mirroring display.
+ bool is_media = false;
+ bool is_pinned = false;
+ bool is_selected = false; // Selected in the currently active browser window.
+ bool is_discarded = false;
+ bool has_form_entry = false; // User has entered text in a form.
+ int discard_count = 0;
base::TimeTicks last_active;
base::TimeTicks last_hidden;
- content::RenderProcessHost* render_process_host;
- base::ProcessHandle renderer_handle;
- int child_process_host_id;
+ content::RenderProcessHost* render_process_host = nullptr;
+ base::ProcessHandle renderer_handle = 0;
+ int child_process_host_id = 0;
base::string16 title;
#if defined(OS_CHROMEOS)
- int oom_score;
+ int oom_score = 0;
#endif
- int64_t tab_contents_id; // Unique ID per WebContents.
- bool is_auto_discardable;
+ int64_t tab_contents_id = 0; // Unique ID per WebContents.
+ bool is_auto_discardable = true;
};
typedef std::vector<TabStats> TabStatsList;
« no previous file with comments | « chrome/browser/memory/tab_manager_unittest.cc ('k') | chrome/browser/memory/tab_stats.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698