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

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

Issue 2801073005: [reland] Do not block in SimpleThread::Start(). (Closed)
Patch Set: Created 3 years, 8 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 <utility> 10 #include <utility>
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 GetInterfaceRegistry()->AddInterface( 888 GetInterfaceRegistry()->AddInterface(
889 base::Bind(&EmbeddedWorkerInstanceClientImpl::Create, 889 base::Bind(&EmbeddedWorkerInstanceClientImpl::Create,
890 base::Unretained(embedded_worker_dispatcher_.get()))); 890 base::Unretained(embedded_worker_dispatcher_.get())));
891 891
892 GetConnector()->BindInterface(mojom::kBrowserServiceName, 892 GetConnector()->BindInterface(mojom::kBrowserServiceName,
893 mojo::MakeRequest(&storage_partition_service_)); 893 mojo::MakeRequest(&storage_partition_service_));
894 894
895 #if defined(OS_LINUX) 895 #if defined(OS_LINUX)
896 ChildProcess::current()->SetIOThreadPriority(base::ThreadPriority::DISPLAY); 896 ChildProcess::current()->SetIOThreadPriority(base::ThreadPriority::DISPLAY);
897 ChildThreadImpl::current()->SetThreadPriority( 897 ChildThreadImpl::current()->SetThreadPriority(
898 categorized_worker_pool_->background_worker_thread_id(), 898 categorized_worker_pool_->GetBackgroundWorkerThreadId(),
899 base::ThreadPriority::BACKGROUND); 899 base::ThreadPriority::BACKGROUND);
900 #endif 900 #endif
901 901
902 record_purge_suspend_metric_closure_.Reset(base::Bind( 902 record_purge_suspend_metric_closure_.Reset(base::Bind(
903 &RenderThreadImpl::RecordPurgeAndSuspendMetrics, base::Unretained(this))); 903 &RenderThreadImpl::RecordPurgeAndSuspendMetrics, base::Unretained(this)));
904 record_purge_suspend_growth_metric_closure_.Reset( 904 record_purge_suspend_growth_metric_closure_.Reset(
905 base::Bind(&RenderThreadImpl::RecordPurgeAndSuspendMemoryGrowthMetrics, 905 base::Bind(&RenderThreadImpl::RecordPurgeAndSuspendMemoryGrowthMetrics,
906 base::Unretained(this))); 906 base::Unretained(this)));
907 needs_to_record_first_active_paint_ = false; 907 needs_to_record_first_active_paint_ = false;
908 908
(...skipping 1565 matching lines...) Expand 10 before | Expand all | Expand 10 after
2474 } 2474 }
2475 } 2475 }
2476 2476
2477 void RenderThreadImpl::OnRendererInterfaceRequest( 2477 void RenderThreadImpl::OnRendererInterfaceRequest(
2478 mojom::RendererAssociatedRequest request) { 2478 mojom::RendererAssociatedRequest request) {
2479 DCHECK(!renderer_binding_.is_bound()); 2479 DCHECK(!renderer_binding_.is_bound());
2480 renderer_binding_.Bind(std::move(request)); 2480 renderer_binding_.Bind(std::move(request));
2481 } 2481 }
2482 2482
2483 } // namespace content 2483 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/categorized_worker_pool.cc ('k') | media/audio/win/audio_low_latency_output_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698