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

Unified Diff: content/shell/shell_network_delegate.h

Issue 9701023: Add ShellNetworkDelegate so content_shell can use cookies (again) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/content_shell.gypi ('k') | content/shell/shell_network_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/shell_network_delegate.h
diff --git a/content/shell/shell_network_delegate.h b/content/shell/shell_network_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..c9b92f867ab01a737c80f61d3bd24dcf2d5010d1
--- /dev/null
+++ b/content/shell/shell_network_delegate.h
@@ -0,0 +1,62 @@
+// Copyright (c) 2012 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_SHELL_NETWORK_DELEGATE_H_
+#define CONTENT_SHELL_SHELL_NETWORK_DELEGATE_H_
+#pragma once
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "net/base/network_delegate.h"
+
+namespace content {
+
+class ShellNetworkDelegate : public net::NetworkDelegate {
+ public:
+ ShellNetworkDelegate();
+ virtual ~ShellNetworkDelegate();
+
+ private:
+ // net::NetworkDelegate implementation.
+ virtual int OnBeforeURLRequest(net::URLRequest* request,
+ const net::CompletionCallback& callback,
+ GURL* new_url) OVERRIDE;
+ virtual int OnBeforeSendHeaders(net::URLRequest* request,
+ const net::CompletionCallback& callback,
+ net::HttpRequestHeaders* headers) OVERRIDE;
+ virtual void OnSendHeaders(net::URLRequest* request,
+ const net::HttpRequestHeaders& headers) OVERRIDE;
+ virtual int OnHeadersReceived(
+ net::URLRequest* request,
+ const net::CompletionCallback& callback,
+ net::HttpResponseHeaders* original_response_headers,
+ scoped_refptr<net::HttpResponseHeaders>*
+ override_response_headers) OVERRIDE;
+ 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 string16& error) OVERRIDE;
+ virtual AuthRequiredResponse OnAuthRequired(
+ net::URLRequest* request,
+ const net::AuthChallengeInfo& auth_info,
+ const AuthCallback& callback,
+ net::AuthCredentials* credentials) OVERRIDE;
+ virtual bool CanGetCookies(
+ const net::URLRequest* request,
+ const net::CookieList& cookie_list) OVERRIDE;
+ virtual bool CanSetCookie(const net::URLRequest* request,
+ const std::string& cookie_line,
+ net::CookieOptions* options) OVERRIDE;
+
+ DISALLOW_COPY_AND_ASSIGN(ShellNetworkDelegate);
+};
+
+} // namespace content
+
+#endif // CONTENT_SHELL_SHELL_NETWORK_DELEGATE_H_
« no previous file with comments | « content/content_shell.gypi ('k') | content/shell/shell_network_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698