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

Unified Diff: net/data/proxy_resolver_v8_tracing_unittest/dns_depending_on_url.js

Issue 1797313003: Add a histogram (Net.PacResultForStrippedUrl) that estimates how often PAC scripts depend on the UR… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update some more comments per mpearson's feedback. Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: net/data/proxy_resolver_v8_tracing_unittest/dns_depending_on_url.js
diff --git a/net/data/proxy_resolver_v8_tracing_unittest/dns_depending_on_url.js b/net/data/proxy_resolver_v8_tracing_unittest/dns_depending_on_url.js
new file mode 100644
index 0000000000000000000000000000000000000000..ac6611077db2c19ab9bc9b150087e0121535a0eb
--- /dev/null
+++ b/net/data/proxy_resolver_v8_tracing_unittest/dns_depending_on_url.js
@@ -0,0 +1,17 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This proxy script has different DNS dependencies based on whether the URL
+// contains "UseMyIpAddress". The final proxy list however is the same.
+function FindProxyForURL(url, host) {
+ if (url.indexOf("UseMyIpAddress") == -1) {
+ if (!myIpAddress())
+ return null;
+ } else {
+ if (!dnsResolve(host))
+ return null;
+ }
+
+ return "PROXY foopy:47";
+}

Powered by Google App Engine
This is Rietveld 408576698