anchor.diff:   * A [PreferenceStore] implementation based on `chrome.storage`.
    *
    * This preferences implementation will automatically flush any dirty changes
  - * out to `chrome.storage` every 6 seconds. That frequency will ensure that we
  - * do not exceed the rate limit imposed by `chrome.storage.sync`.
  + * out to `chrome.storage` periodically.
    */
   class _ChromePreferenceStore implements PreferenceStore {
  +  chrome.StorageArea _storageArea;
  +  Duration _flushInterval;
     Map _map = {};
     StreamController<PreferenceEvent> _controller = new StreamController.broadcast();
  -  chrome.StorageArea _storageArea;
     Timer _timer;
   
  -  _ChromePreferenceStore(this._storageArea, String name) {
  +  _ChromePreferenceStore(this._storageArea, String name, this._flushInterval) {
       chrome.storage.onChanged.listen((chrome.StorageOnChangedEvent event) {
         if (event.areaName == name) {
           for (String key in event.changes.keys) {
  
positive.code: /**
   * A PreferenceStore backed by `chome.storage.local`.
   */
  PreferenceStore localStore = new _ChromePreferenceStore(chrome.storage.local, 'local');
  
  /**
   * A PreferenceStore backed by `chome.storage.sync`.
   */
  PreferenceStore syncStore = new _ChromePreferenceStore(chrome.storage.sync, 'sync');
  
  /**
   * A persistent preference mechanism.
  
negative.code:   Stream<PreferenceEvent> get onPreferenceChange => _controller.stream;
  
    void _startTimer() {
      // Flush dirty preferences periodically.
      if (_timer == null) {
        _timer = new Timer(_flushInterval, flush);
      }
    }
  }
  