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

Side by Side Diff: base/linux_util.cc

Issue 6851016: multiple files: Move from DCHECK to DCHECK_EQ (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 8 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/linux_util.h" 5 #include "base/linux_util.h"
6 6
7 #include <dirent.h> 7 #include <dirent.h>
8 #include <errno.h> 8 #include <errno.h>
9 #include <fcntl.h> 9 #include <fcntl.h>
10 #include <glib.h> 10 #include <glib.h>
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 if (STATE_DID_NOT_CHECK == state_) { 55 if (STATE_DID_NOT_CHECK == state_) {
56 state_ = STATE_CHECK_STARTED; 56 state_ = STATE_CHECK_STARTED;
57 return STATE_DID_NOT_CHECK; 57 return STATE_DID_NOT_CHECK;
58 } 58 }
59 return state_; 59 return state_;
60 } 60 }
61 61
62 // Indicate the check finished, move to STATE_CHECK_FINISHED. 62 // Indicate the check finished, move to STATE_CHECK_FINISHED.
63 void CheckFinished() { 63 void CheckFinished() {
64 base::AutoLock scoped_lock(lock_); 64 base::AutoLock scoped_lock(lock_);
65 DCHECK(state_ == STATE_CHECK_STARTED); 65 DCHECK_EQ(state_, STATE_CHECK_STARTED);
Lei Zhang 2011/04/14 19:39:21 It's DCHECK_EQ(expected_result, actual_result), so
66 state_ = STATE_CHECK_FINISHED; 66 state_ = STATE_CHECK_FINISHED;
67 } 67 }
68 68
69 private: 69 private:
70 base::Lock lock_; 70 base::Lock lock_;
71 LinuxDistroState state_; 71 LinuxDistroState state_;
72 }; 72 };
73 #endif // if defined(OS_LINUX) 73 #endif // if defined(OS_LINUX)
74 74
75 // expected prefix of the target of the /proc/self/fd/%d link for a socket 75 // expected prefix of the target of the /proc/self/fd/%d link for a socket
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 288
289 if (0 == strncmp(expected_data.c_str(), syscall_data.get(), 289 if (0 == strncmp(expected_data.c_str(), syscall_data.get(),
290 expected_data.length())) { 290 expected_data.length())) {
291 return current_tid; 291 return current_tid;
292 } 292 }
293 } 293 }
294 return -1; 294 return -1;
295 } 295 }
296 296
297 } // namespace base 297 } // 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