1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "net/url_request/url_request_context_getter.h"
7 #include "base/message_loop_proxy.h"
8 #include "net/url_request/url_request_context.h"
11 CookieStore
* URLRequestContextGetter::DONTUSEME_GetCookieStore() {
15 URLRequestContextGetter::URLRequestContextGetter() {}
17 URLRequestContextGetter::~URLRequestContextGetter() {}
19 void URLRequestContextGetter::OnDestruct() const {
20 scoped_refptr
<base::MessageLoopProxy
> io_message_loop_proxy
=
21 GetIOMessageLoopProxy();
22 DCHECK(io_message_loop_proxy
);
23 if (io_message_loop_proxy
) {
24 if (io_message_loop_proxy
->BelongsToCurrentThread()) {
27 io_message_loop_proxy
->DeleteSoon(FROM_HERE
, this);
30 // If no IO message loop proxy was available, we will just leak memory.
31 // This is also true if the IO thread is gone.