| Index: content/browser/profiler_controller_impl.cc
|
| ===================================================================
|
| --- content/browser/profiler_controller_impl.cc (revision 276708)
|
| +++ content/browser/profiler_controller_impl.cc (working copy)
|
| @@ -5,7 +5,7 @@
|
| #include "content/browser/profiler_controller_impl.h"
|
|
|
| #include "base/bind.h"
|
| -#include "base/command_line.h"
|
| +#include "base/process/process_handle.h"
|
| #include "base/tracked_objects.h"
|
| #include "content/common/child_process_messages.h"
|
| #include "content/public/browser/browser_child_process_host_iterator.h"
|
| @@ -13,7 +13,6 @@
|
| #include "content/public/browser/child_process_data.h"
|
| #include "content/public/browser/profiler_subscriber.h"
|
| #include "content/public/browser/render_process_host.h"
|
| -#include "content/public/common/content_switches.h"
|
|
|
| namespace content {
|
|
|
| @@ -78,12 +77,12 @@
|
|
|
| int pending_processes = 0;
|
| for (BrowserChildProcessHostIterator iter; !iter.Done(); ++iter) {
|
| - // Skips requesting profiler data from the "GPU Process" if we are using in
|
| - // process GPU. Those stats should be in the Browser-process's GPU thread.
|
| - if (iter.GetData().process_type == PROCESS_TYPE_GPU &&
|
| - CommandLine::ForCurrentProcess()->HasSwitch(switches::kInProcessGPU)) {
|
| + // In some cases, there may be no child process of the given type (for
|
| + // example, the GPU process may not exist and there may instead just be a
|
| + // GPU thread in the browser process). If that's the case, then the process
|
| + // handle will be base::kNullProcessHandle and we shouldn't ask it for data.
|
| + if (iter.GetData().handle == base::kNullProcessHandle)
|
| continue;
|
| - }
|
|
|
| ++pending_processes;
|
| if (!iter.Send(new ChildProcessMsg_GetChildProfilerData(sequence_number)))
|
|
|