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

Side by Side Diff: chrome_elf/blacklist/blacklist.cc

Issue 343613003: Report when blacklist.cc fails to setup the blacklisting thunk. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update comment in blacklist.cc Created 6 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
« no previous file with comments | « chrome/browser/chrome_elf_init_win.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_elf/blacklist/blacklist.h" 5 #include "chrome_elf/blacklist/blacklist.h"
6 6
7 #include <assert.h> 7 #include <assert.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 0, 190 0,
191 &type, 191 &type,
192 reinterpret_cast<LPBYTE>(&blacklist_state), 192 reinterpret_cast<LPBYTE>(&blacklist_state),
193 &blacklist_state_size); 193 &blacklist_state_size);
194 194
195 if (result != ERROR_SUCCESS || type != REG_DWORD) { 195 if (result != ERROR_SUCCESS || type != REG_DWORD) {
196 ::RegCloseKey(key); 196 ::RegCloseKey(key);
197 return false; 197 return false;
198 } 198 }
199 199
200 // Reaching this point with the setup running state means the setup 200 // Reaching this point with the setup running state means the setup did not
201 // succeeded and so we reset to enabled. Any other state indicates that setup 201 // crash, so we reset to enabled. Any other state indicates that setup was
202 // was skipped; in that case we leave the state alone for later recording. 202 // skipped; in that case we leave the state alone for later recording.
203 if (blacklist_state == BLACKLIST_SETUP_RUNNING) 203 if (blacklist_state == BLACKLIST_SETUP_RUNNING)
204 result = SetDWValue(&key, kBeaconState, BLACKLIST_ENABLED); 204 result = SetDWValue(&key, kBeaconState, BLACKLIST_ENABLED);
205 205
206 ::RegCloseKey(key); 206 ::RegCloseKey(key);
207 return (result == ERROR_SUCCESS); 207 return (result == ERROR_SUCCESS);
208 } 208 }
209 209
210 int BlacklistSize() { 210 int BlacklistSize() {
211 int size = -1; 211 int size = -1;
212 while (blacklist::g_troublesome_dlls[++size] != NULL) {} 212 while (blacklist::g_troublesome_dlls[++size] != NULL) {}
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 } 416 }
417 417
418 // Delete the finch registry key to clear the values. 418 // Delete the finch registry key to clear the values.
419 result = ::RegDeleteKey(key, L""); 419 result = ::RegDeleteKey(key, L"");
420 420
421 ::RegCloseKey(key); 421 ::RegCloseKey(key);
422 return result == ERROR_SUCCESS; 422 return result == ERROR_SUCCESS;
423 } 423 }
424 424
425 } // namespace blacklist 425 } // namespace blacklist
OLDNEW
« no previous file with comments | « chrome/browser/chrome_elf_init_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698