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

Unified Diff: base/shared_memory_posix.cc

Issue 6469070: More DCHECK() updates. A mixture of _EQ and _GE. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Updating pickle.h order Created 9 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/platform_file_posix.cc ('k') | base/shared_memory_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/shared_memory_posix.cc
diff --git a/base/shared_memory_posix.cc b/base/shared_memory_posix.cc
index 843322b69801817458577ed7eaa92871497ff0d9..2cafea7d8980d24978b3a57f14aa1eb7a378ccec 100644
--- a/base/shared_memory_posix.cc
+++ b/base/shared_memory_posix.cc
@@ -98,7 +98,7 @@ bool SharedMemory::CreateAnonymous(uint32 size) {
// of mem_filename after FilePathForMemoryName().
bool SharedMemory::CreateNamed(const std::string& name,
bool open_existing, uint32 size) {
- DCHECK(mapped_file_ == -1);
+ DCHECK_EQ(-1, mapped_file_);
if (size == 0) return false;
// This function theoretically can block on the disk, but realistically
@@ -243,7 +243,7 @@ void SharedMemory::Unlock() {
}
bool SharedMemory::PrepareMapFile(FILE *fp) {
- DCHECK(mapped_file_ == -1);
+ DCHECK_EQ(-1, mapped_file_);
if (fp == NULL) return false;
// This function theoretically can block on the disk, but realistically
@@ -278,8 +278,8 @@ bool SharedMemory::FilePathForMemoryName(const std::string& mem_name,
FilePath* path) {
// mem_name will be used for a filename; make sure it doesn't
// contain anything which will confuse us.
- DCHECK(mem_name.find('/') == std::string::npos);
- DCHECK(mem_name.find('\0') == std::string::npos);
+ DCHECK_EQ(std::string::npos, mem_name.find('/'));
+ DCHECK_EQ(std::string::npos, mem_name.find('\0'));
FilePath temp_dir;
if (!file_util::GetShmemTempDir(&temp_dir))
« no previous file with comments | « base/platform_file_posix.cc ('k') | base/shared_memory_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698