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

Unified Diff: third_party/crashpad/crashpad/util/misc/zlib.cc

Issue 2710663006: Update Crashpad to 4a2043ea65e2641ef1a921801c0aaa15ada02fc7 (Closed)
Patch Set: Update Crashpad to 4a2043ea65e2 Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/crashpad/crashpad/util/misc/zlib.cc
diff --git a/third_party/crashpad/crashpad/util/thread/thread_posix.cc b/third_party/crashpad/crashpad/util/misc/zlib.cc
similarity index 53%
copy from third_party/crashpad/crashpad/util/thread/thread_posix.cc
copy to third_party/crashpad/crashpad/util/misc/zlib.cc
index 7142c78685c6f2d6d62591a86b558ce04dd158b1..b26f9c90cb918908aadda01a211e8cb8fe8b0938 100644
--- a/third_party/crashpad/crashpad/util/thread/thread_posix.cc
+++ b/third_party/crashpad/crashpad/util/misc/zlib.cc
@@ -1,4 +1,4 @@
-// Copyright 2015 The Crashpad Authors. All rights reserved.
+// Copyright 2017 The Crashpad Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -12,30 +12,26 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "util/thread/thread.h"
+#include "util/misc/zlib.h"
#include "base/logging.h"
+#include "base/strings/stringprintf.h"
+#include "third_party/zlib/zlib_crashpad.h"
namespace crashpad {
-void Thread::Start() {
- DCHECK(!platform_thread_);
- int rv = pthread_create(&platform_thread_, nullptr, ThreadEntryThunk, this);
- PCHECK(0 == rv);
-}
+int ZlibWindowBitsWithGzipWrapper(int window_bits) {
+ // See the documentation for deflateInit2() and inflateInit2() in <zlib.h>. 0
+ // is only valid during decompression.
+
+ DCHECK(window_bits == 0 || (window_bits >= 8 && window_bits <= 15))
+ << window_bits;
-void Thread::Join() {
- DCHECK(platform_thread_);
- int rv = pthread_join(platform_thread_, nullptr);
- PCHECK(0 == rv);
- platform_thread_ = 0;
+ return 16 + window_bits;
}
-// static
-void* Thread::ThreadEntryThunk(void* argument) {
- Thread* self = reinterpret_cast<Thread*>(argument);
- self->ThreadMain();
- return nullptr;
+std::string ZlibErrorString(int zr) {
+ return base::StringPrintf("%s (%d)", zError(zr), zr);
}
} // namespace crashpad
« no previous file with comments | « third_party/crashpad/crashpad/util/misc/zlib.h ('k') | third_party/crashpad/crashpad/util/net/http_body_gzip.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698