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

Unified Diff: content/common/net/url_request_devtools_user_data.h

Issue 2776523005: Plumbing devtools agent host id and request id between processes (Closed)
Patch Set: Full plumbing Created 3 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
Index: content/common/net/url_request_devtools_user_data.h
diff --git a/content/common/net/url_request_devtools_user_data.h b/content/common/net/url_request_devtools_user_data.h
new file mode 100644
index 0000000000000000000000000000000000000000..00d4c6dbfc8abde795f914c8eb4e631b7a5f252b
--- /dev/null
+++ b/content/common/net/url_request_devtools_user_data.h
@@ -0,0 +1,42 @@
+// Copyright (c) 2017 The Chromium Authors. All rights reserved.
Sami 2017/03/29 16:41:42 nit: Use the new-style license template.
alex clarke (OOO till 29th) 2017/03/30 16:56:55 Not 100% sure but is this what you mean?
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_COMMON_NET_URL_REQUEST_DEVTOOLS_USER_DATA_H_
+#define CONTENT_COMMON_NET_URL_REQUEST_DEVTOOLS_USER_DATA_H_
+
+#include "base/supports_user_data.h"
+
+namespace content {
+
+// Used to annotate all URLRequests for which the request can be associated
+// with a given DevToolsAgentHost.
+class URLRequestDevtoolsUserData : public base::SupportsUserData::Data {
+ public:
+ URLRequestDevtoolsUserData(const std::string& devtools_agent_host_id,
+ const std::string& devtools_request_id);
+ ~URLRequestDevtoolsUserData() override;
+
+ const std::string& devtools_agent_host_id() const {
+ return devtools_agent_host_id_;
+ }
+
+ const std::string& devtools_request_id() const {
+ return devtools_request_id_;
+ }
+
+ bool is_redirect() const { return is_redirect_; }
+
+ void SetIsRedirect(bool is_redirect) { is_redirect_ = is_redirect; }
+
+ static const void* kUserDataKey;
+
+ private:
+ const std::string devtools_agent_host_id_;
+ const std::string devtools_request_id_;
+ bool is_redirect_;
+};
+
+} // namespace content
+
+#endif // CONTENT_COMMON_NET_URL_REQUEST_DEVTOOLS_USER_DATA_H_

Powered by Google App Engine
This is Rietveld 408576698