forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathurl_request_context_getter_observer.h
35 lines (26 loc) · 1.16 KB
/
url_request_context_getter_observer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_GETTER_OBSERVER_H_
#define NET_URL_REQUEST_URL_REQUEST_CONTEXT_GETTER_OBSERVER_H_
#include "base/macros.h"
#include "net/base/net_export.h"
namespace net {
class URLRequestContextGetter;
// Interface for watching when a URLRequestContext associated with a
// URLRequestContextGetter is shutting down.
class NET_EXPORT URLRequestContextGetterObserver {
public:
URLRequestContextGetterObserver() {}
// Called before the URLRequestContext shuts down. When called, the Getter's
// GetURLRequestContext method must return NULL to protected against
// re-entrancy, but the Context must still be valid and GetNetworkTaskRunner()
// must return the thread it lives on. Called on the network thread.
virtual void OnContextShuttingDown() = 0;
protected:
virtual ~URLRequestContextGetterObserver() {}
private:
DISALLOW_COPY_AND_ASSIGN(URLRequestContextGetterObserver);
};
} // namespace net
#endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_GETTER_OBSERVER_H_