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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 2447143003: Use kRenderClientId command line flag when starting a render process (Closed)
Patch Set: Added RenderThread::GetClientId() to fix the problem where some tests don't have the kRendererClien… Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 6ca91bed3a272b90adb6bde4aa7d0e2ec2715f07..a239010e900cbb8e4be2245f6e6ce113792a8841 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -1584,6 +1584,16 @@ base::WaitableEvent* RenderThreadImpl::GetShutdownEvent() {
return ChildProcess::current()->GetShutDownEvent();
}
+int32_t RenderThreadImpl::GetClientId() {
Fady Samuel 2016/10/28 20:59:34 if (base::CommandLine::ForCurrentProcess()->HasSwi
Alex Z. 2016/10/31 15:19:23 Done.
+ DCHECK(base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kRendererClientId));
+ int client_id;
+ base::StringToInt(base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ switches::kRendererClientId),
+ &client_id);
+ return client_id;
+}
+
void RenderThreadImpl::OnAssociatedInterfaceRequest(
const std::string& name,
mojo::ScopedInterfaceEndpointHandle handle) {

Powered by Google App Engine
This is Rietveld 408576698