Chromium Code Reviews| Index: net/url_request/url_request.cc |
| diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc |
| index cff804c8e6e2a20b138b3f57165938455dc8c417..110497ec999d7486e48af01469e8a68af19e5641 100644 |
| --- a/net/url_request/url_request.cc |
| +++ b/net/url_request/url_request.cc |
| @@ -8,11 +8,14 @@ |
| #include "base/bind_helpers.h" |
| #include "base/callback.h" |
| #include "base/compiler_specific.h" |
| +#include "base/debug/alias.h" |
| +#include "base/debug/dump_without_crashing.h" |
| #include "base/debug/stack_trace.h" |
| #include "base/lazy_instance.h" |
| #include "base/memory/singleton.h" |
| #include "base/message_loop/message_loop.h" |
| #include "base/profiler/scoped_tracker.h" |
| +#include "base/rand_util.h" |
| #include "base/stl_util.h" |
| #include "base/strings/utf_string_conversions.h" |
| #include "base/synchronization/lock.h" |
| @@ -682,6 +685,16 @@ void URLRequest::CancelWithSSLError(int error, const SSLInfo& ssl_info) { |
| void URLRequest::DoCancel(int error, const SSLInfo& ssl_info) { |
| DCHECK(error < 0); |
| + // ~500,000 ERR_ABORTED < 100ms in Canary channel a day. Sample .01% to get |
|
eroman
2015/11/20 02:21:43
Thanks for doing some estimates!
I would also sug
|
| + // ~50 reports a day. |
| + double millis = (base::TimeTicks::Now() - creation_time_).InMillisecondsF(); |
|
cbentzel
2015/11/19 01:14:47
Why are you converting to a double instead of just
Charlie Harrison
2015/11/19 02:14:25
No real reason. I can change it back if you want.
cbentzel
2015/11/20 01:05:33
Yes - doing conversion doesn't seem to be doing an
|
| + if (error == ERR_ABORTED && millis < 100.0 && load_flags_ & LOAD_MAIN_FRAME && |
| + base::RandDouble() < .0001) { |
| + GURL url_copy = url(); |
| + base::debug::Alias(&url_copy); |
|
eroman
2015/11/20 02:21:43
This may not save the information you want (becaus
|
| + base::debug::Alias(&millis); |
| + base::debug::DumpWithoutCrashing(); |
|
eroman
2015/11/20 02:21:43
Please also add a TODO somewhere to delete this co
|
| + } |
| // If cancelled while calling a delegate, clear delegate info. |
| if (calling_delegate_) { |
| LogUnblocked(); |