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

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 1763353002: Disable UpdateProcessPriority() on startup by default. (Closed) Base URL: https://luckyluke-private.googlesource.com/src@a_3_thread_handles
Patch Set: fix test Created 4 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "content/browser/renderer_host/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 2520 matching lines...) Expand 10 before | Expand all | Expand 10 after
2531 if (child_process_launcher_) { 2531 if (child_process_launcher_) {
2532 DCHECK(child_process_launcher_->GetProcess().IsValid()); 2532 DCHECK(child_process_launcher_->GetProcess().IsValid());
2533 DCHECK(!is_process_backgrounded_); 2533 DCHECK(!is_process_backgrounded_);
2534 2534
2535 // Not all platforms launch processes in the same backgrounded state. Make 2535 // Not all platforms launch processes in the same backgrounded state. Make
2536 // sure |is_process_backgrounded_| reflects this platform's initial process 2536 // sure |is_process_backgrounded_| reflects this platform's initial process
2537 // state. 2537 // state.
2538 is_process_backgrounded_ = 2538 is_process_backgrounded_ =
2539 child_process_launcher_->GetProcess().IsProcessBackgrounded(); 2539 child_process_launcher_->GetProcess().IsProcessBackgrounded();
2540 2540
2541 #if defined(OS_WIN) 2541 // Disable updating process priority on startup for now as it incorrectly
2542 // Experiment with not setting the initial priority of a renderer, as this 2542 // results in backgrounding foreground navigations until their first commit
2543 // might be a visible tab but since no widgets are currently present, it 2543 // is made. A better long term solution would be to be aware of the tab's
2544 // will get backgrounded. See https://crbug.com/560446. 2544 // visibility at this point. https://crbug.com/560446.
2545 if (base::FeatureList::IsEnabled( 2545 // UpdateProcessPriority();
2546 features::kUpdateRendererPriorityOnStartup)) {
2547 UpdateProcessPriority();
2548 }
2549 #else
2550 UpdateProcessPriority();
2551 #endif
2552 } 2546 }
2553 2547
2554 // NOTE: This needs to be before sending queued messages because 2548 // NOTE: This needs to be before sending queued messages because
2555 // ExtensionService uses this notification to initialize the renderer process 2549 // ExtensionService uses this notification to initialize the renderer process
2556 // with state that must be there before any JavaScript executes. 2550 // with state that must be there before any JavaScript executes.
2557 // 2551 //
2558 // The queued messages contain such things as "navigate". If this notification 2552 // The queued messages contain such things as "navigate". If this notification
2559 // was after, we can end up executing JavaScript before the initialization 2553 // was after, we can end up executing JavaScript before the initialization
2560 // happens. 2554 // happens.
2561 NotificationService::current()->Notify(NOTIFICATION_RENDERER_PROCESS_CREATED, 2555 NotificationService::current()->Notify(NOTIFICATION_RENDERER_PROCESS_CREATED,
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
2792 void RenderProcessHostImpl::GetAudioOutputControllers( 2786 void RenderProcessHostImpl::GetAudioOutputControllers(
2793 const GetAudioOutputControllersCallback& callback) const { 2787 const GetAudioOutputControllersCallback& callback) const {
2794 audio_renderer_host()->GetOutputControllers(callback); 2788 audio_renderer_host()->GetOutputControllers(callback);
2795 } 2789 }
2796 2790
2797 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { 2791 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() {
2798 return bluetooth_dispatcher_host_.get(); 2792 return bluetooth_dispatcher_host_.get();
2799 } 2793 }
2800 2794
2801 } // namespace content 2795 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_process_host_chrome_browsertest.cc ('k') | content/public/common/content_features.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698