User:Anaaktgeboren/SearchEngineSync

From MozillaWiki
Jump to navigation Jump to search

Goals

    • Sync search engine prefs on Desktop
    • Format to be interoperable with firefox os, mobile firefox
    • Nongoals:
      • implementation on firefox os
      • implementation on mobile firefox

Requirements Gathering (deadline for input: july 26)

  • Stakeholders
    • Desktop: Gavin
    • Desktop UX: madhava, boriss, ibarlow on mobile, poked twice
    • Mobile: bnicholson, mfinkle
    • B@G: N/A, Ben Francis, b2g has no plugins and few preferences at this time
    • Privacy: Tom, Sid
    • Security: David Chan
    • Product: Asa
    • Services Integration: Gps
    • Community: dev-planning, dev-apps-firefox lists, call is out
    • Legal: ?
  • Current Requirements
    • does not sync hijacked queries
      • origin: Asa, browser cannot currently detect this, requires a new browser feature
    • syncs code & not a server call, mitigate risk
      • origin sstamm, reducing the addon sync threat
    • search order preserved
    • 3rd party plugins appear

Current Suggestions/Notes

  • input
    • want to avoid syncing app-shipped search plugins, origin: gavin
    • dont sync XML files, sync the JSON cache that's the result of parse origin: gavin
    • "Search service changes will be required for this, almost certainly. Exposing the engine description as JSON and adding the ability to distinguish app-shipped plugins via the nsIBrowserSearchService API seem like good first steps to me" - gavin
    • "toolkit/components/search/nsSearchService.js. - gps
    • See also the XML files in the 'searchplugins' directory of the app/profile" - gps
    • mobile uses same nsISearchService as desktop -mfinkle
    • should it be applicationID based, the way addons?
    • should we limit to a blessed type of plugin to address hijacking?
    • what data represents a search plugin?
      • and where are the keywords assoicated with it?
  • Digging notes
    • /profile/search.json
      • "directories" will have two entries, the default one ("/Applications/Firefox.app/Contents/MacOS/searchplugins") & "/Users/mozilla/Documents/inbox-desktop/test_profiles/searchplugins" in my case) The first has no usefully syncable data, though it does have a lastModifiedTime
    • /profile/search.sqlite.
      • engineid column identifies engine xml file, and notably where it came fromt[app] or [profile]
        • which would map to the directories list in the search.json?
      • value column identifies order of appearance in dropdown
      • name column is either "order" or "used"
    • pref browser.search.selectedEngine represents the currently selected entry, status "user set" is useful
    • pref browser.search.useDBForOrder i bet that represents ordering
    • pref browser.search.order.1-3 are hard coded defaults. do not sync
    • getting a 3rd party search thingy
      • right click on a website search bar (ie youtube) and /profile/searchplugins will be created with an OpenSearch .xml
      • searchplugins doesn't exist until you create a non-default one
    • SQLite table: install addon, go to tools -> SQLiteManager -> select db, go
  • current problems
    • how to look at a json file without one's eyes bleeding?
    • how do i gracefully slurp the json content?
    • how much of the json content do I need?
    • do i need to worry about install/uninstall calls?
    • do i need to worry about enable/disable?
    • why do google/bing end up with duplicate entries in the search table?
    • what does used mean in the sql table? in the name column?

Design & Design Review

  • Data Model, core of sync
    • ordering of entries
    • carrying non-defaulted plugins
  • Desktop design
    • Major dependencies
    • Product page can be made at this point
  • Reviews? privacy security
  • UI changes?

Implementation

    • not started

Release

    • targeted to land on Nightly during Q3 (not a promise, subject to scope change)

Reference