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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/resources/chromeos/arc_support/main.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * Processes select tag that contains list of available terms for different 6 * Processes select tag that contains list of available terms for different
7 * languages and zones. In case of initial load, tries to find terms that match 7 * languages and zones. In case of initial load, tries to find terms that match
8 * exactly current language and country code and automatically redirects the 8 * exactly current language and country code and automatically redirects the
9 * view in case such terms are found. Leaves terms in select tag that only match 9 * view in case such terms are found. Leaves terms in select tag that only match
10 * current language or country code or default English variant or currently 10 * current language or country code or default English variant or currently
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 // Remove header element that contains logo image we don't want to show in 105 // Remove header element that contains logo image we don't want to show in
106 // our view. 106 // our view.
107 var doc = document; 107 var doc = document;
108 document.body.removeChild(doc.getElementById('play-header')); 108 document.body.removeChild(doc.getElementById('play-header'));
109 109
110 // Hide content at this point. We might want to redirect our view to terms 110 // Hide content at this point. We might want to redirect our view to terms
111 // that exactly match current language and country code. 111 // that exactly match current language and country code.
112 document.body.hidden = true; 112 document.body.hidden = true;
113 } 113 }
114 114
115 /**
116 * Searches in footer for a privacy policy link.
117 * @return {string} Link to Google Privacy Policy detected from the current
118 * document or link to the default policy if it is not found.
119 */
120 function getPrivacyPolicyLink() {
121 var doc = document;
122 var links = doc.getElementById('play-footer').getElementsByTagName('a');
123 for (var i = 0; i < links.length; ++i) {
124 var targetURL = links[i].href;
125 if (targetURL.endsWith('/policies/privacy/')) {
126 return targetURL;
127 }
128 }
129 return 'https://www.google.com/policies/privacy/';
130 }
131
115 formatDocument(); 132 formatDocument();
116 processLangZoneTerms(); 133 processLangZoneTerms();
OLDNEW
« 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