OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "net/url_request/url_request_context.h" | 5 #include "net/url_request/url_request_context.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/debug/alias.h" | 8 #include "base/debug/alias.h" |
9 #include "base/debug/stack_trace.h" | 9 #include "base/debug/stack_trace.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 bool has_delegate = request->has_delegate(); | 89 bool has_delegate = request->has_delegate(); |
90 int load_flags = request->load_flags(); | 90 int load_flags = request->load_flags(); |
91 base::debug::StackTrace stack_trace(NULL, 0); | 91 base::debug::StackTrace stack_trace(NULL, 0); |
92 if (request->stack_trace()) | 92 if (request->stack_trace()) |
93 stack_trace = *request->stack_trace(); | 93 stack_trace = *request->stack_trace(); |
94 base::debug::Alias(url_buf); | 94 base::debug::Alias(url_buf); |
95 base::debug::Alias(&num_requests); | 95 base::debug::Alias(&num_requests); |
96 base::debug::Alias(&has_delegate); | 96 base::debug::Alias(&has_delegate); |
97 base::debug::Alias(&load_flags); | 97 base::debug::Alias(&load_flags); |
98 base::debug::Alias(&stack_trace); | 98 base::debug::Alias(&stack_trace); |
99 CHECK(false); | 99 CHECK(false) << "Leaked " << num_requests << " URLRequest(s). First URL: " |
| 100 << request->url().spec().c_str() << "."; |
100 } | 101 } |
101 } | 102 } |
102 | 103 |
103 } // namespace net | 104 } // namespace net |
OLD | NEW |