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

Unified Diff: net/url_request/url_request.cc

Issue 1645513003: Remove simulated crash in URLRequest::DoCancel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request.cc
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
index b03397c8d6349d03027b0013d24cf0d6fcffb1b1..9fa81a760b0be307ef703d024f2d5270e16b08d0 100644
--- a/net/url_request/url_request.cc
+++ b/net/url_request/url_request.cc
@@ -10,8 +10,6 @@
#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"
@@ -705,24 +703,6 @@ 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
- // ~50 reports a day.
- // TODO(csharrison) Remove this code when crbug.com/557430 is resolved.
- int64_t request_time =
- (base::TimeTicks::Now() - creation_time_).InMilliseconds();
- if (!has_notified_completion_ && error == ERR_ABORTED &&
- request_time <= 100 && load_flags_ & LOAD_MAIN_FRAME &&
- base::RandDouble() < .00001) {
- static int dump_times = 0;
- if (dump_times < 5) {
- char url_copy[256] = {0};
- strncpy(url_copy, url().spec().c_str(), sizeof(url_copy));
- base::debug::Alias(&url_copy);
- base::debug::Alias(&request_time);
- base::debug::DumpWithoutCrashing();
- dump_times++;
- }
- }
// If cancelled while calling a delegate, clear delegate info.
if (calling_delegate_) {
LogUnblocked();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698