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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.h

Issue 2296953004: Send certificates to devtools when it's open instead of using certId (Closed)
Patch Set: clear certificates on didstartprovisionalload Created 4 years, 3 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
Index: third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.h
diff --git a/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.h b/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.h
index c5237f32a7face254e41c5571db37f9ae216350a..092d39e12512bd7600ab4b93beadea2287766369 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.h
+++ b/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.h
@@ -38,6 +38,8 @@
#include "core/inspector/protocol/Network.h"
#include "platform/Timer.h"
#include "platform/heap/Handle.h"
+#include "wtf/Vector.h"
+#include "wtf/text/AtomicString.h"
#include "wtf/text/WTFString.h"
namespace blink {
@@ -68,9 +70,16 @@ class DictionaryValue;
class CORE_EXPORT InspectorNetworkAgent final : public InspectorBaseAgent<protocol::Network::Metainfo> {
public:
- static InspectorNetworkAgent* create(InspectedFrames* inspectedFrames)
+ class Client {
+ public:
+ virtual ~Client() { }
+
+ virtual void showCertificateViewer(const Vector<AtomicString>& certificate) = 0;
+ };
+
+ static InspectorNetworkAgent* create(Client* client, InspectedFrames* inspectedFrames)
{
- return new InspectorNetworkAgent(inspectedFrames);
+ return new InspectorNetworkAgent(client, inspectedFrames);
}
void restore() override;
@@ -93,6 +102,7 @@ public:
void didReceiveScriptResponse(unsigned long identifier);
bool shouldForceCORSPreflight();
bool shouldBlockRequest(const ResourceRequest&);
+ void didStartProvisionalLoad();
pfeldman 2016/09/02 17:15:01 As discussed offline, you provisional load may fai
void documentThreadableLoaderStartedLoadingForClient(unsigned long identifier, ThreadableLoaderClient*);
void documentThreadableLoaderFailedToStartLoadingForClient(ThreadableLoaderClient*);
@@ -146,13 +156,14 @@ public:
void setCacheDisabled(ErrorString*, bool cacheDisabled) override;
void setBypassServiceWorker(ErrorString*, bool bypass) override;
void setDataSizeLimitsForTest(ErrorString*, int maxTotalSize, int maxResourceSize) override;
+ void showCertificateViewer(ErrorString*, int certificateIndex) override;
pfeldman 2016/09/02 17:15:01 I don't think this fits remote debugging scenario
// Called from other agents.
void setHostId(const String&);
bool fetchResourceContent(Document*, const KURL&, String* content, bool* base64Encoded);
private:
- explicit InspectorNetworkAgent(InspectedFrames*);
+ InspectorNetworkAgent(Client*, InspectedFrames*);
void enable(int totalBufferSize, int resourceBufferSize);
void willSendRequestInternal(LocalFrame*, unsigned long identifier, DocumentLoader*, const ResourceRequest&, const ResourceResponse& redirectResponse, const FetchInitiatorInfo&);
@@ -164,6 +175,7 @@ private:
void getResponseBodyBlob(const String& requestId, std::unique_ptr<GetResponseBodyCallback>);
void clearPendingRequestData();
+ Client* m_client;
Member<InspectedFrames> m_inspectedFrames;
String m_userAgentOverride;
String m_hostId;
@@ -187,6 +199,9 @@ private:
std::unique_ptr<protocol::Network::Initiator> m_styleRecalculationInitiator;
bool m_isRecalculatingStyle;
+ typedef Vector<Vector<AtomicString>> CertificateList;
+ CertificateList m_certificates;
+
HeapHashSet<Member<XMLHttpRequest>> m_replayXHRs;
HeapHashSet<Member<XMLHttpRequest>> m_replayXHRsToBeDeleted;
Timer<InspectorNetworkAgent> m_removeFinishedReplayXHRTimer;

Powered by Google App Engine
This is Rietveld 408576698