| Index: content/test/net/url_request_user_data_helper.cc
|
| diff --git a/content/test/net/url_request_user_data_helper.cc b/content/test/net/url_request_user_data_helper.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..884c848c04862f9a1b906ca7bf4cff7948a17114
|
| --- /dev/null
|
| +++ b/content/test/net/url_request_user_data_helper.cc
|
| @@ -0,0 +1,26 @@
|
| +// 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.
|
| +
|
| +#include "content/test/net/url_request_user_data_helper.h"
|
| +
|
| +#include "content/common/net/url_request_user_data.h"
|
| +#include "ipc/ipc_message.h"
|
| +#include "net/url_request/url_request.h"
|
| +
|
| +void URLRequestUserDataHelper::AssociateWithRenderView(
|
| + net::URLRequest* request,
|
| + int render_process_id,
|
| + int render_view_id) {
|
| + DCHECK(render_process_id != MSG_ROUTING_NONE);
|
| + DCHECK(render_view_id != MSG_ROUTING_NONE);
|
| +
|
| + request->SetUserData(URLRequestUserData::kUserDataKey,
|
| + new URLRequestUserData(render_process_id,
|
| + render_view_id));
|
| +}
|
| +
|
| +void URLRequestUserDataHelper::DissasociateFromRenderView(
|
| + net::URLRequest* request) {
|
| + request->SetUserData(URLRequestUserData::kUserDataKey, NULL);
|
| +}
|
|
|