Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1978)

Unified Diff: chrome/browser/net/url_request_tracking.cc

Issue 7054023: Get rid of url_request_tracking.*. The only other place that used it other than ResourceDispatch... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/net/url_request_tracking.h ('k') | chrome/browser/plugin_download_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/url_request_tracking.cc
===================================================================
--- chrome/browser/net/url_request_tracking.cc (revision 86090)
+++ chrome/browser/net/url_request_tracking.cc (working copy)
@@ -1,47 +0,0 @@
-// 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.
-
-#include "chrome/browser/net/url_request_tracking.h"
-
-#include "base/basictypes.h"
-#include "net/url_request/url_request.h"
-
-namespace {
-
-// The value is not important, this address is used as the unique key for the
-// PID.
-const void* kOriginPidKey = 0;
-
-class OriginPidData : public net::URLRequest::UserData {
- public:
- explicit OriginPidData(int pid) : pid_(pid) {}
- virtual ~OriginPidData() {}
-
- int pid() const { return pid_; }
- void set_pid(int pid) { pid_ = pid; }
-
- private:
- int pid_;
-
- DISALLOW_COPY_AND_ASSIGN(OriginPidData);
-};
-
-} // namespace
-
-namespace chrome_browser_net {
-
-void SetOriginPIDForRequest(int pid, net::URLRequest* request) {
- // The request will take ownership.
- request->SetUserData(&kOriginPidKey, new OriginPidData(pid));
-}
-
-int GetOriginPIDForRequest(const net::URLRequest* request) {
- const OriginPidData* data = static_cast<const OriginPidData*>(
- request->GetUserData(&kOriginPidKey));
- if (!data)
- return 0;
- return data->pid();
-}
-
-} // namespace chrome_browser_net
« no previous file with comments | « chrome/browser/net/url_request_tracking.h ('k') | chrome/browser/plugin_download_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698