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

Side by Side Diff: content/browser/browser_child_process_host_impl.cc

Issue 401083002: Initialize PowerMonitor on_power_battery intitial value for newly created processes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Typo Created 6 years, 5 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 | « no previous file | content/browser/power_monitor_message_broadcaster.h » ('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 #include "content/browser/browser_child_process_host_impl.h" 5 #include "content/browser/browser_child_process_host_impl.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 power_monitor_message_broadcaster_(this) { 99 power_monitor_message_broadcaster_(this) {
100 data_.id = ChildProcessHostImpl::GenerateChildProcessUniqueId(); 100 data_.id = ChildProcessHostImpl::GenerateChildProcessUniqueId();
101 101
102 child_process_host_.reset(ChildProcessHost::Create(this)); 102 child_process_host_.reset(ChildProcessHost::Create(this));
103 AddFilter(new TraceMessageFilter); 103 AddFilter(new TraceMessageFilter);
104 AddFilter(new ProfilerMessageFilter(process_type)); 104 AddFilter(new ProfilerMessageFilter(process_type));
105 AddFilter(new HistogramMessageFilter); 105 AddFilter(new HistogramMessageFilter);
106 106
107 g_child_process_list.Get().push_back(this); 107 g_child_process_list.Get().push_back(this);
108 GetContentClient()->browser()->BrowserChildProcessHostCreated(this); 108 GetContentClient()->browser()->BrowserChildProcessHostCreated(this);
109
110 power_monitor_message_broadcaster_.Init();
109 } 111 }
110 112
111 BrowserChildProcessHostImpl::~BrowserChildProcessHostImpl() { 113 BrowserChildProcessHostImpl::~BrowserChildProcessHostImpl() {
112 g_child_process_list.Get().remove(this); 114 g_child_process_list.Get().remove(this);
113 115
114 #if defined(OS_WIN) 116 #if defined(OS_WIN)
115 DeleteProcessWaitableEvent(early_exit_watcher_.GetWatchedEvent()); 117 DeleteProcessWaitableEvent(early_exit_watcher_.GetWatchedEvent());
116 #endif 118 #endif
117 } 119 }
118 120
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 361
360 void BrowserChildProcessHostImpl::OnProcessExitedEarly( 362 void BrowserChildProcessHostImpl::OnProcessExitedEarly(
361 base::WaitableEvent* event) { 363 base::WaitableEvent* event) {
362 DeleteProcessWaitableEvent(event); 364 DeleteProcessWaitableEvent(event);
363 OnChildDisconnected(); 365 OnChildDisconnected();
364 } 366 }
365 367
366 #endif 368 #endif
367 369
368 } // namespace content 370 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/power_monitor_message_broadcaster.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698