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

Side by Side Diff: chrome/browser/memory/tab_manager.h

Issue 2000833002: [TabManager] Unit tests to make sure of the number of times tabs can be discarded. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bug605533
Patch Set: Fixing final NIT Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/memory/tab_manager_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef CHROME_BROWSER_MEMORY_TAB_MANAGER_H_ 5 #ifndef CHROME_BROWSER_MEMORY_TAB_MANAGER_H_
6 #define CHROME_BROWSER_MEMORY_TAB_MANAGER_H_ 6 #define CHROME_BROWSER_MEMORY_TAB_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 115
116 // Used to set the test TickClock, which then gets used by NowTicks(). See 116 // Used to set the test TickClock, which then gets used by NowTicks(). See
117 // |test_tick_clock_| for more details. 117 // |test_tick_clock_| for more details.
118 void set_test_tick_clock(base::TickClock* test_tick_clock); 118 void set_test_tick_clock(base::TickClock* test_tick_clock);
119 119
120 // Returns the list of the stats for all renderers. Must be called on the UI 120 // Returns the list of the stats for all renderers. Must be called on the UI
121 // thread. 121 // thread.
122 TabStatsList GetUnsortedTabStats(); 122 TabStatsList GetUnsortedTabStats();
123 123
124 private: 124 private:
125 FRIEND_TEST_ALL_PREFIXES(TabManagerTest, CanOnlyDiscardOnce);
125 FRIEND_TEST_ALL_PREFIXES(TabManagerTest, ChildProcessNotifications); 126 FRIEND_TEST_ALL_PREFIXES(TabManagerTest, ChildProcessNotifications);
126 FRIEND_TEST_ALL_PREFIXES(TabManagerTest, Comparator); 127 FRIEND_TEST_ALL_PREFIXES(TabManagerTest, Comparator);
127 FRIEND_TEST_ALL_PREFIXES(TabManagerTest, DiscardedTabKeepsLastActiveTime); 128 FRIEND_TEST_ALL_PREFIXES(TabManagerTest, DiscardedTabKeepsLastActiveTime);
128 FRIEND_TEST_ALL_PREFIXES(TabManagerTest, DiscardWebContentsAt); 129 FRIEND_TEST_ALL_PREFIXES(TabManagerTest, DiscardWebContentsAt);
129 FRIEND_TEST_ALL_PREFIXES(TabManagerTest, InvalidOrEmptyURL); 130 FRIEND_TEST_ALL_PREFIXES(TabManagerTest, InvalidOrEmptyURL);
130 FRIEND_TEST_ALL_PREFIXES(TabManagerTest, IsInternalPage); 131 FRIEND_TEST_ALL_PREFIXES(TabManagerTest, IsInternalPage);
131 FRIEND_TEST_ALL_PREFIXES(TabManagerTest, OomPressureListener); 132 FRIEND_TEST_ALL_PREFIXES(TabManagerTest, OomPressureListener);
132 FRIEND_TEST_ALL_PREFIXES(TabManagerTest, ProtectPDFPages); 133 FRIEND_TEST_ALL_PREFIXES(TabManagerTest, ProtectPDFPages);
133 FRIEND_TEST_ALL_PREFIXES(TabManagerTest, ProtectRecentlyUsedTabs); 134 FRIEND_TEST_ALL_PREFIXES(TabManagerTest, ProtectRecentlyUsedTabs);
134 FRIEND_TEST_ALL_PREFIXES(TabManagerTest, ProtectVideoTabs); 135 FRIEND_TEST_ALL_PREFIXES(TabManagerTest, ProtectVideoTabs);
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 330
330 // Weak pointer factory used for posting delayed tasks to task_runner_. 331 // Weak pointer factory used for posting delayed tasks to task_runner_.
331 base::WeakPtrFactory<TabManager> weak_ptr_factory_; 332 base::WeakPtrFactory<TabManager> weak_ptr_factory_;
332 333
333 DISALLOW_COPY_AND_ASSIGN(TabManager); 334 DISALLOW_COPY_AND_ASSIGN(TabManager);
334 }; 335 };
335 336
336 } // namespace memory 337 } // namespace memory
337 338
338 #endif // CHROME_BROWSER_MEMORY_TAB_MANAGER_H_ 339 #endif // CHROME_BROWSER_MEMORY_TAB_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/memory/tab_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698