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

Side by Side Diff: third_party/crashpad/crashpad/util/file/file_io.cc

Issue 2561963002: base: Remove the string logging from CHECK(). (Closed)
Patch Set: checkstring: rebase Created 4 years 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
OLDNEW
1 // Copyright 2014 The Crashpad Authors. All rights reserved. 1 // Copyright 2014 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 } 54 }
55 55
56 void CheckedWriteFile(FileHandle file, const void* buffer, size_t size) { 56 void CheckedWriteFile(FileHandle file, const void* buffer, size_t size) {
57 CHECK(LoggingWriteFile(file, buffer, size)); 57 CHECK(LoggingWriteFile(file, buffer, size));
58 } 58 }
59 59
60 void CheckedReadFileAtEOF(FileHandle file) { 60 void CheckedReadFileAtEOF(FileHandle file) {
61 char c; 61 char c;
62 FileOperationResult rv = ReadFile(file, &c, 1); 62 FileOperationResult rv = ReadFile(file, &c, 1);
63 if (rv < 0) { 63 if (rv < 0) {
64 PCHECK(rv == 0) << "read"; 64 // read
65 CHECK(rv == 0);
65 } else { 66 } else {
66 CHECK_EQ(rv, 0) << "read"; 67 // read
68 CHECK_EQ(rv, 0);
67 } 69 }
68 } 70 }
69 71
70 void CheckedCloseFile(FileHandle file) { 72 void CheckedCloseFile(FileHandle file) {
71 CHECK(LoggingCloseFile(file)); 73 CHECK(LoggingCloseFile(file));
72 } 74 }
73 75
74 } // namespace crashpad 76 } // namespace crashpad
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698