Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: mobile/android/base/widget/ContentSecurityDoorHanger.java

Issue 29459615: Issue 5194 - Remove Tracking Protection from Private Browsing (Closed)
Patch Set: Created June 8, 2017, 7:23 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*- 1 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
2 * This Source Code Form is subject to the terms of the Mozilla Public 2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 5
6 package org.mozilla.gecko.widget; 6 package org.mozilla.gecko.widget;
7 7
8 import android.util.Log; 8 import android.util.Log;
9 import android.widget.Button; 9 import android.widget.Button;
10 import android.widget.TextView; 10 import android.widget.TextView;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 final JSONObject link = options.optJSONObject("link"); 66 final JSONObject link = options.optJSONObject("link");
67 if (link != null) { 67 if (link != null) {
68 try { 68 try {
69 final String linkLabel = link.getString("label"); 69 final String linkLabel = link.getString("label");
70 final String linkUrl = link.getString("url"); 70 final String linkUrl = link.getString("url");
71 addLink(linkLabel, linkUrl); 71 addLink(linkLabel, linkUrl);
72 } catch (JSONException e) { } 72 } catch (JSONException e) { }
73 } 73 }
74 74
75 final JSONObject trackingProtection = options.optJSONObject("tracking_pr otection"); 75 final JSONObject trackingProtection = options.optJSONObject("tracking_pr otection");
76 if (trackingProtection != null) { 76 // We don't want to show the tracking protection hanger.
77 // See https://issues.adblockplus.org/ticket/5194
78 if (false) {
77 mTitle.setVisibility(VISIBLE); 79 mTitle.setVisibility(VISIBLE);
78 mTitle.setText(R.string.doorhanger_tracking_title); 80 mTitle.setText(R.string.doorhanger_tracking_title);
79 try { 81 try {
80 final boolean enabled = trackingProtection.getBoolean("enabled") ; 82 final boolean enabled = trackingProtection.getBoolean("enabled") ;
81 if (enabled) { 83 if (enabled) {
82 mMessage.setText(R.string.doorhanger_tracking_message_enable d); 84 mMessage.setText(R.string.doorhanger_tracking_message_enable d);
83 mSecurityState.setText(R.string.doorhanger_tracking_state_en abled); 85 mSecurityState.setText(R.string.doorhanger_tracking_state_en abled);
84 mSecurityState.setTextColor(ColorUtils.getColor(getContext() , R.color.affirmative_green)); 86 mSecurityState.setTextColor(ColorUtils.getColor(getContext() , R.color.affirmative_green));
85 } else { 87 } else {
86 mMessage.setText(R.string.doorhanger_tracking_message_disabl ed); 88 mMessage.setText(R.string.doorhanger_tracking_message_disabl ed);
(...skipping 23 matching lines...) Expand all
110 } 112 }
111 } catch (JSONException e) { 113 } catch (JSONException e) {
112 Log.e(LOGTAG, "Error creating onClick response", e); 114 Log.e(LOGTAG, "Error creating onClick response", e);
113 } 115 }
114 116
115 mOnButtonClickListener.onButtonClick(response, ContentSecurityDo orHanger.this); 117 mOnButtonClickListener.onButtonClick(response, ContentSecurityDo orHanger.this);
116 } 118 }
117 }; 119 };
118 } 120 }
119 } 121 }
OLDNEW
« no previous file with comments | « mobile/android/base/BrowserApp.java ('k') | mobile/android/chrome/content/aboutPrivateBrowsing.xhtml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld