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

Side by Side Diff: base/process_util.cc

Issue 7216031: Coverity: Initialize member variables. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "base/process_util.h" 5 #include "base/process_util.h"
6 6
7 namespace base { 7 namespace base {
8 8
9 #if defined(OS_POSIX) 9 #if defined(OS_POSIX)
10 ProcessEntry::ProcessEntry() {} 10 ProcessEntry::ProcessEntry() :pid_(0), ppid_(0), gid_(0) {}
vandebo (ex-Chrome) 2011/06/21 22:34:44 nit: :<space>pid_
11 ProcessEntry::~ProcessEntry() {} 11 ProcessEntry::~ProcessEntry() {}
12 #endif 12 #endif
13 13
14 int GetProcessCount(const FilePath::StringType& executable_name, 14 int GetProcessCount(const FilePath::StringType& executable_name,
15 const ProcessFilter* filter) { 15 const ProcessFilter* filter) {
16 int count = 0; 16 int count = 0;
17 NamedProcessIterator iter(executable_name, filter); 17 NamedProcessIterator iter(executable_name, filter);
18 while (iter.NextProcessEntry()) 18 while (iter.NextProcessEntry())
19 ++count; 19 ++count;
20 return count; 20 return count;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 NamedProcessIterator::NamedProcessIterator( 59 NamedProcessIterator::NamedProcessIterator(
60 const FilePath::StringType& executable_name, 60 const FilePath::StringType& executable_name,
61 const ProcessFilter* filter) : ProcessIterator(filter), 61 const ProcessFilter* filter) : ProcessIterator(filter),
62 executable_name_(executable_name) { 62 executable_name_(executable_name) {
63 } 63 }
64 64
65 NamedProcessIterator::~NamedProcessIterator() { 65 NamedProcessIterator::~NamedProcessIterator() {
66 } 66 }
67 67
68 } // namespace base 68 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698