Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // 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?
| |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_COMMON_NET_URL_REQUEST_DEVTOOLS_USER_DATA_H_ | |
| 6 #define CONTENT_COMMON_NET_URL_REQUEST_DEVTOOLS_USER_DATA_H_ | |
| 7 | |
| 8 #include "base/supports_user_data.h" | |
| 9 | |
| 10 namespace content { | |
| 11 | |
| 12 // Used to annotate all URLRequests for which the request can be associated | |
| 13 // with a given DevToolsAgentHost. | |
| 14 class URLRequestDevtoolsUserData : public base::SupportsUserData::Data { | |
| 15 public: | |
| 16 URLRequestDevtoolsUserData(const std::string& devtools_agent_host_id, | |
| 17 const std::string& devtools_request_id); | |
| 18 ~URLRequestDevtoolsUserData() override; | |
| 19 | |
| 20 const std::string& devtools_agent_host_id() const { | |
| 21 return devtools_agent_host_id_; | |
| 22 } | |
| 23 | |
| 24 const std::string& devtools_request_id() const { | |
| 25 return devtools_request_id_; | |
| 26 } | |
| 27 | |
| 28 bool is_redirect() const { return is_redirect_; } | |
| 29 | |
| 30 void SetIsRedirect(bool is_redirect) { is_redirect_ = is_redirect; } | |
| 31 | |
| 32 static const void* kUserDataKey; | |
| 33 | |
| 34 private: | |
| 35 const std::string devtools_agent_host_id_; | |
| 36 const std::string devtools_request_id_; | |
| 37 bool is_redirect_; | |
| 38 }; | |
| 39 | |
| 40 } // namespace content | |
| 41 | |
| 42 #endif // CONTENT_COMMON_NET_URL_REQUEST_DEVTOOLS_USER_DATA_H_ | |
| OLD | NEW |