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

Unified Diff: components/dom_distiller/core/viewer.cc

Issue 2664753002: Remove base::StringValue (Closed)
Patch Set: Rebase Created 3 years, 9 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: components/dom_distiller/core/viewer.cc
diff --git a/components/dom_distiller/core/viewer.cc b/components/dom_distiller/core/viewer.cc
index 524f50fdc402a1fed6be7ff273c344005072d917..efc5c6ab46bcb54ebf1e2085c063982ac397aa40 100644
--- a/components/dom_distiller/core/viewer.cc
+++ b/components/dom_distiller/core/viewer.cc
@@ -150,11 +150,11 @@ std::string ReplaceHtmlTemplateValues(
namespace viewer {
const std::string GetShowFeedbackFormJs() {
- base::StringValue question_val(
+ base::Value question_val(
l10n_util::GetStringUTF8(IDS_DOM_DISTILLER_QUALITY_QUESTION));
- base::StringValue no_val(
+ base::Value no_val(
l10n_util::GetStringUTF8(IDS_DOM_DISTILLER_QUALITY_ANSWER_NO));
- base::StringValue yes_val(
+ base::Value yes_val(
l10n_util::GetStringUTF8(IDS_DOM_DISTILLER_QUALITY_ANSWER_YES));
std::string question;
@@ -173,7 +173,7 @@ const std::string GetUnsafeIncrementalDistilledPageJs(
const bool is_last_page) {
std::string output(page_proto->html());
EnsureNonEmptyContent(&output);
- base::StringValue value(output);
+ base::Value value(output);
base::JSONWriter::Write(value, &output);
std::string page_update("addToPage(");
page_update += output + ");";
@@ -187,7 +187,7 @@ const std::string GetErrorPageJs() {
IDS_DOM_DISTILLER_VIEWER_FAILED_TO_FIND_ARTICLE_TITLE));
std::string page_update(GetSetTitleJs(title));
- base::StringValue value(l10n_util::GetStringUTF8(
+ base::Value value(l10n_util::GetStringUTF8(
IDS_DOM_DISTILLER_VIEWER_FAILED_TO_FIND_ARTICLE_CONTENT));
std::string output;
base::JSONWriter::Write(value, &output);
@@ -201,14 +201,14 @@ const std::string GetErrorPageJs() {
}
const std::string GetSetTitleJs(std::string title) {
- base::StringValue value(title);
+ base::Value value(title);
std::string output;
base::JSONWriter::Write(value, &output);
return "setTitle(" + output + ");";
}
const std::string GetSetTextDirectionJs(const std::string& direction) {
- base::StringValue value(direction);
+ base::Value value(direction);
std::string output;
base::JSONWriter::Write(value, &output);
return "setTextDirection(" + output + ");";
@@ -240,7 +240,7 @@ const std::string GetUnsafeArticleContentJs(
std::string output(unsafe_output_stream.str());
EnsureNonEmptyContent(&output);
- base::JSONWriter::Write(base::StringValue(output), &output);
+ base::JSONWriter::Write(base::Value(output), &output);
std::string page_update("addToPage(");
page_update += output + ");";
return page_update + GetToggleLoadingIndicatorJs(true);
« no previous file with comments | « components/dom_distiller/core/page_features_unittest.cc ('k') | components/dom_distiller/ios/distiller_page_ios.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698