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

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: Rebased Created 3 years, 8 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/common/navigation_params.cc ('k') | content/common/net/url_request_devtools_user_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..1c82d99512292cd56197ad7750b44ab46de39e45
--- /dev/null
+++ b/content/common/net/url_request_devtools_user_data.h
@@ -0,0 +1,42 @@
+// Copyright 2017 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_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_
« no previous file with comments | « content/common/navigation_params.cc ('k') | content/common/net/url_request_devtools_user_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698