summaryrefslogtreecommitdiffstats
path: root/content/common/net/url_request_user_data.h
blob: c3e464f72f913ab333a4332b1a758b9d56c01d2c (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
// 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_view_id);
  virtual ~URLRequestUserData();

  int render_process_id() const { return render_process_id_; }
  int render_view_id() const { return render_view_id_; }

  static const void* kUserDataKey;

 private:
  int render_process_id_;
  int render_view_id_;
};

}  // namespace content

#endif  // CONTENT_COMMON_NET_URL_REQUEST_USER_DATA_H_