summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkwst@chromium.org <mkwst@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-19 09:42:56 +0000
committermkwst@chromium.org <mkwst@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-19 09:42:56 +0000
commitc62e602ce28c6224b6849cadc4a998928de60fc7 (patch)
tree60e17b51e3814e7dabd98dc8234ed8a8f2ed44c9
parentb1af343a7deb23a3229cc07d65285b5247c8ad46 (diff)
downloadchromium_src-c62e602ce28c6224b6849cadc4a998928de60fc7.zip
chromium_src-c62e602ce28c6224b6849cadc4a998928de60fc7.tar.gz
chromium_src-c62e602ce28c6224b6849cadc4a998928de60fc7.tar.bz2
Proxy sample extension: Fixing two small errors.
* The message overlay for proxy errors blocks text entry. * The bypass list was ignored in single-host mode. BUG=91258,87063 TEST=manual Review URL: http://codereview.chromium.org/7616003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97449 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/common/extensions/docs/examples/extensions/proxy_configuration.zipbin107364 -> 107685 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/proxy_configuration/_locales/en/messages.json4
-rw-r--r--chrome/common/extensions/docs/examples/extensions/proxy_configuration/popup.html6
-rw-r--r--chrome/common/extensions/docs/examples/extensions/proxy_configuration/proxy_form_controller.js12
-rw-r--r--chrome/common/extensions/docs/samples.json2
5 files changed, 17 insertions, 7 deletions
diff --git a/chrome/common/extensions/docs/examples/extensions/proxy_configuration.zip b/chrome/common/extensions/docs/examples/extensions/proxy_configuration.zip
index 017c9db..d898e40 100644
--- a/chrome/common/extensions/docs/examples/extensions/proxy_configuration.zip
+++ b/chrome/common/extensions/docs/examples/extensions/proxy_configuration.zip
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/proxy_configuration/_locales/en/messages.json b/chrome/common/extensions/docs/examples/extensions/proxy_configuration/_locales/en/messages.json
index 33bd086..74bc6f3 100644
--- a/chrome/common/extensions/docs/examples/extensions/proxy_configuration/_locales/en/messages.json
+++ b/chrome/common/extensions/docs/examples/extensions/proxy_configuration/_locales/en/messages.json
@@ -36,6 +36,10 @@
"description": "Error message used as popup title."
},
"errorProxyError": {
+ "message": "ProxyError: $1.",
+ "description": "Error message displayed in popup when an error occurs."
+ },
+ "errorProxyDetailedError": {
"message": "ProxyError: $1. $2.",
"description": "Error message displayed in popup when an error occurs."
},
diff --git a/chrome/common/extensions/docs/examples/extensions/proxy_configuration/popup.html b/chrome/common/extensions/docs/examples/extensions/proxy_configuration/popup.html
index 1e64ee1..c5772c0 100644
--- a/chrome/common/extensions/docs/examples/extensions/proxy_configuration/popup.html
+++ b/chrome/common/extensions/docs/examples/extensions/proxy_configuration/popup.html
@@ -174,15 +174,16 @@
position: absolute;
left: 50%;
top: 50%;
- width: 350px;
+ width: 500px;
padding: 20px;
- margin: -80px 0 0 -195px;
+ margin: -80px 0 0 -270px;
opacity: 0;
background: rgba(0, 0, 0, 0.75);
border-radius: 5px;
color: #FFF;
font: 1.5em/1.2 Helvetica Neue, sans-serif;
-webkit-transition: all 1.0s ease;
+ -webkit-transform: scale(0);
}
.overlay a {
color: #FFF;
@@ -190,6 +191,7 @@
.overlay.visible {
opacity: 1;
+ -webkit-transform: scale(1);
}
</style>
</head>
diff --git a/chrome/common/extensions/docs/examples/extensions/proxy_configuration/proxy_form_controller.js b/chrome/common/extensions/docs/examples/extensions/proxy_configuration/proxy_form_controller.js
index 9cc38a6..80f909b 100644
--- a/chrome/common/extensions/docs/examples/extensions/proxy_configuration/proxy_form_controller.js
+++ b/chrome/common/extensions/docs/examples/extensions/proxy_configuration/proxy_form_controller.js
@@ -575,7 +575,7 @@ ProxyFormController.prototype = {
success.classList.remove('visible');
else
window.close();
- }, 3000);
+ }, 4000);
},
@@ -608,7 +608,10 @@ ProxyFormController.prototype = {
case ProxyFormController.ProxyTypes.FIXED:
var config = {mode: 'fixed_servers'};
if (this.singleProxy) {
- config.rules = {singleProxy: this.singleProxy};
+ config.rules = {
+ singleProxy: this.singleProxy,
+ bypassList: this.bypassList
+ };
} else {
config.rules = {
proxyForHttp: this.httpProxy,
@@ -781,8 +784,9 @@ ProxyFormController.prototype = {
console.error(error);
// TODO(mkwst): Do something more interesting
this.generateAlert_(
- chrome.i18n.getMessage('errorProxyError',
- [error.error, error.details]),
+ chrome.i18n.getMessage(
+ error.details ? 'errorProxyDetailedError' : 'errorProxyError',
+ [error.error, error.details]),
false);
}
}
diff --git a/chrome/common/extensions/docs/samples.json b/chrome/common/extensions/docs/samples.json
index cba8fcd..6e17771 100644
--- a/chrome/common/extensions/docs/samples.json
+++ b/chrome/common/extensions/docs/samples.json
@@ -1668,7 +1668,7 @@
"test\/proxy_form_controller_test.js",
"test\/unittest.css"
],
- "source_hash": "612dcf3cfa9b383237c805bf00215df218f40046",
+ "source_hash": "9378cbaff5c4aa3def4a92824b88146335feac44",
"zip_path": "examples\/extensions\/proxy_configuration.zip"
},
{