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

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 1004043002: Re-land: base: Implement browser process support for discardable memory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: set allocator instance for blink tests Created 5 years, 9 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
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 #include "content/renderer/render_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 649
650 #if defined(OS_ANDROID) || defined(OS_LINUX) 650 #if defined(OS_ANDROID) || defined(OS_LINUX)
651 if (!command_line.HasSwitch( 651 if (!command_line.HasSwitch(
652 switches::kUseNormalPriorityForTileTaskWorkerThreads)) { 652 switches::kUseNormalPriorityForTileTaskWorkerThreads)) {
653 cc::TileTaskWorkerPool::SetWorkerThreadPriority( 653 cc::TileTaskWorkerPool::SetWorkerThreadPriority(
654 base::kThreadPriority_Background); 654 base::kThreadPriority_Background);
655 } 655 }
656 #endif 656 #endif
657 } 657 }
658 658
659 base::DiscardableMemoryShmemAllocator::SetInstance( 659 // In single process, browser main loop set up the discardable memory
660 ChildThreadImpl::discardable_shared_memory_manager()); 660 // allocator.
661 if (!command_line.HasSwitch(switches::kSingleProcess)) {
662 base::DiscardableMemoryShmemAllocator::SetInstance(
663 ChildThreadImpl::discardable_shared_memory_manager());
664 }
661 665
662 service_registry()->AddService<RenderFrameSetup>( 666 service_registry()->AddService<RenderFrameSetup>(
663 base::Bind(CreateRenderFrameSetup)); 667 base::Bind(CreateRenderFrameSetup));
664 668
665 TRACE_EVENT_END_ETW("RenderThreadImpl::Init", 0, ""); 669 TRACE_EVENT_END_ETW("RenderThreadImpl::Init", 0, "");
666 } 670 }
667 671
668 RenderThreadImpl::~RenderThreadImpl() { 672 RenderThreadImpl::~RenderThreadImpl() {
669 } 673 }
670 674
(...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after
1806 } 1810 }
1807 1811
1808 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { 1812 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() {
1809 size_t erased = 1813 size_t erased =
1810 RenderThreadImpl::current()->pending_render_frame_connects_.erase( 1814 RenderThreadImpl::current()->pending_render_frame_connects_.erase(
1811 routing_id_); 1815 routing_id_);
1812 DCHECK_EQ(1u, erased); 1816 DCHECK_EQ(1u, erased);
1813 } 1817 }
1814 1818
1815 } // namespace content 1819 } // namespace content
OLDNEW
« no previous file with comments | « content/common/host_discardable_shared_memory_manager.cc ('k') | content/test/blink_test_environment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698