Options wrapper.
Saves settings with the Chrome settings store.
Settings are saved as a big blob to enable syncrhonous access to values.

@constructor
962737
function() {
  /**
   * Whether to show the page-action 'inject' icon.
   * @type {boolean}
   */
  this.showPageAction = true;

  /**
   * Whether to show the context menu items.
   * @type {boolean}
   */
  this.showContextMenu = false;

  /**
   * Whether to show the devtools panel.
   * @type {boolean}
   */
  this.showDevPanel = false;

  /**
   * A list of all added extensions, mapped by URL.
   * @type {!Object.<!Object>}
   * @private
   */
  this.addons_ = {};

  /**
   * A map of instrumented tab IDs to their instrumentation options.
   * If a tab has an entry in this map it is considered instrumented and
   * that superceeds other whitelisting options.
   * This is not saved (yet), as it's usually a one-off thing.
   * @type {!Object.<number, Object>}
   */
  this.instrumentedTabs_ = {};

  /**
   * A list of page match patterns that will have tracing on.
   * @type {!Array.<string>}
   * @private
   */
  this.pageWhitelist_ = [];

  /**
   * A list of page match patterns that will have tracing off.
   * @type {!Array.<string>}
   * @private
   */
  this.pageBlacklist_ = [];

  /**
   * A map of URLs to page options objects.
   * @type {!Object.<!Object>}
   * @private
   */
  this.pageOptions_ = {};

  /**
   * Default endpoint to use for pages.
   * @type {{mode: string, endpoint: string}}
   * @private
   */
  this.defaultEndpoint_ = {
    mode: 'page',
    endpoint: chrome.extension.getURL('app/maindisplay.html')
  };
}
415508
function doSave(titleStr) {
    var storeRef = this.props.storeRef;
    var tabliFolderId = storeRef.getValue().folderId;
    actions.manageWindow(tabliFolderId, this.state.saveTabWindow, titleStr, (0, _oneref.refUpdater)(storeRef));
    this.closeSaveModal();
  }
487875
function( targets, options ) {
					this.setOptions( options );
					targets = targets || {};
					var self = this;
					this.targets = this.targets || [];
					if ( self.options.name ) {
						this.href = self.options.name;
					} else {
						this.href = location.hostname + location.pathname + location.search + location.hash;
					}
					this.targets = $.merge( this.targets, targets );
					this.targets = $.unique( this.targets );
					this.targets = $( this.targets );
					if ( ! this.browserStorage.isAvailable() ) {
						return false;
					}

					var callback_result = self.options.onBeforeRestore.call( self );
					if ( callback_result === undefined || callback_result ) {
						self.restoreAllData();
					}

					if ( this.options.autoRelease ) {
						self.bindReleaseData();
					}

					if ( ! params.started[ this.getInstanceIdentifier() ] ) {
						if ( self.isCKEditorPresent() ) {
							var intervalId = setInterval( function() {
								if (CKEDITOR.isLoaded) {
									clearInterval(intervalId);
									self.bindSaveData();
									params.started[ self.getInstanceIdentifier() ] = true;
								}
							}, 100);
						} else {
							self.bindSaveData();
							params.started[ self.getInstanceIdentifier() ] = true;
						}
					}
				}
986342
def save_settings(self, filename):
        '''
        '''

        data = dict()
        data['valueRanges'] = self._value_ranges
        data['best_values'] = [str(value) for value in self._best_values]
        data['minimize'] = self._minimize
        data['num_employers'] = self._num_employers
        data['best_score'] = str(self._best_score)
        data['limit'] = self._limit
        data['best_error'] = self._best_error
        with open(filename, 'w') as outfile:
            json.dump(data, outfile, indent=4, sort_keys=True)
1075443
async function storeOptions(options){
    await _fs.writeFile(_configFilename, JSON.stringify(options, null, 4));
}
522376
public void saveSettings() {
        mCallbacks.printOutput("Saving settings...");
        
        // Clear settings
        mCallbacks.saveExtensionSetting(scan.getSettingsNamespace() + SETTING_URL, null);
        
        // Store settings
        mCallbacks.printOutput("Saving URL: " + urlTextField.getText());
        mCallbacks.saveExtensionSetting(scan.getSettingsNamespace() + SETTING_URL, urlTextField.getText());
    }
412810
function Save()
    {
        $this->contentRights->Save();
        if (!$this->rights)
        {
            $this->rights = new BackendContainerRights();
        }
        $this->rights->SetEdit($this->Value('Edit'));
        $this->rights->SetRemove($this->Value('Remove'));
        $this->rights->SetContentRights($this->contentRights->Rights());
        $this->rights->Save();
    }
493531
def save(self, *args, **kwargs):
        
        if 'node' not in self.shortcuts:
            self.shortcuts['node'] = self.device.node

        if 'user' not in self.shortcuts and self.device.node.user:
            self.shortcuts['user'] = self.device.node.user

        if 'layer' not in self.shortcuts and 'nodeshot.core.layers' in settings.INSTALLED_APPS:
            self.shortcuts['layer'] = self.device.node.layer

        super(Interface, self).save(*args, **kwargs)
1083455
function preferencesReset() {
    return this.initializedPromise.then(function() {
      this.prefs = Object.create(DEFAULT_PREFERENCES);
      return this._writeToStorage(DEFAULT_PREFERENCES);
    }.bind(this));
  }
261417
function (newLocale) {
        if (config.storageMethod !== 'custom') {
          switchMethods[config.storageMethod].save(config.storageKey, newLocale, savedLocale, config.cookieExpirationInDays);
        } else {
          config.storageFunctions.save(config.storageKey, newLocale, savedLocale);
        }
      }
1162062
def saveSettings(self):
        
        try:
            self.saveProfile()
        except Exception as ex:
            # Continue, even if saving the settings fails.
            logger.warn(ex)
            if DEBUGGING:
                raise
        finally:
            self._settingsSaved = True
1209622
def save(self, filename, verbose=False):
        
        with open(filename, 'w') as fid:
            json.dump(self._conf, fid, indent=4)
        if verbose:
            print('Saved settings in ' + filename)
785137
def save(self, fp=None):
        
        self.storage.settings['markov'] = self.get_settings_json()
        self.storage.save(fp)
304874
function(elem, options) {
			elem = $(elem);
			if (elem.hasClass(this._getMarker())) {
				return;
			}
			elem.addClass(this._getMarker());
			options = $.extend({}, this.defaultOptions, this._getMetadata(elem), options || {});
			var inst = $.extend({name: this.name, elem: elem, options: options},
				this._instSettings(elem, options));
			elem.data(this.name, inst); // Save instance against element
			this._postAttach(elem, inst);
			this.option(elem, options);
		}
303699
function(key, val, options) {
    var opts = options || {};
    var self = this;
    var attrs;
    /* eslint no-eq-null: 0*/
    if (key == null || typeof key === 'object') {
      opts = val || {};
      attrs = key;
    } else if (key) {
      (attrs = {})[key] = val;
    }
    // if saving only specified attributes, call set,
    // since preSave may depend on changed attributes
    if (attrs) {
      this.set(attrs, opts);
    }
    var error = opts.error;
    var fns = [
      _.bind(self.preSave, self, opts),
      _.bind(PromisedModel.prototype.save, self, key, opts),
      _.bind(self.afterSave, self, opts)
    ];
    return sequence(fns).then(function(results) {
      return results[1];
    }, function(err) {
      if (error) error.call(opts, self, err);
      return failWithError(opts, err);
    });
  }
480354
function restore_options() {
  // Use default value showChangeLog = true.
  chrome.storage.sync.get({
    showChangeLog: true
  }, function (items) {
    document.getElementById('show_changelog').checked = items.showChangeLog;
  });
}
1293795
async function saveEmbedData(opts, pluginOptions) {
  const { regex } = pluginOptions
  let options = extend({}, opts)

  if (isAnchorTagApplied(options, { regex })) {
    await stringReplaceAsync(
      options.result,
      anchorRegex,
      async (match, url, index) => {
        if (!isMatchPresent(regex, match, true)) return match
        saveServiceName(options, pluginOptions, match)
        options = await pushEmbedContent(url, options, pluginOptions, index)
        return match
      }
    )
  } else {
    options = pushEmbedContent(options.result, options, pluginOptions)
  }

  return options
}