summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download/save_package.cc
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-31 17:27:45 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-31 17:27:45 +0000
commit76543b9c43515c8c68413b25d682b7c15a151905 (patch)
tree3fa26b07a2de8102561d5ded5828797fa9a375ab /chrome/browser/download/save_package.cc
parentf341f8f58ceeae4efe38daf3c26ad4581f98fd2d (diff)
downloadchromium_src-76543b9c43515c8c68413b25d682b7c15a151905.zip
chromium_src-76543b9c43515c8c68413b25d682b7c15a151905.tar.gz
chromium_src-76543b9c43515c8c68413b25d682b7c15a151905.tar.bz2
Replace the RenderProcessHost.PID function that returns the OS-generated
process ID with an internally-generated id() function. This allows us the guarantee that the IDs are unique over the entire run of the application. This also cleans up some code associated with managing the PID. The main potentially interesting change is now the PID is set uniquely for every creation of RenderProcessHost. It used to be set cleared if the process went away, and re-set if the process was re-created. The ID generation is in ChildProcesInfo so it is also unique between workers and plugins. I had to change some significant things in resource_dispatcher_host_unittest to take into account this new generation of IDs. BUG=17828 TEST=none Review URL: http://codereview.chromium.org/160203 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24899 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download/save_package.cc')
-rw-r--r--chrome/browser/download/save_package.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/download/save_package.cc b/chrome/browser/download/save_package.cc
index c6003e7..e268c34 100644
--- a/chrome/browser/download/save_package.cc
+++ b/chrome/browser/download/save_package.cc
@@ -132,7 +132,7 @@ SavePackage::SavePackage(TabContents* web_content,
save_type_(save_type),
all_save_items_count_(0),
wait_state_(INITIALIZE),
- tab_id_(web_content->process()->pid()) {
+ tab_id_(web_content->process()->id()) {
DCHECK(web_content);
const GURL& current_page_url = tab_contents_->GetURL();
DCHECK(current_page_url.is_valid());
@@ -154,7 +154,7 @@ SavePackage::SavePackage(TabContents* tab_contents)
disk_error_occurred_(false),
all_save_items_count_(0),
wait_state_(INITIALIZE),
- tab_id_(tab_contents->process()->pid()) {
+ tab_id_(tab_contents->process()->id()) {
const GURL& current_page_url = tab_contents_->GetURL();
DCHECK(current_page_url.is_valid());
page_url_ = current_page_url;
@@ -577,7 +577,7 @@ void SavePackage::CheckFinish() {
&SaveFileManager::RenameAllFiles,
final_names,
dir,
- tab_contents_->process()->pid(),
+ tab_contents_->process()->id(),
tab_contents_->render_view_host()->routing_id()));
}
@@ -720,7 +720,7 @@ void SavePackage::SaveNextFile(bool process_all_remaining_items) {
save_item->Start();
file_manager_->SaveURL(save_item->url(),
save_item->referrer(),
- tab_contents_->process()->pid(),
+ tab_contents_->process()->id(),
tab_contents_->render_view_host()->routing_id(),
save_item->save_source(),
save_item->full_path(),