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

Side by Side Diff: base/win/registry.cc

Issue 6281008: Remove unnecessary DCHECK causing unit test failure.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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 | « no previous file | 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 (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/win/registry.h" 5 #include "base/win/registry.h"
6 6
7 #include <shlwapi.h> 7 #include <shlwapi.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/threading/thread_restrictions.h" 10 #include "base/threading/thread_restrictions.h"
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 } 212 }
213 } 213 }
214 214
215 return result; 215 return result;
216 } 216 }
217 217
218 GONG RegKey::WriteValue(const wchar_t* name, const void * data, 218 GONG RegKey::WriteValue(const wchar_t* name, const void * data,
219 DWORD dsize, DWORD dtype) { 219 DWORD dsize, DWORD dtype) {
220 base::ThreadRestrictions::AssertIOAllowed(); 220 base::ThreadRestrictions::AssertIOAllowed();
221 DCHECK(data); 221 DCHECK(data);
222 DCHECK(key_);
223 222
224 LONG result = RegSetValueEx(key_, name, 0, dtype, 223 LONG result = RegSetValueEx(key_, name, 0, dtype,
225 reinterpret_cast<LPBYTE>(const_cast<void*>(data)), dsize); 224 reinterpret_cast<LPBYTE>(const_cast<void*>(data)), dsize);
226 return result; 225 return result;
227 } 226 }
228 227
229 GONG RegKey::WriteValue(const wchar_t * name, const wchar_t* value) { 228 GONG RegKey::WriteValue(const wchar_t * name, const wchar_t* value) {
230 return WriteValue(name, value, 229 return WriteValue(name, value,
231 static_cast<DWORD>(sizeof(*value) * (wcslen(value) + 1)), REG_SZ); 230 static_cast<DWORD>(sizeof(*value) * (wcslen(value) + 1)), REG_SZ);
232 } 231 }
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 if (ERROR_SUCCESS == r) 402 if (ERROR_SUCCESS == r)
404 return true; 403 return true;
405 } 404 }
406 405
407 name_[0] = '\0'; 406 name_[0] = '\0';
408 return false; 407 return false;
409 } 408 }
410 409
411 } // namespace win 410 } // namespace win
412 } // namespace base 411 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698