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

Side by Side Diff: content/child/child_process.h

Issue 2334533002: base: Move renderer threads to the appropriate cpuset. (Closed)
Patch Set: revert to CHECK_NE 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
« no previous file with comments | « content/browser/renderer_host/render_message_filter.cc ('k') | content/child/child_process.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CONTENT_CHILD_CHILD_PROCESS_H_ 5 #ifndef CONTENT_CHILD_CHILD_PROCESS_H_
6 #define CONTENT_CHILD_CHILD_PROCESS_H_ 6 #define CONTENT_CHILD_CHILD_PROCESS_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // These are used for ref-counting the child process. The process shuts 62 // These are used for ref-counting the child process. The process shuts
63 // itself down when the ref count reaches 0. 63 // itself down when the ref count reaches 0.
64 // For example, in the renderer process, generally each tab managed by this 64 // For example, in the renderer process, generally each tab managed by this
65 // process will hold a reference to the process, and release when closed. 65 // process will hold a reference to the process, and release when closed.
66 // However for renderer processes specifically, there is also fast shutdown 66 // However for renderer processes specifically, there is also fast shutdown
67 // code path initiated by the browser process. The process refcount does 67 // code path initiated by the browser process. The process refcount does
68 // not influence fast shutdown. See blink::Platform::suddenTerminationChanged. 68 // not influence fast shutdown. See blink::Platform::suddenTerminationChanged.
69 void AddRefProcess(); 69 void AddRefProcess();
70 void ReleaseProcess(); 70 void ReleaseProcess();
71 71
72 #if defined(OS_LINUX)
73 void SetIOThreadPriority(base::ThreadPriority io_thread_priority);
74 #endif
75
72 // Getter for the one ChildProcess object for this process. Can only be called 76 // Getter for the one ChildProcess object for this process. Can only be called
73 // on the main thread. 77 // on the main thread.
74 static ChildProcess* current(); 78 static ChildProcess* current();
75 79
76 static void WaitForDebugger(const std::string& label); 80 static void WaitForDebugger(const std::string& label);
77 private: 81 private:
78 int ref_count_; 82 int ref_count_;
79 83
80 // An event that will be signalled when we shutdown. 84 // An event that will be signalled when we shutdown.
81 base::WaitableEvent shutdown_event_; 85 base::WaitableEvent shutdown_event_;
82 86
83 // The thread that handles IO events. 87 // The thread that handles IO events.
84 base::Thread io_thread_; 88 base::Thread io_thread_;
85 89
86 // NOTE: make sure that main_thread_ is listed after shutdown_event_, since 90 // NOTE: make sure that main_thread_ is listed after shutdown_event_, since
87 // it depends on it (indirectly through IPC::SyncChannel). Same for 91 // it depends on it (indirectly through IPC::SyncChannel). Same for
88 // io_thread_. 92 // io_thread_.
89 std::unique_ptr<ChildThreadImpl> main_thread_; 93 std::unique_ptr<ChildThreadImpl> main_thread_;
90 94
91 DISALLOW_COPY_AND_ASSIGN(ChildProcess); 95 DISALLOW_COPY_AND_ASSIGN(ChildProcess);
92 }; 96 };
93 97
94 } // namespace content 98 } // namespace content
95 99
96 #endif // CONTENT_CHILD_CHILD_PROCESS_H_ 100 #endif // CONTENT_CHILD_CHILD_PROCESS_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_message_filter.cc ('k') | content/child/child_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698