Index: components/dom_distiller/core/viewer.cc |
diff --git a/components/dom_distiller/core/viewer.cc b/components/dom_distiller/core/viewer.cc |
index e19f3785f71b92c2243e8c07be8ea3b0429ace9f..0244a4f51733d59f06ff0ef96f3752fcbeb0a465 100644 |
--- a/components/dom_distiller/core/viewer.cc |
+++ b/components/dom_distiller/core/viewer.cc |
@@ -159,9 +159,9 @@ const std::string GetShowFeedbackFormJs() { |
std::string yes; |
std::string no; |
- base::JSONWriter::Write(&question_val, &question); |
- base::JSONWriter::Write(&yes_val, &yes); |
- base::JSONWriter::Write(&no_val, &no); |
+ base::JSONWriter::Write(question_val, &question); |
+ base::JSONWriter::Write(yes_val, &yes); |
+ base::JSONWriter::Write(no_val, &no); |
return "showFeedbackForm(" + question + ", " + yes + ", " + no + ");"; |
} |
@@ -172,7 +172,7 @@ const std::string GetUnsafeIncrementalDistilledPageJs( |
std::string output(page_proto->html()); |
EnsureNonEmptyContent(&output); |
base::StringValue value(output); |
- base::JSONWriter::Write(&value, &output); |
+ base::JSONWriter::Write(value, &output); |
std::string page_update("addToPage("); |
page_update += output + ");"; |
return page_update + GetToggleLoadingIndicatorJs( |
@@ -184,7 +184,7 @@ const std::string GetErrorPageJs() { |
base::StringValue value(l10n_util::GetStringUTF8( |
IDS_DOM_DISTILLER_VIEWER_FAILED_TO_FIND_ARTICLE_CONTENT)); |
std::string output; |
- base::JSONWriter::Write(&value, &output); |
+ base::JSONWriter::Write(value, &output); |
std::string page_update("addToPage("); |
page_update += output + ");"; |
return page_update; |
@@ -226,8 +226,7 @@ const std::string GetUnsafeArticleContentJs( |
std::string output(unsafe_output_stream.str()); |
EnsureNonEmptyContent(&output); |
- base::StringValue value(output); |
- base::JSONWriter::Write(&value, &output); |
+ base::JSONWriter::Write(base::StringValue(output), &output); |
std::string page_update("addToPage("); |
page_update += output + ");"; |
return page_update + GetToggleLoadingIndicatorJs(true); |