tree: f7c78e3255cc56ef465c08b27f82cde3ef3201dc [path history] [tgz]
  1. OWNERS
  2. README.md
  3. alternative_browser_driver.h
  4. alternative_browser_driver_posix.cc
  5. alternative_browser_driver_unittest.cc
  6. alternative_browser_driver_win.cc
  7. bho/
  8. browser_switcher_browsertest.cc
  9. browser_switcher_navigation_throttle.cc
  10. browser_switcher_navigation_throttle.h
  11. browser_switcher_navigation_throttle_unittest.cc
  12. browser_switcher_policy_migrator.cc
  13. browser_switcher_policy_migrator.h
  14. browser_switcher_prefs.cc
  15. browser_switcher_prefs.h
  16. browser_switcher_prefs_unittest.cc
  17. browser_switcher_service.cc
  18. browser_switcher_service.h
  19. browser_switcher_service_browsertest.cc
  20. browser_switcher_service_factory.cc
  21. browser_switcher_service_factory.h
  22. browser_switcher_service_win.cc
  23. browser_switcher_service_win.h
  24. browser_switcher_sitelist.cc
  25. browser_switcher_sitelist.h
  26. browser_switcher_sitelist_unittest.cc
  27. ieem_sitelist_parser.cc
  28. ieem_sitelist_parser.h
  29. ieem_sitelist_parser_browsertest.cc
  30. mock_alternative_browser_driver.cc
  31. mock_alternative_browser_driver.h
chrome/browser/browser_switcher/README.md

Legacy Browser Support (BrowserSwitcher internally)

BrowserSwitcher is a Chrome module that listens to navigations, and automatically switches to another browser (typically IE) for a predefined set of URLs.

It is a port of the old Legacy Browser Support extension, to make it easier to deploy across organizations.

Setup instructions for administrators can be found here.

Configuration

The policies in the BrowserSwitcher group let admins configure this feature, to decide which URLs should open in Chrome and which should open in the alternate browser.

Sitelist and Greylist

There are 2 types of rules for LBS:

  • Sitelist (AKA URL list): when the user visits one of these URLs in Chrome, it opens in the alternate browser. If any other URL is viewed in IE, it bounces back to Chrome.

  • Greylist: these URLs do not trigger a browser switch. i.e., it stays in Chrome if viewed in Chrome, and it stays in IE if viewed in IE.

These rules can be applied from 3 different sources:

If rules from multiple sources are present, they are combined into one list. This means you can create some rules with Chrome policies, and add more rules from the EMIE site list.

If multiple rules match one navigation, then the longest rule applies. For instance:

  1. Let's say sitelist = [ "example.com", "!foo.example.com" ]
  2. User visits http://foo.example.com/ in Chrome
  3. The website opens in Chrome, because !foo.example.com is longer than example.com, and it starts with a ! (which inverts the rule).

Debugging/Troubleshooting

Enterprise admins and developers can visit the chrome://browser-switch/internals page to view the state of LBS. This page displays the list of rules, and lets you re-download XML sitelists immediately.

BHO

On Windows, a BHO (an IE add-on) can be used to automatically bounce back to Chrome from IE when visiting a non-whitelisted URL.

Sharing State with Chrome

The BHO cannot access all Chrome policies, which are needed to decide if a navigation should bounce back to Chrome.

To solve this problem, BrowserSwitcher writes a cache.dat file in AppData\Local\Google\BrowserSwitcher. It contains the sitelist + greylist in a format that's easy to parse for the BHO. Whenever new rules are added or removed, it re-writes the cache.dat file.

This is the same mechanism that the old extension uses, so this feature is compatible with the old BHO.