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

Side by Side Diff: content/child/child_thread_impl.cc

Issue 2334533002: base: Move renderer threads to the appropriate cpuset. (Closed)
Patch Set: Created 4 years, 3 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/child/child_thread_impl.h" 5 #include "content/child/child_thread_impl.h"
6 6
7 #include <signal.h> 7 #include <signal.h>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 } 724 }
725 } else { 725 } else {
726 // Send is allowed to fail during shutdown. Return null in this case. 726 // Send is allowed to fail during shutdown. Return null in this case.
727 if (out_of_memory) 727 if (out_of_memory)
728 *out_of_memory = false; 728 *out_of_memory = false;
729 return nullptr; 729 return nullptr;
730 } 730 }
731 return shared_buf; 731 return shared_buf;
732 } 732 }
733 733
734 void ChildThreadImpl::SetThreadAffinity(base::PlatformThreadId id,
735 base::ThreadPriority priority) {
736 Send(new ChildProcessHostMsg_SetThreadAffinity(id, priority));
737 }
738
734 bool ChildThreadImpl::OnMessageReceived(const IPC::Message& msg) { 739 bool ChildThreadImpl::OnMessageReceived(const IPC::Message& msg) {
735 // Resource responses are sent to the resource dispatcher. 740 // Resource responses are sent to the resource dispatcher.
736 if (resource_dispatcher_->OnMessageReceived(msg)) 741 if (resource_dispatcher_->OnMessageReceived(msg))
737 return true; 742 return true;
738 if (file_system_dispatcher_->OnMessageReceived(msg)) 743 if (file_system_dispatcher_->OnMessageReceived(msg))
739 return true; 744 return true;
740 745
741 bool handled = true; 746 bool handled = true;
742 IPC_BEGIN_MESSAGE_MAP(ChildThreadImpl, msg) 747 IPC_BEGIN_MESSAGE_MAP(ChildThreadImpl, msg)
743 IPC_MESSAGE_HANDLER(ChildProcessMsg_Shutdown, OnShutdown) 748 IPC_MESSAGE_HANDLER(ChildProcessMsg_Shutdown, OnShutdown)
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 void ChildThreadImpl::EnsureConnected() { 852 void ChildThreadImpl::EnsureConnected() {
848 VLOG(0) << "ChildThreadImpl::EnsureConnected()"; 853 VLOG(0) << "ChildThreadImpl::EnsureConnected()";
849 base::Process::Current().Terminate(0, false); 854 base::Process::Current().Terminate(0, false);
850 } 855 }
851 856
852 bool ChildThreadImpl::IsInBrowserProcess() const { 857 bool ChildThreadImpl::IsInBrowserProcess() const {
853 return static_cast<bool>(browser_process_io_runner_); 858 return static_cast<bool>(browser_process_io_runner_);
854 } 859 }
855 860
856 } // namespace content 861 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698