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

Unified Diff: chrome/browser/resources/chromeos/arc_support/playstore.js

Issue 2434823002: arc: Add Goolge Privacy Policy link to OptIn UI. (Closed)
Patch Set: comments updated, make presubmit passed Created 4 years, 2 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
« no previous file with comments | « chrome/browser/resources/chromeos/arc_support/main.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/arc_support/playstore.js
diff --git a/chrome/browser/resources/chromeos/arc_support/playstore.js b/chrome/browser/resources/chromeos/arc_support/playstore.js
index 2eda8bee7050c96432c1aacbf3a5511b5e4dac94..f4b6baecd9ed7b780380206002c8136683a7ef0d 100644
--- a/chrome/browser/resources/chromeos/arc_support/playstore.js
+++ b/chrome/browser/resources/chromeos/arc_support/playstore.js
@@ -112,5 +112,22 @@ function formatDocument() {
document.body.hidden = true;
}
+/**
+ * Searches in footer for a privacy policy link.
+ * @return {string} Link to Google Privacy Policy detected from the current
+ * document or link to the default policy if it is not found.
+ */
+function getPrivacyPolicyLink() {
+ var doc = document;
+ var links = doc.getElementById('play-footer').getElementsByTagName('a');
+ for (var i = 0; i < links.length; ++i) {
+ var targetURL = links[i].href;
+ if (targetURL.endsWith('/policies/privacy/')) {
+ return targetURL;
+ }
+ }
+ return 'https://www.google.com/policies/privacy/';
+}
+
formatDocument();
processLangZoneTerms();
« no previous file with comments | « chrome/browser/resources/chromeos/arc_support/main.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698