Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Side by Side Diff: chrome/common/extensions/docs/examples/extensions/proxy_configuration/background.js

Issue 8273036: Adding `content_security_policy` to proxy sample extension. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: License, docs. Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 /**
6 * @fileoverview This file initializes the background page by loading a
7 * ProxyErrorHandler, and resetting proxy settings if required.
8 *
9 * @author Mike West <mkwst@google.com>
10 */
11
12 document.addEventListener("DOMContentLoaded", function () {
13 var errorHandler = new ProxyErrorHandler();
14
15 // If this extension has already set the proxy settings, then reset it
16 // once as the background page initializes. This is essential, as
17 // incognito settings are wiped on restart.
18 var persistedSettings = ProxyFormController.getPersistedSettings();
19 if (persistedSettings !== null) {
20 chrome.proxy.settings.set(
21 {'value': persistedSettings.regular});
22 }
23 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698