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

Unified Diff: net/url_request/url_request_context_getter.cc

Issue 2565873002: [translate] Add translate ranker model loader. (Closed)
Patch Set: for asan testing only - DO NOT COMMIT Created 3 years, 10 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
Index: net/url_request/url_request_context_getter.cc
diff --git a/net/url_request/url_request_context_getter.cc b/net/url_request/url_request_context_getter.cc
index 0bad74812804739ecd53fae8180316ed33213818..f8a280cce023f1f6c656f07ecf911844a1c0271a 100644
--- a/net/url_request/url_request_context_getter.cc
+++ b/net/url_request/url_request_context_getter.cc
@@ -5,6 +5,7 @@
#include "net/url_request/url_request_context_getter.h"
#include "base/debug/leak_annotations.h"
+#include "base/debug/stack_trace.h"
#include "base/location.h"
#include "base/single_thread_task_runner.h"
#include "net/url_request/url_request_context.h"
@@ -12,6 +13,18 @@
namespace net {
+void URLRequestContextGetter::AddRef() const {
+ base::debug::StackTrace().Print();
+ base::RefCountedThreadSafe<URLRequestContextGetter,
+ URLRequestContextGetterTraits>::AddRef();
+}
+
+void URLRequestContextGetter::Release() const {
+ base::debug::StackTrace().Print();
+ base::RefCountedThreadSafe<URLRequestContextGetter,
+ URLRequestContextGetterTraits>::Release();
+}
+
void URLRequestContextGetter::AddObserver(
URLRequestContextGetterObserver* observer) {
DCHECK(GetNetworkTaskRunner()->BelongsToCurrentThread());
@@ -26,7 +39,9 @@ void URLRequestContextGetter::RemoveObserver(
URLRequestContextGetter::URLRequestContextGetter() {}
-URLRequestContextGetter::~URLRequestContextGetter() {}
+URLRequestContextGetter::~URLRequestContextGetter() {
+ LOG(ERROR) << "I am being deleted now";
+}
void URLRequestContextGetter::OnDestruct() const {
scoped_refptr<base::SingleThreadTaskRunner> network_task_runner =

Powered by Google App Engine
This is Rietveld 408576698