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

Side by Side Diff: content/public/test/memory_coordinator_test_utils.cc

Issue 2703743002: Refactor MemoryCoordinatorProxy (Closed)
Patch Set: Remove atomics Created 3 years, 10 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 | « content/browser/memory/memory_coordinator_impl_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "content/public/test/memory_coordinator_test_utils.h" 5 #include "content/public/test/memory_coordinator_test_utils.h"
6 6
7 #include "base/memory/memory_coordinator_proxy.h" 7 #include "base/memory/memory_coordinator_proxy.h"
8 #include "content/browser/memory/memory_coordinator_impl.h" 8 #include "content/browser/memory/memory_coordinator_impl.h"
9 #include "content/public/common/content_features.h" 9 #include "content/public/common/content_features.h"
10 10
11 namespace content { 11 namespace content {
12 12
13 void SetUpMemoryCoordinatorProxyForTesting() { 13 void SetUpMemoryCoordinatorProxyForTesting() {
14 base::MemoryCoordinatorProxy::GetInstance()-> 14 // Make sure that MemoryCoordinatorImpl is initialized.
15 SetGetCurrentMemoryStateCallback(base::Bind( 15 MemoryCoordinatorImpl::GetInstance();
16 &MemoryCoordinatorImpl::GetCurrentMemoryState,
17 base::Unretained(MemoryCoordinatorImpl::GetInstance())));
18 base::MemoryCoordinatorProxy::GetInstance()->
19 SetSetCurrentMemoryStateForTestingCallback(base::Bind(
20 &MemoryCoordinatorImpl::SetCurrentMemoryStateForTesting,
21 base::Unretained(MemoryCoordinatorImpl::GetInstance())));
22 } 16 }
23 17
24 } // namespace content 18 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/memory/memory_coordinator_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698