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

Side by Side Diff: util/win/registration_protocol_win.cc

Issue 1415453012: win: Log the error code if CreateFile() fails during registration (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: TransactNamedPipe() like LoggingReadFile() Created 5 years, 1 month 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
« 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 2015 The Crashpad Authors. All rights reserved. 1 // Copyright 2015 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 sizeof(message), 52 sizeof(message),
53 response, 53 response,
54 sizeof(*response), 54 sizeof(*response),
55 &bytes_read, 55 &bytes_read,
56 nullptr); 56 nullptr);
57 if (!result) { 57 if (!result) {
58 PLOG(ERROR) << "TransactNamedPipe"; 58 PLOG(ERROR) << "TransactNamedPipe";
59 return false; 59 return false;
60 } 60 }
61 if (bytes_read != sizeof(*response)) { 61 if (bytes_read != sizeof(*response)) {
62 LOG(ERROR) << "TransactNamedPipe read incorrect number of bytes"; 62 LOG(ERROR) << "TransactNamedPipe: expected " << sizeof(*response)
63 << ", observed " << bytes_read;
63 return false; 64 return false;
64 } 65 }
65 return true; 66 return true;
66 } 67 }
67 68
68 LOG(ERROR) << "failed to connect after retrying"; 69 PLOG(ERROR) << "CreateFile";
69 return false; 70 return false;
70 } 71 }
71 72
72 } // namespace crashpad 73 } // namespace crashpad
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