| Index: extensions/browser/extension_network_delegate.h
|
| diff --git a/content/shell/browser/shell_network_delegate.h b/extensions/browser/extension_network_delegate.h
|
| similarity index 54%
|
| copy from content/shell/browser/shell_network_delegate.h
|
| copy to extensions/browser/extension_network_delegate.h
|
| index 09b0ee518a74609a199c6f7ce0ecb401dde9cd5a..e27707bfb3b907e35039f4624c635bdd0bcc60ae 100644
|
| --- a/content/shell/browser/shell_network_delegate.h
|
| +++ b/extensions/browser/extension_network_delegate.h
|
| @@ -1,25 +1,27 @@
|
| -// Copyright 2013 The Chromium Authors. All rights reserved.
|
| +// 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.
|
|
|
| -#ifndef CONTENT_SHELL_BROWSER_SHELL_NETWORK_DELEGATE_H_
|
| -#define CONTENT_SHELL_BROWSER_SHELL_NETWORK_DELEGATE_H_
|
| +#ifndef EXTENSIONS_BROWSER_EXTENSION_NETNETWORK_DELEGATE_H_
|
| +#define EXTENSIONS_BROWSER_EXTENSION_NETNETWORK_DELEGATE_H_
|
|
|
| -#include "base/basictypes.h"
|
| -#include "base/compiler_specific.h"
|
| +#include "extensions/browser/info_map.h"
|
| #include "net/base/network_delegate.h"
|
|
|
| -namespace content {
|
| +namespace extensions {
|
|
|
| -class ShellNetworkDelegate : public net::NetworkDelegate {
|
| +class InfoMap;
|
| +
|
| +class ExtensionNetworkDelegate : public net::NetworkDelegate {
|
| public:
|
| - ShellNetworkDelegate();
|
| - virtual ~ShellNetworkDelegate();
|
| + explicit ExtensionNetworkDelegate(
|
| + void* browser_context, InfoMap* extension_info_map);
|
| + virtual ~ExtensionNetworkDelegate();
|
|
|
| static void SetAcceptAllCookies(bool accept);
|
|
|
| private:
|
| - // net::NetworkDelegate implementation.
|
| + // NetworkDelegate implementation.
|
| virtual int OnBeforeURLRequest(net::URLRequest* request,
|
| const net::CompletionCallback& callback,
|
| GURL* new_url) OVERRIDE;
|
| @@ -37,33 +39,22 @@ class ShellNetworkDelegate : public net::NetworkDelegate {
|
| virtual void OnBeforeRedirect(net::URLRequest* request,
|
| const GURL& new_location) OVERRIDE;
|
| virtual void OnResponseStarted(net::URLRequest* request) OVERRIDE;
|
| - virtual void OnRawBytesRead(const net::URLRequest& request,
|
| - int bytes_read) OVERRIDE;
|
| virtual void OnCompleted(net::URLRequest* request, bool started) OVERRIDE;
|
| virtual void OnURLRequestDestroyed(net::URLRequest* request) OVERRIDE;
|
| virtual void OnPACScriptError(int line_number,
|
| const base::string16& error) OVERRIDE;
|
| - virtual AuthRequiredResponse OnAuthRequired(
|
| + virtual net::NetworkDelegate::AuthRequiredResponse OnAuthRequired(
|
| net::URLRequest* request,
|
| const net::AuthChallengeInfo& auth_info,
|
| const AuthCallback& callback,
|
| net::AuthCredentials* credentials) OVERRIDE;
|
| - virtual bool OnCanGetCookies(const net::URLRequest& request,
|
| - const net::CookieList& cookie_list) OVERRIDE;
|
| - virtual bool OnCanSetCookie(const net::URLRequest& request,
|
| - const std::string& cookie_line,
|
| - net::CookieOptions* options) OVERRIDE;
|
| - virtual bool OnCanAccessFile(const net::URLRequest& request,
|
| - const base::FilePath& path) const OVERRIDE;
|
| - virtual bool OnCanThrottleRequest(
|
| - const net::URLRequest& request) const OVERRIDE;
|
| - virtual int OnBeforeSocketStreamConnect(
|
| - net::SocketStream* stream,
|
| - const net::CompletionCallback& callback) OVERRIDE;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(ShellNetworkDelegate);
|
| + void* browser_context_;
|
| + scoped_refptr<extensions::InfoMap> extension_info_map_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(ExtensionNetworkDelegate);
|
| };
|
|
|
| -} // namespace content
|
| +} // namespace extensions
|
|
|
| -#endif // CONTENT_SHELL_BROWSER_SHELL_NETWORK_DELEGATE_H_
|
| +#endif // EXTENSIONS_BROWSER_EXTENSION_NETNETWORK_DELEGATE_H_
|
|
|