blob: e8b0e2c33866d88c518cf139313a1670a5b672d1 (
plain)
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
36
37
38
|
// 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 BLIMP_ENGINE_BROWSER_BLIMP_NETWORK_DELEGATE_H_
#define BLIMP_ENGINE_BROWSER_BLIMP_NETWORK_DELEGATE_H_
#include <string>
#include "base/macros.h"
#include "net/base/network_delegate_impl.h"
namespace blimp {
namespace engine {
class BlimpNetworkDelegate : public net::NetworkDelegateImpl {
public:
BlimpNetworkDelegate();
~BlimpNetworkDelegate() override;
// Affects subsequent cookie retrieval and setting.
static void SetAcceptAllCookies(bool accept);
private:
// net::NetworkDelegate implementation.
bool OnCanGetCookies(const net::URLRequest& request,
const net::CookieList& cookie_list) override;
bool OnCanSetCookie(const net::URLRequest& request,
const std::string& cookie_line,
net::CookieOptions* options) override;
DISALLOW_COPY_AND_ASSIGN(BlimpNetworkDelegate);
};
} // namespace engine
} // namespace blimp
#endif // BLIMP_ENGINE_BROWSER_BLIMP_NETWORK_DELEGATE_H_
|