Closed Bug 826996 Opened 9 years ago Closed 9 years ago

Avoid hardcoded value for {moz:official} in search plugins

Categories

(Toolkit :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: glandium, Assigned: glandium)

Details

Attachments

(1 file, 1 obsolete file)

We currently have the following in nsSearchService.js:

#ifdef MOZ_OFFICIAL_BRANDING
const MOZ_OFFICIAL = "official";
#else
const MOZ_OFFICIAL = "unofficial";
#endif

Building Firefox as a xulrunner application makes it having to choose between all xulrunner applications expanding {moz:official} to either "official" or "unofficial". This should be chosen at the application level.
Attachment #698253 - Flags: review?(dtownsend+bugmail)
Comment on attachment 698253 [details] [diff] [review]
Avoid hardcoded value for {moz:official} in search plugins

Looks ok to me but I'd like gavin's eyes on it
Attachment #698253 - Flags: review?(dtownsend+bugmail) → review?(gavin.sharp)
Apps needing to remember to opt-in is a bit of a downside to this. How about leaving the build-time preprocessing for the default value in nsSearchService?
Comment on attachment 698253 [details] [diff] [review]
Avoid hardcoded value for {moz:official} in search plugins

I think having the default in toolkit continue to depend on the build-time branding would be better, to protect against an app forgetting to opt-in to this behavior in the common case of it being built "standalone" rather than XULRunner-dependent.
Attachment #698253 - Flags: review?(gavin.sharp) → feedback+
Attachment #698253 - Attachment is obsolete: true
Attachment #700227 - Flags: review?(gavin.sharp) → review+
https://hg.mozilla.org/mozilla-central/rev/a4d691c7bacb
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.