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

Side by Side Diff: ios/web/shell/shell_network_delegate.h

Issue 1149323004: Upstream the iOS web_shell and supporting code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@web-thread-impl
Patch Set: Created 5 years, 7 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_SHELL_BROWSER_SHELL_NETWORK_DELEGATE_H_ 5 #ifndef IOS_WEB_SHELL_SHELL_NETWORK_DELEGATE_H_
6 #define CONTENT_SHELL_BROWSER_SHELL_NETWORK_DELEGATE_H_ 6 #define IOS_WEB_SHELL_SHELL_NETWORK_DELEGATE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "net/base/network_delegate_impl.h" 10 #include "net/base/network_delegate_impl.h"
11 11
12 namespace content { 12 namespace web {
13 13
14 class ShellNetworkDelegate : public net::NetworkDelegateImpl { 14 class ShellNetworkDelegate : public net::NetworkDelegateImpl {
15 public: 15 public:
16 ShellNetworkDelegate(); 16 ShellNetworkDelegate();
17 ~ShellNetworkDelegate() override; 17 ~ShellNetworkDelegate() override;
18 18
19 static void SetAcceptAllCookies(bool accept);
20
21 private: 19 private:
22 // net::NetworkDelegate implementation. 20 // net::NetworkDelegate implementation.
23 int OnBeforeURLRequest(net::URLRequest* request, 21 int OnBeforeURLRequest(net::URLRequest* request,
24 const net::CompletionCallback& callback, 22 const net::CompletionCallback& callback,
25 GURL* new_url) override; 23 GURL* new_url) override;
26 int OnBeforeSendHeaders(net::URLRequest* request, 24 int OnBeforeSendHeaders(net::URLRequest* request,
27 const net::CompletionCallback& callback, 25 const net::CompletionCallback& callback,
28 net::HttpRequestHeaders* headers) override; 26 net::HttpRequestHeaders* headers) override;
29 void OnSendHeaders(net::URLRequest* request, 27 void OnSendHeaders(net::URLRequest* request,
30 const net::HttpRequestHeaders& headers) override; 28 const net::HttpRequestHeaders& headers) override;
(...skipping 16 matching lines...) Expand all
47 const AuthCallback& callback, 45 const AuthCallback& callback,
48 net::AuthCredentials* credentials) override; 46 net::AuthCredentials* credentials) override;
49 bool OnCanGetCookies(const net::URLRequest& request, 47 bool OnCanGetCookies(const net::URLRequest& request,
50 const net::CookieList& cookie_list) override; 48 const net::CookieList& cookie_list) override;
51 bool OnCanSetCookie(const net::URLRequest& request, 49 bool OnCanSetCookie(const net::URLRequest& request,
52 const std::string& cookie_line, 50 const std::string& cookie_line,
53 net::CookieOptions* options) override; 51 net::CookieOptions* options) override;
54 bool OnCanAccessFile(const net::URLRequest& request, 52 bool OnCanAccessFile(const net::URLRequest& request,
55 const base::FilePath& path) const override; 53 const base::FilePath& path) const override;
56 bool OnCanThrottleRequest(const net::URLRequest& request) const override; 54 bool OnCanThrottleRequest(const net::URLRequest& request) const override;
57 bool OnFirstPartyOnlyCookieExperimentEnabled() const override;
58 55
59 DISALLOW_COPY_AND_ASSIGN(ShellNetworkDelegate); 56 DISALLOW_COPY_AND_ASSIGN(ShellNetworkDelegate);
60 }; 57 };
61 58
62 } // namespace content 59 } // namespace web
63 60
64 #endif // CONTENT_SHELL_BROWSER_SHELL_NETWORK_DELEGATE_H_ 61 #endif // IOS_WEB_SHELL_SHELL_NETWORK_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698