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

Unified Diff: content/renderer/render_thread_impl_discardable_memory_browsertest.cc

Issue 2589253002: Remove discardable_memory::DSMM::{Create,Get}Instance() (Closed)
Patch Set: Fix trybot Created 4 years 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 | « content/renderer/DEPS ('k') | services/ui/service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_thread_impl_discardable_memory_browsertest.cc
diff --git a/content/renderer/render_thread_impl_discardable_memory_browsertest.cc b/content/renderer/render_thread_impl_discardable_memory_browsertest.cc
index a9cf64bf8bc1859da2aa3bb02d249d216256f123..0fa7dcda45e8cbfb7984292790b05748a7803972 100644
--- a/content/renderer/render_thread_impl_discardable_memory_browsertest.cc
+++ b/content/renderer/render_thread_impl_discardable_memory_browsertest.cc
@@ -16,6 +16,7 @@
#include "build/build_config.h"
#include "components/discardable_memory/client/client_discardable_shared_memory_manager.h"
#include "components/discardable_memory/service/discardable_shared_memory_manager.h"
+#include "content/browser/browser_main_loop.h"
#include "content/public/common/content_switches.h"
#include "content/public/test/content_browser_test.h"
#include "content/public/test/content_browser_test_utils.h"
@@ -74,7 +75,8 @@ IN_PROC_BROWSER_TEST_F(RenderThreadImplDiscardableMemoryBrowserTest,
memory->Unlock();
// Purge all unlocked memory.
- discardable_memory::DiscardableSharedMemoryManager::GetInstance()
+ BrowserMainLoop::GetInstance()
+ ->discardable_shared_memory_manager()
->SetMemoryLimit(0);
// Should fail as memory should have been purged.
@@ -114,7 +116,8 @@ IN_PROC_BROWSER_TEST_F(RenderThreadImplDiscardableMemoryBrowserTest,
EXPECT_TRUE(memory);
memory.reset();
- EXPECT_GE(discardable_memory::DiscardableSharedMemoryManager::GetInstance()
+ EXPECT_GE(BrowserMainLoop::GetInstance()
+ ->discardable_shared_memory_manager()
->GetBytesAllocated(),
kSize);
@@ -124,7 +127,8 @@ IN_PROC_BROWSER_TEST_F(RenderThreadImplDiscardableMemoryBrowserTest,
base::TimeTicks end =
base::TimeTicks::Now() + base::TimeDelta::FromSeconds(5);
while (base::TimeTicks::Now() < end) {
- if (!discardable_memory::DiscardableSharedMemoryManager::GetInstance()
+ if (!BrowserMainLoop::GetInstance()
+ ->discardable_shared_memory_manager()
->GetBytesAllocated())
break;
}
« no previous file with comments | « content/renderer/DEPS ('k') | services/ui/service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698