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

Unified Diff: ipc/file_descriptor_set_posix.cc

Issue 7817005: Convert some constants declared as anonymous enums into static consts so they have types. This d... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 4 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 | « ipc/file_descriptor_set_posix.h ('k') | ipc/file_descriptor_set_posix_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/file_descriptor_set_posix.cc
===================================================================
--- ipc/file_descriptor_set_posix.cc (revision 98481)
+++ ipc/file_descriptor_set_posix.cc (working copy)
@@ -36,7 +36,7 @@
}
bool FileDescriptorSet::Add(int fd) {
- if (descriptors_.size() == MAX_DESCRIPTORS_PER_MESSAGE)
+ if (descriptors_.size() == kMaxDescriptorsPerMessage)
return false;
struct base::FileDescriptor sd;
@@ -47,14 +47,14 @@
}
bool FileDescriptorSet::AddAndAutoClose(int fd) {
- if (descriptors_.size() == MAX_DESCRIPTORS_PER_MESSAGE)
+ if (descriptors_.size() == kMaxDescriptorsPerMessage)
return false;
struct base::FileDescriptor sd;
sd.fd = fd;
sd.auto_close = true;
descriptors_.push_back(sd);
- DCHECK(descriptors_.size() <= MAX_DESCRIPTORS_PER_MESSAGE);
+ DCHECK(descriptors_.size() <= kMaxDescriptorsPerMessage);
return true;
}
@@ -122,7 +122,7 @@
}
void FileDescriptorSet::SetDescriptors(const int* buffer, unsigned count) {
- DCHECK_LE(count, MAX_DESCRIPTORS_PER_MESSAGE);
+ DCHECK(count <= kMaxDescriptorsPerMessage);
DCHECK_EQ(descriptors_.size(), 0u);
DCHECK_EQ(consumed_descriptor_highwater_, 0u);
« no previous file with comments | « ipc/file_descriptor_set_posix.h ('k') | ipc/file_descriptor_set_posix_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698