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

Side by Side Diff: content/browser/devtools/protocol/network_handler.h

Issue 2221093003: [Devtools] Backend support for setCookie (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Forgot to rename variables Created 4 years, 4 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 | « no previous file | content/browser/devtools/protocol/network_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 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_BROWSER_DEVTOOLS_PROTOCOL_NETWORK_HANDLER_H_ 5 #ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_NETWORK_HANDLER_H_
6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_NETWORK_HANDLER_H_ 6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_NETWORK_HANDLER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h" 10 #include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h"
11 #include "net/cookies/canonical_cookie.h" 11 #include "net/cookies/canonical_cookie.h"
12 12
13 namespace content { 13 namespace content {
14 14
15 class RenderFrameHostImpl; 15 class RenderFrameHostImpl;
16 16
17 namespace devtools { 17 namespace devtools {
18 namespace network { 18 namespace network {
19 19
20 class NetworkHandler { 20 class NetworkHandler {
21 public: 21 public:
22 typedef DevToolsProtocolClient::Response Response; 22 typedef DevToolsProtocolClient::Response Response;
23
24 NetworkHandler(); 23 NetworkHandler();
25 virtual ~NetworkHandler(); 24 virtual ~NetworkHandler();
26 25
27 void SetRenderFrameHost(RenderFrameHostImpl* host); 26 void SetRenderFrameHost(RenderFrameHostImpl* host);
28 void SetClient(std::unique_ptr<Client> client); 27 void SetClient(std::unique_ptr<Client> client);
29 28
30 Response ClearBrowserCache(); 29 Response ClearBrowserCache();
31 Response ClearBrowserCookies(); 30 Response ClearBrowserCookies();
32 Response GetCookies(DevToolsCommandId command_id); 31 Response GetCookies(DevToolsCommandId command_id);
33 Response DeleteCookie(DevToolsCommandId command_id, 32 Response DeleteCookie(DevToolsCommandId command_id,
34 const std::string& cookie_name, 33 const std::string& cookie_name,
35 const std::string& url); 34 const std::string& url);
36 35
36 Response SetCookie(DevToolsCommandId command_id,
37 const std::string& url,
38 const std::string& name,
39 const std::string& value,
40 const std::string* domain,
41 const std::string* path,
42 bool* secure,
43 bool* http_only,
44 const std::string* same_site,
45 double* expires);
46
37 Response CanEmulateNetworkConditions(bool* result); 47 Response CanEmulateNetworkConditions(bool* result);
38 Response EmulateNetworkConditions(bool offline, 48 Response EmulateNetworkConditions(bool offline,
39 double latency, 49 double latency,
40 double download_throughput, 50 double download_throughput,
41 double upload_throughput, 51 double upload_throughput,
42 const std::string* connection_type); 52 const std::string* connection_type);
43 Response GetCertificateDetails(int certificate_id, 53 Response GetCertificateDetails(int certificate_id,
44 scoped_refptr<CertificateDetails>* result); 54 scoped_refptr<CertificateDetails>* result);
45 Response ShowCertificateViewer(int certificate_id); 55 Response ShowCertificateViewer(int certificate_id);
46 56
47 private: 57 private:
48 void SendGetCookiesResponse( 58 void SendGetCookiesResponse(
49 DevToolsCommandId command_id, 59 DevToolsCommandId command_id,
50 const net::CookieList& cookie_list); 60 const net::CookieList& cookie_list);
51 void SendDeleteCookieResponse(DevToolsCommandId command_id); 61 void SendDeleteCookieResponse(DevToolsCommandId command_id);
62 void SendSetCookieResponse(DevToolsCommandId command_id, bool success);
52 63
53 RenderFrameHostImpl* host_; 64 RenderFrameHostImpl* host_;
54 std::unique_ptr<Client> client_; 65 std::unique_ptr<Client> client_;
55 base::WeakPtrFactory<NetworkHandler> weak_factory_; 66 base::WeakPtrFactory<NetworkHandler> weak_factory_;
56 67
57 DISALLOW_COPY_AND_ASSIGN(NetworkHandler); 68 DISALLOW_COPY_AND_ASSIGN(NetworkHandler);
58 }; 69 };
59 70
60 } // namespace network 71 } // namespace network
61 } // namespace devtools 72 } // namespace devtools
62 } // namespace content 73 } // namespace content
63 74
64 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_NETWORK_HANDLER_H_ 75 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_NETWORK_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/devtools/protocol/network_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698