[NTP Snippets] The Status card reports disabled sync states
When there are no snippets to display, the Status card now
shows an appropriate message and action for the following
contexts:
- User is signed out
- User has disabled sync
- User has disabled history sync
- User has set a custom passphrase
The detection of those states is done by the newly added
NTPSnippetsStatusService.
Preview: https://goo.gl/photos/gpDA8g6Mm2jW56e87
BUG=612508
Review-Url: https://codereview.chromium.org/2061803002
Cr-Commit-Position: refs/heads/master@{#402537}
diff --git a/components/ntp_snippets_strings.grdp b/components/ntp_snippets_strings.grdp
new file mode 100644
index 0000000..a7425c1
--- /dev/null
+++ b/components/ntp_snippets_strings.grdp
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<grit-part>
+
+ <if expr="is_android">
+ <message name="IDS_SNIPPETS_DISABLED_SIGNED_OUT_INSTRUCTIONS" desc="Body of the card explaining the status of the NTP suggested content, when the user is signed out." formatter_data="android_java">
+ To get personalized content suggested by Google, sign in to Chrome.
+ </message>
+ <message name="IDS_SNIPPETS_DISABLED_GENERIC_PROMPT" desc="Title of the card explaining what action the user can take to get suggested content on the NTP." formatter_data="android_java">
+ Get suggested content
+ </message>
+ <message name="IDS_SNIPPETS_DISABLED_SYNC_INSTRUCTIONS" desc="Body of the card explaining the status of the NTP suggested content, when sync is disabled." formatter_data="android_java">
+ To get personalized content suggested by Google, turn on sync.
+ </message>
+ <message name="IDS_SNIPPETS_DISABLED_SYNC_ACTION" desc="Label of the action button for the card explaining the status of the NTP suggested content, when sync is disabled." formatter_data="android_java">
+ Turn on sync
+ </message>
+ <message name="IDS_SNIPPETS_DISABLED_HISTORY_SYNC_INSTRUCTIONS" desc="Body of the card explaining the status of the NTP suggested content, when history sync is disabled." formatter_data="android_java">
+ To get personalized content suggested by Google, turn on history sync.
+ </message>
+ <message name="IDS_SNIPPETS_DISABLED_HISTORY_SYNC_ACTION" desc="Label of the action button for the card explaining the status of the NTP suggested content, when history sync is disabled." formatter_data="android_java">
+ Turn on history sync
+ </message>
+ <message name="IDS_SNIPPETS_DISABLED_PASSPHRASE_INSTRUCTIONS" desc="Body of the card explaining the status of the NTP suggested content, when passphrase encryption is enabled." formatter_data="android_java">
+ Personalized content suggestions are currently disabled, because your synced data is protected with a custom passphrase.
+ </message>
+ </if>
+
+</grit-part>