| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_COMMON_NET_URL_REQUEST_USER_DATA_H_ | 5 #ifndef CONTENT_COMMON_NET_URL_REQUEST_USER_DATA_H_ |
| 6 #define CONTENT_COMMON_NET_URL_REQUEST_USER_DATA_H_ | 6 #define CONTENT_COMMON_NET_URL_REQUEST_USER_DATA_H_ |
| 7 | 7 |
| 8 #include "base/supports_user_data.h" | 8 #include "base/supports_user_data.h" |
| 9 | 9 |
| 10 namespace content { |
| 11 |
| 10 // Used to annotate all URLRequests for which the request can be associated | 12 // Used to annotate all URLRequests for which the request can be associated |
| 11 // with a given render view. | 13 // with a given render view. |
| 12 class URLRequestUserData : public base::SupportsUserData::Data { | 14 class URLRequestUserData : public base::SupportsUserData::Data { |
| 13 public: | 15 public: |
| 14 URLRequestUserData(int render_process_id, int render_view_id); | 16 URLRequestUserData(int render_process_id, int render_view_id); |
| 15 virtual ~URLRequestUserData(); | 17 virtual ~URLRequestUserData(); |
| 16 | 18 |
| 17 int render_process_id() const { return render_process_id_; } | 19 int render_process_id() const { return render_process_id_; } |
| 18 int render_view_id() const { return render_view_id_; } | 20 int render_view_id() const { return render_view_id_; } |
| 19 | 21 |
| 20 static const void* kUserDataKey; | 22 static const void* kUserDataKey; |
| 21 | 23 |
| 22 private: | 24 private: |
| 23 int render_process_id_; | 25 int render_process_id_; |
| 24 int render_view_id_; | 26 int render_view_id_; |
| 25 }; | 27 }; |
| 26 | 28 |
| 29 } // namespace content |
| 30 |
| 27 #endif // CONTENT_COMMON_NET_URL_REQUEST_USER_DATA_H_ | 31 #endif // CONTENT_COMMON_NET_URL_REQUEST_USER_DATA_H_ |
| OLD | NEW |