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

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

Issue 1862513003: Remove NPAPI from browser and utility (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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/browser/histogram_controller.h" 5 #include "content/browser/histogram_controller.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/process/process_handle.h" 9 #include "base/process/process_handle.h"
10 #include "content/browser/histogram_subscriber.h" 10 #include "content/browser/histogram_subscriber.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 } 68 }
69 69
70 void HistogramController::GetHistogramDataFromChildProcesses( 70 void HistogramController::GetHistogramDataFromChildProcesses(
71 int sequence_number) { 71 int sequence_number) {
72 DCHECK_CURRENTLY_ON(BrowserThread::IO); 72 DCHECK_CURRENTLY_ON(BrowserThread::IO);
73 73
74 int pending_processes = 0; 74 int pending_processes = 0;
75 for (BrowserChildProcessHostIterator iter; !iter.Done(); ++iter) { 75 for (BrowserChildProcessHostIterator iter; !iter.Done(); ++iter) {
76 const ChildProcessData& data = iter.GetData(); 76 const ChildProcessData& data = iter.GetData();
77 int type = data.process_type; 77 int type = data.process_type;
78 if (type != PROCESS_TYPE_PLUGIN && 78 if (type != PROCESS_TYPE_GPU &&
79 type != PROCESS_TYPE_GPU &&
80 type != PROCESS_TYPE_PPAPI_PLUGIN && 79 type != PROCESS_TYPE_PPAPI_PLUGIN &&
81 type != PROCESS_TYPE_PPAPI_BROKER) { 80 type != PROCESS_TYPE_PPAPI_BROKER) {
82 continue; 81 continue;
83 } 82 }
84 83
85 // In some cases, there may be no child process of the given type (for 84 // In some cases, there may be no child process of the given type (for
86 // example, the GPU process may not exist and there may instead just be a 85 // example, the GPU process may not exist and there may instead just be a
87 // GPU thread in the browser process). If that's the case, then the process 86 // GPU thread in the browser process). If that's the case, then the process
88 // handle will be base::kNullProcessHandle and we shouldn't ask it for data. 87 // handle will be base::kNullProcessHandle and we shouldn't ask it for data.
89 if (data.handle == base::kNullProcessHandle) 88 if (data.handle == base::kNullProcessHandle)
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 120
122 BrowserThread::PostTask( 121 BrowserThread::PostTask(
123 BrowserThread::IO, 122 BrowserThread::IO,
124 FROM_HERE, 123 FROM_HERE,
125 base::Bind(&HistogramController::GetHistogramDataFromChildProcesses, 124 base::Bind(&HistogramController::GetHistogramDataFromChildProcesses,
126 base::Unretained(this), 125 base::Unretained(this),
127 sequence_number)); 126 sequence_number));
128 } 127 }
129 128
130 } // namespace content 129 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl_private.cc ('k') | content/browser/loader/resource_dispatcher_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698