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

Side by Side Diff: content/browser/download/download_request_handle.cc

Issue 16256018: Update content/ to use WeakPtr<T>::get() instead of implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix incorrectly modified code Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/download/download_request_handle.h" 5 #include "content/browser/download/download_request_handle.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/stringprintf.h" 8 #include "base/stringprintf.h"
9 #include "content/browser/renderer_host/render_view_host_impl.h" 9 #include "content/browser/renderer_host/render_view_host_impl.h"
10 #include "content/browser/web_contents/web_contents_impl.h" 10 #include "content/browser/web_contents/web_contents_impl.h"
(...skipping 13 matching lines...) Expand all
24 24
25 DownloadRequestHandle::DownloadRequestHandle( 25 DownloadRequestHandle::DownloadRequestHandle(
26 const base::WeakPtr<DownloadResourceHandler>& handler, 26 const base::WeakPtr<DownloadResourceHandler>& handler,
27 int child_id, 27 int child_id,
28 int render_view_id, 28 int render_view_id,
29 int request_id) 29 int request_id)
30 : handler_(handler), 30 : handler_(handler),
31 child_id_(child_id), 31 child_id_(child_id),
32 render_view_id_(render_view_id), 32 render_view_id_(render_view_id),
33 request_id_(request_id) { 33 request_id_(request_id) {
34 DCHECK(handler_); 34 DCHECK(handler_.get());
35 } 35 }
36 36
37 WebContents* DownloadRequestHandle::GetWebContents() const { 37 WebContents* DownloadRequestHandle::GetWebContents() const {
38 RenderViewHostImpl* render_view_host = 38 RenderViewHostImpl* render_view_host =
39 RenderViewHostImpl::FromID(child_id_, render_view_id_); 39 RenderViewHostImpl::FromID(child_id_, render_view_id_);
40 if (!render_view_host) 40 if (!render_view_host)
41 return NULL; 41 return NULL;
42 42
43 return render_view_host->GetDelegate()->GetAsWebContents(); 43 return render_view_host->GetDelegate()->GetAsWebContents();
44 } 44 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 " child_id = %d" 80 " child_id = %d"
81 " render_view_id = %d" 81 " render_view_id = %d"
82 " request_id = %d" 82 " request_id = %d"
83 "}", 83 "}",
84 child_id_, 84 child_id_,
85 render_view_id_, 85 render_view_id_,
86 request_id_); 86 request_id_);
87 } 87 }
88 88
89 } // namespace content 89 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_plugin/browser_plugin_guest.h ('k') | content/browser/gpu/shader_disk_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698