summaryrefslogtreecommitdiffstats
path: root/content/common/net/url_request_user_data.h
blob: 58d97b7f32aae43cddb0f586c1ca7bbe9849a6d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright (c) 2012 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_USER_DATA_H_
#define CONTENT_COMMON_NET_URL_REQUEST_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 render view.
class URLRequestUserData : public base::SupportsUserData::Data {
 public:
  URLRequestUserData(int render_process_id,
                     int render_frame_id);
  ~URLRequestUserData() override;

  int render_process_id() const { return render_process_id_; }
  int render_frame_id() const { return render_frame_id_; }

  static const void* kUserDataKey;

 private:
  int render_process_id_;
  int render_frame_id_;
};

}  // namespace content

#endif  // CONTENT_COMMON_NET_URL_REQUEST_USER_DATA_H_