Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Side by Side Diff: extensions/browser/extension_network_delegate.h

Issue 631203003: Fix bug: AppShell: CHECK failure in PeerConnection init. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase again. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « extensions/browser/BUILD.gn ('k') | extensions/browser/extension_network_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 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.
4
5 #ifndef EXTENSIONS_BROWSER_EXTENSION_NETNETWORK_DELEGATE_H_
6 #define EXTENSIONS_BROWSER_EXTENSION_NETNETWORK_DELEGATE_H_
7
8 #include "extensions/browser/info_map.h"
9 #include "net/base/network_delegate.h"
10
11 namespace extensions {
12
13 class InfoMap;
14
15 class ExtensionNetworkDelegate : public net::NetworkDelegate {
16 public:
17 explicit ExtensionNetworkDelegate(
18 void* browser_context, InfoMap* extension_info_map);
19 virtual ~ExtensionNetworkDelegate();
20
21 static void SetAcceptAllCookies(bool accept);
22
23 private:
24 // NetworkDelegate implementation.
25 virtual int OnBeforeURLRequest(net::URLRequest* request,
26 const net::CompletionCallback& callback,
27 GURL* new_url) OVERRIDE;
28 virtual int OnBeforeSendHeaders(net::URLRequest* request,
29 const net::CompletionCallback& callback,
30 net::HttpRequestHeaders* headers) OVERRIDE;
31 virtual void OnSendHeaders(net::URLRequest* request,
32 const net::HttpRequestHeaders& headers) OVERRIDE;
33 virtual int OnHeadersReceived(
34 net::URLRequest* request,
35 const net::CompletionCallback& callback,
36 const net::HttpResponseHeaders* original_response_headers,
37 scoped_refptr<net::HttpResponseHeaders>* override_response_headers,
38 GURL* allowed_unsafe_redirect_url) OVERRIDE;
39 virtual void OnBeforeRedirect(net::URLRequest* request,
40 const GURL& new_location) OVERRIDE;
41 virtual void OnResponseStarted(net::URLRequest* request) OVERRIDE;
42 virtual void OnCompleted(net::URLRequest* request, bool started) OVERRIDE;
43 virtual void OnURLRequestDestroyed(net::URLRequest* request) OVERRIDE;
44 virtual void OnPACScriptError(int line_number,
45 const base::string16& error) OVERRIDE;
46 virtual net::NetworkDelegate::AuthRequiredResponse OnAuthRequired(
47 net::URLRequest* request,
48 const net::AuthChallengeInfo& auth_info,
49 const AuthCallback& callback,
50 net::AuthCredentials* credentials) OVERRIDE;
51
52 void* browser_context_;
53 scoped_refptr<extensions::InfoMap> extension_info_map_;
54
55 DISALLOW_COPY_AND_ASSIGN(ExtensionNetworkDelegate);
56 };
57
58 } // namespace extensions
59
60 #endif // EXTENSIONS_BROWSER_EXTENSION_NETNETWORK_DELEGATE_H_
OLDNEW
« no previous file with comments | « extensions/browser/BUILD.gn ('k') | extensions/browser/extension_network_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698