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

Unified Diff: third_party/WebKit/Source/platform/mhtml/MHTMLArchive.cpp

Issue 2846303002: Replace ASSERT with DCHECK in platform/ (Closed)
Patch Set: rebase Created 3 years, 8 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/WebKit/Source/platform/mhtml/MHTMLArchive.cpp
diff --git a/third_party/WebKit/Source/platform/mhtml/MHTMLArchive.cpp b/third_party/WebKit/Source/platform/mhtml/MHTMLArchive.cpp
index ba72adcfd23cf1eba29df522f7d91e241197e9d1..c60eae15a8fe7fba4b4c298ea5de279a28976e77 100644
--- a/third_party/WebKit/Source/platform/mhtml/MHTMLArchive.cpp
+++ b/third_party/WebKit/Source/platform/mhtml/MHTMLArchive.cpp
@@ -129,8 +129,8 @@ void MHTMLArchive::GenerateMHTMLHeader(const String& boundary,
const String& title,
const String& mime_type,
Vector<char>& output_buffer) {
- ASSERT(!boundary.IsEmpty());
- ASSERT(!mime_type.IsEmpty());
+ DCHECK(!boundary.IsEmpty());
+ DCHECK(!mime_type.IsEmpty());
DateComponents now;
now.SetMillisecondsSinceEpochForDateTime(CurrentTimeMS());
@@ -157,7 +157,7 @@ void MHTMLArchive::GenerateMHTMLHeader(const String& boundary,
// We use utf8() below instead of ascii() as ascii() replaces CRLFs with ??
// (we still only have put ASCII characters in it).
- ASSERT(string_builder.ToString().ContainsOnlyASCII());
+ DCHECK(string_builder.ToString().ContainsOnlyASCII());
CString ascii_string = string_builder.ToString().Utf8();
output_buffer.Append(ascii_string.data(), ascii_string.length());
@@ -168,7 +168,7 @@ void MHTMLArchive::GenerateMHTMLPart(const String& boundary,
EncodingPolicy encoding_policy,
const SerializedResource& resource,
Vector<char>& output_buffer) {
- ASSERT(!boundary.IsEmpty());
+ DCHECK(!boundary.IsEmpty());
ASSERT(content_id.IsEmpty() || content_id[0] == '<');
StringBuilder string_builder;
@@ -249,7 +249,7 @@ void MHTMLArchive::GenerateMHTMLPart(const String& boundary,
void MHTMLArchive::GenerateMHTMLFooterForTesting(const String& boundary,
Vector<char>& output_buffer) {
- ASSERT(!boundary.IsEmpty());
+ DCHECK(!boundary.IsEmpty());
CString ascii_string = String("--" + boundary + "--\r\n").Utf8();
output_buffer.Append(ascii_string.data(), ascii_string.length());
}

Powered by Google App Engine
This is Rietveld 408576698