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

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

Issue 1009413002: Revert "base: Implement browser process support for discardable memory." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 // In single process, browser main loop set up the discardable memory 659 base::DiscardableMemoryShmemAllocator::SetInstance(
660 // allocator. 660 ChildThreadImpl::discardable_shared_memory_manager());
661 if (!command_line.HasSwitch(switches::kSingleProcess)) {
662 base::DiscardableMemoryShmemAllocator::SetInstance(
663 ChildThreadImpl::discardable_shared_memory_manager());
664 }
665 661
666 service_registry()->AddService<RenderFrameSetup>( 662 service_registry()->AddService<RenderFrameSetup>(
667 base::Bind(CreateRenderFrameSetup)); 663 base::Bind(CreateRenderFrameSetup));
668 664
669 TRACE_EVENT_END_ETW("RenderThreadImpl::Init", 0, ""); 665 TRACE_EVENT_END_ETW("RenderThreadImpl::Init", 0, "");
670 } 666 }
671 667
672 RenderThreadImpl::~RenderThreadImpl() { 668 RenderThreadImpl::~RenderThreadImpl() {
673 } 669 }
674 670
(...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after
1810 } 1806 }
1811 1807
1812 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { 1808 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() {
1813 size_t erased = 1809 size_t erased =
1814 RenderThreadImpl::current()->pending_render_frame_connects_.erase( 1810 RenderThreadImpl::current()->pending_render_frame_connects_.erase(
1815 routing_id_); 1811 routing_id_);
1816 DCHECK_EQ(1u, erased); 1812 DCHECK_EQ(1u, erased);
1817 } 1813 }
1818 1814
1819 } // namespace content 1815 } // namespace content
OLDNEW
« no previous file with comments | « content/common/host_discardable_shared_memory_manager.cc ('k') | ui/app_list/test/run_all_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698