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

Side by Side Diff: base/file_util_win.cc

Issue 8965054: Coverity: Initialize member variables. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes. Created 9 years 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
« no previous file with comments | « no previous file | chrome/browser/autocomplete_history_manager.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/file_util.h" 5 #include "base/file_util.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <propvarutil.h> 8 #include <propvarutil.h>
9 #include <psapi.h> 9 #include <psapi.h>
10 #include <shellapi.h> 10 #include <shellapi.h>
(...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 824
825 FileEnumerator::FileEnumerator(const FilePath& root_path, 825 FileEnumerator::FileEnumerator(const FilePath& root_path,
826 bool recursive, 826 bool recursive,
827 FileType file_type) 827 FileType file_type)
828 : recursive_(recursive), 828 : recursive_(recursive),
829 file_type_(file_type), 829 file_type_(file_type),
830 has_find_data_(false), 830 has_find_data_(false),
831 find_handle_(INVALID_HANDLE_VALUE) { 831 find_handle_(INVALID_HANDLE_VALUE) {
832 // INCLUDE_DOT_DOT must not be specified if recursive. 832 // INCLUDE_DOT_DOT must not be specified if recursive.
833 DCHECK(!(recursive && (INCLUDE_DOT_DOT & file_type_))); 833 DCHECK(!(recursive && (INCLUDE_DOT_DOT & file_type_)));
834 memset(&find_data_, 0, sizeof(find_data_));
834 pending_paths_.push(root_path); 835 pending_paths_.push(root_path);
835 } 836 }
836 837
837 FileEnumerator::FileEnumerator(const FilePath& root_path, 838 FileEnumerator::FileEnumerator(const FilePath& root_path,
838 bool recursive, 839 bool recursive,
839 FileType file_type, 840 FileType file_type,
840 const FilePath::StringType& pattern) 841 const FilePath::StringType& pattern)
841 : recursive_(recursive), 842 : recursive_(recursive),
842 file_type_(file_type), 843 file_type_(file_type),
843 has_find_data_(false), 844 has_find_data_(false),
844 pattern_(pattern), 845 pattern_(pattern),
845 find_handle_(INVALID_HANDLE_VALUE) { 846 find_handle_(INVALID_HANDLE_VALUE) {
846 // INCLUDE_DOT_DOT must not be specified if recursive. 847 // INCLUDE_DOT_DOT must not be specified if recursive.
847 DCHECK(!(recursive && (INCLUDE_DOT_DOT & file_type_))); 848 DCHECK(!(recursive && (INCLUDE_DOT_DOT & file_type_)));
849 memset(&find_data_, 0, sizeof(find_data_));
848 pending_paths_.push(root_path); 850 pending_paths_.push(root_path);
849 } 851 }
850 852
851 FileEnumerator::~FileEnumerator() { 853 FileEnumerator::~FileEnumerator() {
852 if (find_handle_ != INVALID_HANDLE_VALUE) 854 if (find_handle_ != INVALID_HANDLE_VALUE)
853 FindClose(find_handle_); 855 FindClose(find_handle_);
854 } 856 }
855 857
856 void FileEnumerator::GetFindInfo(FindInfo* info) { 858 void FileEnumerator::GetFindInfo(FindInfo* info) {
857 DCHECK(info); 859 DCHECK(info);
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
1160 uint8 unused = *(touch + offset); 1162 uint8 unused = *(touch + offset);
1161 offset += step_size; 1163 offset += step_size;
1162 } 1164 }
1163 FreeLibrary(dll_module); 1165 FreeLibrary(dll_module);
1164 } 1166 }
1165 1167
1166 return true; 1168 return true;
1167 } 1169 }
1168 1170
1169 } // namespace file_util 1171 } // namespace file_util
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autocomplete_history_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698