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

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

Issue 985773002: Introducing phased profiling framework (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@write_to_file
Patch Set: Fial isherman@ comments Created 5 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 (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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 } 52 }
53 53
54 void NotifyProcessCrashed(const ChildProcessData& data) { 54 void NotifyProcessCrashed(const ChildProcessData& data) {
55 FOR_EACH_OBSERVER(BrowserChildProcessObserver, g_observers.Get(), 55 FOR_EACH_OBSERVER(BrowserChildProcessObserver, g_observers.Get(),
56 BrowserChildProcessCrashed(data)); 56 BrowserChildProcessCrashed(data));
57 } 57 }
58 58
59 } // namespace 59 } // namespace
60 60
61 BrowserChildProcessHost* BrowserChildProcessHost::Create( 61 BrowserChildProcessHost* BrowserChildProcessHost::Create(
62 int process_type, 62 content::ProcessType process_type,
63 BrowserChildProcessHostDelegate* delegate) { 63 BrowserChildProcessHostDelegate* delegate) {
cpu_(ooo_6.6-7.5) 2015/03/26 20:31:43 the changes here and in the .h file really out to
vadimt 2015/03/26 20:35:46 Ack
64 return new BrowserChildProcessHostImpl(process_type, delegate); 64 return new BrowserChildProcessHostImpl(process_type, delegate);
65 } 65 }
66 66
67 #if defined(OS_MACOSX) 67 #if defined(OS_MACOSX)
68 base::ProcessMetrics::PortProvider* BrowserChildProcessHost::GetPortProvider() { 68 base::ProcessMetrics::PortProvider* BrowserChildProcessHost::GetPortProvider() {
69 return MachBroker::GetInstance(); 69 return MachBroker::GetInstance();
70 } 70 }
71 #endif 71 #endif
72 72
73 // static 73 // static
(...skipping 10 matching lines...) Expand all
84 } 84 }
85 85
86 // static 86 // static
87 void BrowserChildProcessHostImpl::RemoveObserver( 87 void BrowserChildProcessHostImpl::RemoveObserver(
88 BrowserChildProcessObserver* observer) { 88 BrowserChildProcessObserver* observer) {
89 // TODO(phajdan.jr): Check thread after fixing http://crbug.com/167126. 89 // TODO(phajdan.jr): Check thread after fixing http://crbug.com/167126.
90 g_observers.Get().RemoveObserver(observer); 90 g_observers.Get().RemoveObserver(observer);
91 } 91 }
92 92
93 BrowserChildProcessHostImpl::BrowserChildProcessHostImpl( 93 BrowserChildProcessHostImpl::BrowserChildProcessHostImpl(
94 int process_type, 94 content::ProcessType process_type,
95 BrowserChildProcessHostDelegate* delegate) 95 BrowserChildProcessHostDelegate* delegate)
96 : data_(process_type), 96 : data_(process_type),
97 delegate_(delegate), 97 delegate_(delegate),
98 power_monitor_message_broadcaster_(this) { 98 power_monitor_message_broadcaster_(this) {
99 data_.id = ChildProcessHostImpl::GenerateChildProcessUniqueId(); 99 data_.id = ChildProcessHostImpl::GenerateChildProcessUniqueId();
100 100
101 child_process_host_.reset(ChildProcessHost::Create(this)); 101 child_process_host_.reset(ChildProcessHost::Create(this));
102 AddFilter(new TraceMessageFilter); 102 AddFilter(new TraceMessageFilter);
103 AddFilter(new ProfilerMessageFilter(process_type)); 103 AddFilter(new ProfilerMessageFilter(process_type));
104 AddFilter(new HistogramMessageFilter); 104 AddFilter(new HistogramMessageFilter);
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 339
340 #if defined(OS_WIN) 340 #if defined(OS_WIN)
341 341
342 void BrowserChildProcessHostImpl::OnObjectSignaled(HANDLE object) { 342 void BrowserChildProcessHostImpl::OnObjectSignaled(HANDLE object) {
343 OnChildDisconnected(); 343 OnChildDisconnected();
344 } 344 }
345 345
346 #endif 346 #endif
347 347
348 } // namespace content 348 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698