Commit 114290f6 authored by raymes's avatar raymes Committed by Commit bot

Take useful code out of DCHECKS in mime_handler_view_guest.cc

A mistake I've made in the past! Not sure if it's possible to test this code
in release builds.

BUG=303491

Review URL: https://codereview.chromium.org/547283002

Cr-Commit-Position: refs/heads/master@{#293751}
parent 7510b835
......@@ -55,9 +55,9 @@ void MimeHandlerViewGuest::CreateWebContents(
const base::DictionaryValue& create_params,
const WebContentsCreatedCallback& callback) {
std::string orig_mime_type;
DCHECK(
create_params.GetString(mime_handler_view::kMimeType, &orig_mime_type) &&
!orig_mime_type.empty());
bool success =
create_params.GetString(mime_handler_view::kMimeType, &orig_mime_type);
DCHECK(success && !orig_mime_type.empty());
std::string guest_site_str;
// Note that we put a prefix "mime-" before the mime type so that this
// can never collide with an extension ID.
......@@ -85,8 +85,8 @@ void MimeHandlerViewGuest::CreateWebContents(
void MimeHandlerViewGuest::DidAttachToEmbedder() {
std::string src;
DCHECK(attach_params()->GetString(mime_handler_view::kSrc, &src) &&
!src.empty());
bool success = attach_params()->GetString(mime_handler_view::kSrc, &src);
DCHECK(success && !src.empty());
web_contents()->GetController().LoadURL(
GURL(src),
content::Referrer(),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment