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

Side by Side Diff: chrome/browser/install_verification/win/loaded_modules_snapshot.cc

Issue 1550593002: Switch to standard integer types in chrome/browser/, part 2 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/install_verification/win/loaded_modules_snapshot.h" 5 #include "chrome/browser/install_verification/win/loaded_modules_snapshot.h"
6 6
7 #include <Psapi.h> 7 #include <Psapi.h>
8 #include <stddef.h>
8 9
9 #include "base/logging.h" 10 #include "base/logging.h"
10 11
11 bool GetLoadedModulesSnapshot(std::vector<HMODULE>* snapshot) { 12 bool GetLoadedModulesSnapshot(std::vector<HMODULE>* snapshot) {
12 DCHECK(snapshot); 13 DCHECK(snapshot);
13 DCHECK_EQ(0u, snapshot->size()); 14 DCHECK_EQ(0u, snapshot->size());
14 snapshot->resize(1); 15 snapshot->resize(1);
15 16
16 HANDLE process = ::GetCurrentProcess(); 17 HANDLE process = ::GetCurrentProcess();
17 18
(...skipping 23 matching lines...) Expand all
41 return false; 42 return false;
42 } else { 43 } else {
43 // Buffer size was too small. Try again with a larger buffer. 44 // Buffer size was too small. Try again with a larger buffer.
44 snapshot->resize(num_modules, NULL); 45 snapshot->resize(num_modules, NULL);
45 } 46 }
46 } while (--retries_remaining); 47 } while (--retries_remaining);
47 48
48 DLOG(ERROR) << "Failed to enumerate modules."; 49 DLOG(ERROR) << "Failed to enumerate modules.";
49 return false; 50 return false;
50 } 51 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698