| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NET_PROXY_PROXY_RESOLVER_V8_TRACING_H_ | 5 #ifndef NET_PROXY_PROXY_RESOLVER_V8_TRACING_H_ |
| 6 #define NET_PROXY_PROXY_RESOLVER_V8_TRACING_H_ | 6 #define NET_PROXY_PROXY_RESOLVER_V8_TRACING_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 scoped_ptr<ProxyResolverV8Tracing>* resolver, | 82 scoped_ptr<ProxyResolverV8Tracing>* resolver, |
| 83 const CompletionCallback& callback, | 83 const CompletionCallback& callback, |
| 84 scoped_ptr<ProxyResolverFactory::Request>* request) = 0; | 84 scoped_ptr<ProxyResolverFactory::Request>* request) = 0; |
| 85 | 85 |
| 86 static scoped_ptr<ProxyResolverV8TracingFactory> Create(); | 86 static scoped_ptr<ProxyResolverV8TracingFactory> Create(); |
| 87 | 87 |
| 88 private: | 88 private: |
| 89 DISALLOW_COPY_AND_ASSIGN(ProxyResolverV8TracingFactory); | 89 DISALLOW_COPY_AND_ASSIGN(ProxyResolverV8TracingFactory); |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 // This enum is used by an UMA histogram, so the values shouldn't be reordered | |
| 93 // or renumbered. | |
| 94 // | |
| 95 // TODO(eroman): Remove when done gathering data for crbug.com/593759 | |
| 96 enum class PacResultForStrippedUrl { | |
| 97 // Did NOT measure the impact of running FindProxyForURL() with a modified | |
| 98 // URL path, because the original URL could not complete using the | |
| 99 // non-blocking DNS mode. | |
| 100 SKIPPED_FALLBACK_BLOCKING_DNS = 0, | |
| 101 | |
| 102 // The result of running FindProxyForURL() with a modified URL path appears | |
| 103 // to be indistinguishable. (Although there may have been sideffects to the | |
| 104 // script state that won't manifest until later invocations). | |
| 105 SUCCESS = 1, | |
| 106 | |
| 107 // Calling FindProxyForURL() with a modified URL path returned the same proxy | |
| 108 // list, but had measurable sideffects in calls to alert(). | |
| 109 SUCCESS_DIFFERENT_ALERTS = 2, | |
| 110 | |
| 111 // Calling FindProxyForURL() with a modified URL path returned the same proxy | |
| 112 // list, but invoked a different sequence of DNS resolutions. This would | |
| 113 // require a rather unusual script to trigger. | |
| 114 SUCCESS_DIFFERENT_NUM_DNS = 3, | |
| 115 | |
| 116 // Calling FindProxyForURL() with a modified URL path resulted in a different | |
| 117 // set of DNS dependencies. | |
| 118 FAIL_ABANDONED = 4, | |
| 119 | |
| 120 // Calling FindProxyForURL() with a modified URL path caused a different | |
| 121 // execution flow. Whereas with the original URL it succeeded with | |
| 122 // non-blocking DNS, this attempt requires fallback to blocking DNS (and was | |
| 123 // not attempted). | |
| 124 FAIL_FALLBACK_BLOCKING_DNS = 5, | |
| 125 | |
| 126 // Calling FindProxyForURL() with a modified URL path caused a script error. | |
| 127 FAIL_ERROR = 6, | |
| 128 | |
| 129 // Calling FindProxyForURL() with a modified URL path returned a different | |
| 130 // proxy list. | |
| 131 FAIL_DIFFERENT_PROXY_LIST = 7, | |
| 132 | |
| 133 MAX_VALUE, | |
| 134 }; | |
| 135 | |
| 136 // TODO(eroman): Remove when done gathering data for crbug.com/593759 | |
| 137 // | |
| 138 // This histogram name is exported only for the sake of unit-tests. | |
| 139 extern NET_EXPORT_PRIVATE const char kHistogramPacResultForStrippedUrl[]; | |
| 140 | |
| 141 } // namespace net | 92 } // namespace net |
| 142 | 93 |
| 143 #endif // NET_PROXY_PROXY_RESOLVER_V8_TRACING_H_ | 94 #endif // NET_PROXY_PROXY_RESOLVER_V8_TRACING_H_ |
| OLD | NEW |