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