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

Side by Side Diff: tools/crashpad_database_util.cc

Issue 1416493006: Change file op |ssize_t|s to FileOperationResult (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: fixes Created 5 years, 2 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
« no previous file with comments | « compat/win/sys/types.h ('k') | util/file/file_io.cc » ('j') | 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 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 CrashReportDatabase::OperationStatus status = 559 CrashReportDatabase::OperationStatus status =
560 database->PrepareNewCrashReport(&new_report); 560 database->PrepareNewCrashReport(&new_report);
561 if (status != CrashReportDatabase::kNoError) { 561 if (status != CrashReportDatabase::kNoError) {
562 return EXIT_FAILURE; 562 return EXIT_FAILURE;
563 } 563 }
564 564
565 CrashReportDatabase::CallErrorWritingCrashReport 565 CrashReportDatabase::CallErrorWritingCrashReport
566 call_error_writing_crash_report(database.get(), new_report); 566 call_error_writing_crash_report(database.get(), new_report);
567 567
568 char buf[4096]; 568 char buf[4096];
569 ssize_t read_result; 569 FileOperationResult read_result;
570 do { 570 do {
571 read_result = file_reader->Read(buf, sizeof(buf)); 571 read_result = file_reader->Read(buf, sizeof(buf));
572 if (read_result < 0) { 572 if (read_result < 0) {
573 return EXIT_FAILURE; 573 return EXIT_FAILURE;
574 } 574 }
575 if (read_result > 0 && 575 if (read_result > 0 &&
576 !LoggingWriteFile(new_report->handle, buf, read_result)) { 576 !LoggingWriteFile(new_report->handle, buf, read_result)) {
577 return EXIT_FAILURE; 577 return EXIT_FAILURE;
578 } 578 }
579 } while (read_result == sizeof(buf)); 579 } while (read_result == sizeof(buf));
(...skipping 25 matching lines...) Expand all
605 605
606 #if defined(OS_POSIX) 606 #if defined(OS_POSIX)
607 int main(int argc, char* argv[]) { 607 int main(int argc, char* argv[]) {
608 return crashpad::DatabaseUtilMain(argc, argv); 608 return crashpad::DatabaseUtilMain(argc, argv);
609 } 609 }
610 #elif defined(OS_WIN) 610 #elif defined(OS_WIN)
611 int wmain(int argc, wchar_t* argv[]) { 611 int wmain(int argc, wchar_t* argv[]) {
612 return crashpad::ToolSupport::Wmain(argc, argv, crashpad::DatabaseUtilMain); 612 return crashpad::ToolSupport::Wmain(argc, argv, crashpad::DatabaseUtilMain);
613 } 613 }
614 #endif // OS_POSIX 614 #endif // OS_POSIX
OLDNEW
« no previous file with comments | « compat/win/sys/types.h ('k') | util/file/file_io.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698