summaryrefslogtreecommitdiffstats
path: root/extensions/shell/browser/shell_url_request_context_getter.cc
blob: abd5aede4792ff9b7bbc4efbf1aa108e12c48fc2 (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
39
40
41
42
43
44
45
// Copyright 2014 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.

#include "extensions/shell/browser/shell_url_request_context_getter.h"

#include <utility>

#include "base/memory/scoped_ptr.h"
#include "content/public/browser/resource_request_info.h"
#include "extensions/browser/info_map.h"
#include "extensions/shell/browser/shell_network_delegate.h"

namespace extensions {

ShellURLRequestContextGetter::ShellURLRequestContextGetter(
    content::BrowserContext* browser_context,
    bool ignore_certificate_errors,
    const base::FilePath& base_path,
    scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
    scoped_refptr<base::SingleThreadTaskRunner> file_task_runner,
    content::ProtocolHandlerMap* protocol_handlers,
    content::URLRequestInterceptorScopedVector request_interceptors,
    net::NetLog* net_log,
    InfoMap* extension_info_map)
    : content::ShellURLRequestContextGetter(ignore_certificate_errors,
                                            base_path,
                                            io_task_runner,
                                            file_task_runner,
                                            protocol_handlers,
                                            std::move(request_interceptors),
                                            net_log),
      browser_context_(browser_context),
      extension_info_map_(extension_info_map) {}

ShellURLRequestContextGetter::~ShellURLRequestContextGetter() {
}

scoped_ptr<net::NetworkDelegate>
ShellURLRequestContextGetter::CreateNetworkDelegate() {
  return make_scoped_ptr(
      new ShellNetworkDelegate(browser_context_, extension_info_map_));
}

}  // namespace extensions