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

Unified Diff: third_party/dom_distiller_js/package/proto_gen/third_party/dom_distiller_js/dom_distiller_json_converter.h

Issue 297563002: Roll DomDistillerJs (and make updater generate BUG=) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments Created 6 years, 7 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/dom_distiller_js/package/proto_gen/third_party/dom_distiller_js/dom_distiller_json_converter.h
diff --git a/third_party/dom_distiller_js/package/proto_gen/third_party/dom_distiller_js/dom_distiller_json_converter.h b/third_party/dom_distiller_js/package/proto_gen/third_party/dom_distiller_js/dom_distiller_json_converter.h
index 534899933839e47d7eb77cfc39628447be90988a..f02c1edff715e2d3d7fcba0a11d86d58f650e474 100644
--- a/third_party/dom_distiller_js/package/proto_gen/third_party/dom_distiller_js/dom_distiller_json_converter.h
+++ b/third_party/dom_distiller_js/package/proto_gen/third_party/dom_distiller_js/dom_distiller_json_converter.h
@@ -167,6 +167,13 @@ namespace dom_distiller {
dom_distiller::proto::DomDistillerOptions message;
const base::DictionaryValue* dict;
if (!json->GetAsDictionary(&dict)) goto error;
+ if (dict->HasKey("1")) {
+ bool field_value;
+ if (!dict->GetBoolean("1", &field_value)) {
+ goto error;
+ }
+ message.set_extract_text_only(field_value);
+ }
return message;
error:
@@ -175,6 +182,9 @@ namespace dom_distiller {
static scoped_ptr<base::Value> WriteToValue(const dom_distiller::proto::DomDistillerOptions& message) {
scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+ if (message.has_extract_text_only()) {
+ dict->SetBoolean("1", message.extract_text_only());
+ }
return dict.PassAs<base::Value>();
}
};
« no previous file with comments | « third_party/dom_distiller_js/package/proto/dom_distiller.proto ('k') | third_party/dom_distiller_js/update_domdistiller_js.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698