diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-30 22:25:37 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-30 22:25:37 +0000 |
commit | 336870f3ec778c3677edc16395aaaa042f05e140 (patch) | |
tree | 0efe3357e2464be8f6a6843cebe6c671a9d3ceb2 /chrome/browser/tab_contents | |
parent | da71fd2d44c8f5367de6b921948d9e19bdf58b8d (diff) | |
download | chromium_src-336870f3ec778c3677edc16395aaaa042f05e140.zip chromium_src-336870f3ec778c3677edc16395aaaa042f05e140.tar.gz chromium_src-336870f3ec778c3677edc16395aaaa042f05e140.tar.bz2 |
Move GetTabContentsID out of tab util because it has nothing to do with tabs or
TabContents. I put a more accurately named static function in
ResourceDispatcherHost which is what really controls this request data.
I also moved a couple of static functions from the header to the cc in
resource_dispatcher.
Review URL: http://codereview.chromium.org/150124
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19675 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r-- | chrome/browser/tab_contents/tab_util.cc | 19 | ||||
-rw-r--r-- | chrome/browser/tab_contents/tab_util.h | 5 |
2 files changed, 0 insertions, 24 deletions
diff --git a/chrome/browser/tab_contents/tab_util.cc b/chrome/browser/tab_contents/tab_util.cc index 93b75fc..454ce39 100644 --- a/chrome/browser/tab_contents/tab_util.cc +++ b/chrome/browser/tab_contents/tab_util.cc @@ -6,26 +6,7 @@ #include "chrome/browser/renderer_host/render_process_host.h" #include "chrome/browser/renderer_host/render_view_host.h" -#include "chrome/browser/renderer_host/resource_dispatcher_host.h" #include "chrome/browser/tab_contents/tab_contents.h" -#include "net/url_request/url_request.h" - -bool tab_util::GetTabContentsID(URLRequest* request, - int* render_process_id, - int* render_view_id) { - - if (!request || !render_process_id || !render_view_id) - return false; - - ResourceDispatcherHost::ExtraRequestInfo* info = - ResourceDispatcherHost::ExtraInfoForRequest(request); - if (!info) - return false; - - *render_process_id = info->process_id; - *render_view_id = info->route_id; - return true; -} TabContents* tab_util::GetTabContentsByID(int render_process_id, int render_view_id) { diff --git a/chrome/browser/tab_contents/tab_util.h b/chrome/browser/tab_contents/tab_util.h index cbe9acd..2a19442 100644 --- a/chrome/browser/tab_contents/tab_util.h +++ b/chrome/browser/tab_contents/tab_util.h @@ -10,11 +10,6 @@ class TabContents; namespace tab_util { -// Helper to get the IDs necessary for looking up a TabContents. -// Should only be called from the IO thread, since it accesses an URLRequest. -bool GetTabContentsID(URLRequest* request, int* render_process_host_id, - int* routing_id); - // Helper to find the TabContents that originated the given request. Can be // NULL if the tab has been closed or some other error occurs. // Should only be called from the UI thread, since it accesses TabContent. |