Chromium Code Reviews| 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_ |