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

Side by Side Diff: net/data/proxy_resolver_v8_tracing_unittest/return_url_as_proxy.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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 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 // This proxy script returns a proxy list that encodes the URL that was passed
6 // in.
7
8 function convertUrlToHostname(url) {
9 // Turn the URL into something that resembles a hostname.
10 var result = encodeURIComponent(url);
11 return result.replace(/%/g, "x");
12 }
13
14 function FindProxyForURL(url, host) {
15 return "PROXY " + convertUrlToHostname(url) + ":99";
16 }
OLDNEW
« no previous file with comments | « net/data/proxy_resolver_v8_tracing_unittest/error_depending_on_url.js ('k') | net/proxy/proxy_resolver_v8_tracing.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698