EventType can not be OR'ed
This commit is contained in:
parent
15cc8164b8
commit
d3c8363450
1 changed files with 10 additions and 11 deletions
|
@ -31,15 +31,14 @@ class AtomNetworkDelegate : public brightray::NetworkDelegate {
|
|||
base::Callback<BlockingResponse(const base::DictionaryValue&)>;
|
||||
|
||||
enum EventType {
|
||||
kInvalidEvent = 0,
|
||||
kOnBeforeRequest = 1 << 0,
|
||||
kOnBeforeSendHeaders = 1 << 1,
|
||||
kOnSendHeaders = 1 << 2,
|
||||
kOnHeadersReceived = 1 << 3,
|
||||
kOnBeforeRedirect = 1 << 4,
|
||||
kOnResponseStarted = 1 << 5,
|
||||
kOnCompleted = 1 << 6,
|
||||
kOnErrorOccurred = 1 << 7,
|
||||
kOnBeforeRequest,
|
||||
kOnBeforeSendHeaders,
|
||||
kOnSendHeaders,
|
||||
kOnHeadersReceived,
|
||||
kOnBeforeRedirect,
|
||||
kOnResponseStarted,
|
||||
kOnCompleted,
|
||||
kOnErrorOccurred,
|
||||
};
|
||||
|
||||
struct ListenerInfo {
|
||||
|
@ -69,8 +68,6 @@ class AtomNetworkDelegate : public brightray::NetworkDelegate {
|
|||
const Listener& callback);
|
||||
|
||||
protected:
|
||||
void OnErrorOccurred(net::URLRequest* request);
|
||||
|
||||
// net::NetworkDelegate:
|
||||
int OnBeforeURLRequest(net::URLRequest* request,
|
||||
const net::CompletionCallback& callback,
|
||||
|
@ -91,6 +88,8 @@ class AtomNetworkDelegate : public brightray::NetworkDelegate {
|
|||
void OnResponseStarted(net::URLRequest* request) override;
|
||||
void OnCompleted(net::URLRequest* request, bool started) override;
|
||||
|
||||
void OnErrorOccurred(net::URLRequest* request);
|
||||
|
||||
private:
|
||||
std::map<EventType, ListenerInfo> event_listener_map_;
|
||||
|
||||
|
|
Loading…
Reference in a new issue