Closed
Bug 976232
Opened 11 years ago
Closed 11 years ago
Banner shown in Guest Browsing
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(firefox29 verified, firefox30 verified, fennec29+)
VERIFIED
FIXED
Firefox 30
People
(Reporter: aaronmt, Assigned: Margaret)
Details
Attachments
(1 file, 3 obsolete files)
2.29 KB,
patch
|
Details | Diff | Splinter Review |
Currently we show a banner in a guest browsing session. I assume this is undesirable (especially for Sync setup).
Assignee | ||
Updated•11 years ago
|
tracking-fennec: ? → 29+
Updated•11 years ago
|
Assignee: nobody → margaret.leibovic
Assignee | ||
Comment 1•11 years ago
|
||
Sorry, Brian, you're the lucky reviewer for all these.
This is a really harsh approach that makes us just avoid showing any banner when you're in guest mode, but I feel like guests don't need to see promotions. I also feel like I just want a solution that gets the job done, with the least risk of regressing anything :)
Attachment #8387007 -
Flags: review?(bnicholson)
Comment 2•11 years ago
|
||
Comment on attachment 8387007 [details] [diff] [review]
Don't show banner messages in guest mode
Review of attachment 8387007 [details] [diff] [review]:
-----------------------------------------------------------------
Rather than doing this in JS, could you just add a mProfile.inGuestMode() check around around the setBanner code at http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/BrowserApp.java#1696 ? That should prevent the banner from getting set in the first place. We already have several guest mode checks in BrowserApp, so it seems better to do it here vs. introducing the BrowserApp dependency in Home.jsm.
Assignee | ||
Comment 3•11 years ago
|
||
Follows bnicholson's suggestion.
Attachment #8387007 -
Attachment is obsolete: true
Attachment #8387007 -
Flags: review?(bnicholson)
Attachment #8389492 -
Flags: review?(wjohnston)
Comment 4•11 years ago
|
||
Comment on attachment 8389492 [details] [diff] [review]
(v2) Disable home banner in guest mode
Review of attachment 8389492 [details] [diff] [review]:
-----------------------------------------------------------------
I really want to move more things into a common code place to make this less hacky, but for now this is what we do...
::: mobile/android/base/BrowserApp.java
@@ +1696,5 @@
> final HomeBanner homeBanner = (HomeBanner) findViewById(R.id.home_banner);
> +
> + // Never show the home banner in guest mode.
> + if (GeckoProfile.get(this).inGuestMode()) {
> + mHomePagerContainer.removeView(homeBanner);
I see one case in HomePager where mHomeBanner is used without checking for null. I think we'll need to update that?
http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/home/HomePager.java#259
Attachment #8389492 -
Flags: review?(wjohnston) → review+
Assignee | ||
Comment 5•11 years ago
|
||
(In reply to Wesley Johnston (:wesj) from comment #4)
> Comment on attachment 8389492 [details] [diff] [review]
> (v2) Disable home banner in guest mode
>
> Review of attachment 8389492 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> I really want to move more things into a common code place to make this less
> hacky, but for now this is what we do...
>
> ::: mobile/android/base/BrowserApp.java
> @@ +1696,5 @@
> > final HomeBanner homeBanner = (HomeBanner) findViewById(R.id.home_banner);
> > +
> > + // Never show the home banner in guest mode.
> > + if (GeckoProfile.get(this).inGuestMode()) {
> > + mHomePagerContainer.removeView(homeBanner);
>
> I see one case in HomePager where mHomeBanner is used without checking for
> null. I think we'll need to update that?
>
> http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/home/
> HomePager.java#259
Lucas just landed a patch for that in bug 981614 :)
Assignee | ||
Comment 6•11 years ago
|
||
Assignee | ||
Comment 7•11 years ago
|
||
Comment on attachment 8389492 [details] [diff] [review]
(v2) Disable home banner in guest mode
[Approval Request Comment]
Bug caused by (feature/regressing bug #): enabling sync promo banner and snippets
User impact if declined: banner will be shown while in guest mode
Testing completed (on m-c, etc.): tested locally, just landed on fx-team
Risk to taking this patch (and alternatives if risky): low-risk, just disables the banner in guest mode
String or IDL/UUID changes made by this patch: none
Attachment #8389492 -
Flags: approval-mozilla-aurora?
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 30
Updated•11 years ago
|
status-firefox29:
--- → affected
status-firefox30:
--- → fixed
Updated•11 years ago
|
Attachment #8389492 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Assignee | ||
Comment 9•11 years ago
|
||
Note to sheriffs: this may have caused a talos regression, so let's hold off on uplifting to aurora for now.
Assignee | ||
Comment 10•11 years ago
|
||
Backed out for suspected talos regression:
https://hg.mozilla.org/integration/fx-team/rev/80fda301471e
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 11•11 years ago
|
||
We should confirm that the previous patch here was indeed responsible for the talos regression, but this should make that better if that was the case. With my patch for bug 968640 removing the view should become unnecessary, so I left that out.
Attachment #8389492 -
Attachment is obsolete: true
Attachment #8390771 -
Flags: review?(wjohnston)
Assignee | ||
Updated•11 years ago
|
Assignee | ||
Comment 12•11 years ago
|
||
(In reply to :Margaret Leibovic from comment #11)
> Created attachment 8390771 [details] [diff] [review]
> (v3) Disable home banner in guest mode
>
> We should confirm that the previous patch here was indeed responsible for
> the talos regression, but this should make that better if that was the case.
> With my patch for bug 968640 removing the view should become unnecessary, so
> I left that out.
FYI, looks like the talos regressions were caused by bug 979101.
Assignee | ||
Comment 13•11 years ago
|
||
Oops too many bugs, wrong patch.
Attachment #8390771 -
Attachment is obsolete: true
Attachment #8390771 -
Flags: review?(wjohnston)
Attachment #8390886 -
Flags: review?(wjohnston)
Assignee | ||
Comment 14•11 years ago
|
||
This isn't really very different from the original patch, just landed it:
https://hg.mozilla.org/integration/fx-team/rev/26e1df0e1ee1
Assignee | ||
Updated•11 years ago
|
Attachment #8390886 -
Flags: review?(wjohnston)
Status: REOPENED → RESOLVED
Closed: 11 years ago → 11 years ago
Resolution: --- → FIXED
Comment 16•11 years ago
|
||
Comment 17•11 years ago
|
||
Verified as fixed in builds:
- 29 beta 2;
- 30.0a2 (2014-03-25);
- 31.0a1 (2014-03-25);
Device: Google Nexus 10 (Android 4.4.2).
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•