Lines Matching refs:GuardState
153 : guard_state_(check_usage ? GuardState::kBase : GuardState::kNoCheck), in FdFile()
168 guard_state_ = GuardState::kNoCheck; in FdFile()
173 if (kCheckSafeUsage && (guard_state_ < GuardState::kNoCheck)) { in Destroy()
174 if (guard_state_ < GuardState::kFlushed) { in Destroy()
177 if (guard_state_ < GuardState::kClosed) { in Destroy()
180 DCHECK_GE(guard_state_, GuardState::kClosed); in Destroy()
199 other.guard_state_ = GuardState::kClosed; in FdFile()
222 other.guard_state_ = GuardState::kClosed; in operator =()
234 guard_state_ = GuardState::kNoCheck; in Release()
258 guard_state_ = fd == -1 ? GuardState::kNoCheck : GuardState::kBase; in Reset()
260 guard_state_ = GuardState::kNoCheck; in Reset()
264 void FdFile::moveTo(GuardState target, GuardState warn_threshold, const char* warning) { in moveTo()
266 if (guard_state_ < GuardState::kNoCheck) { in moveTo()
267 if (warn_threshold < GuardState::kNoCheck && guard_state_ >= warn_threshold) { in moveTo()
275 void FdFile::moveUp(GuardState target, const char* warning) { in moveUp()
277 if (guard_state_ < GuardState::kNoCheck) { in moveUp()
307 guard_state_ = GuardState::kBase; in Open()
311 guard_state_ = GuardState::kNoCheck; in Open()
325 DCHECK_GE(guard_state_, GuardState::kFlushed) << "File " << file_path_ in Close()
327 moveUp(GuardState::kClosed, nullptr); in Close()
353 moveUp(GuardState::kFlushed, "Flushing closed file."); in Flush()
378 moveTo(GuardState::kBase, GuardState::kClosed, "Truncating closed file."); in SetLength()
395 moveTo(GuardState::kBase, GuardState::kClosed, "Writing into closed file."); in Write()
408 return guard_state_ != GuardState::kNoCheck; in CheckUsage()
448 moveTo(GuardState::kBase, GuardState::kClosed, "Writing into closed file."); in WriteFullyGeneric()
595 guard_state_ = GuardState::kNoCheck; in MarkUnchecked()