Logo Search packages:      
Sourcecode: chromium-browser version File versions  Download package


// Copyright (c) 2009 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.


class URLRequest;

namespace chrome_browser_net {

// Sets the given ID on the given request for later retrieval. This information
// duplicates a field in the ResourceDispatcherHost's user data, but is also
// set for non-ResourceDispatcher-related requests. Having this one global
// place allows us to do more general things, such as assigning traffic for the
// network view in the task manager.
// If you make a request on behalf of a child process, please call this
// function. The default value will be -1 which will be interprepreted as
// originating from the browser itself.
// The ID is the child process' unique ID (not a PID) of the process originating
// the request. This is normally the renderer corresponding to the load. If a
// plugin process does a request through a renderer process this will be the
// plugin (the originator of the request).
void SetOriginProcessUniqueIDForRequest(int id, URLRequest* request);

// Returns the child process' unique ID that has been previously set by
// SetOriginProcessUniqueIDForRequest. If no ID has been set, the return
// value is -1. We use this to identify requests made by the browser process.
int GetOriginProcessUniqueIDForRequest(const URLRequest* request);

}  // namespace chrome_browser_net


Generated by  Doxygen 1.6.0   Back to index