OLD | NEW |
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/public/browser/download_url_parameters.h" | 5 #include "content/public/browser/download_url_parameters.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "content/public/browser/browser_context.h" | 8 #include "content/public/browser/browser_context.h" |
9 #include "content/public/browser/download_save_info.h" | 9 #include "content/public/browser/download_save_info.h" |
10 #include "content/public/browser/render_frame_host.h" | 10 #include "content/public/browser/render_frame_host.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 render_frame_host_routing_id_(render_frame_host_routing_id), | 30 render_frame_host_routing_id_(render_frame_host_routing_id), |
31 resource_context_(resource_context), | 31 resource_context_(resource_context), |
32 url_(url), | 32 url_(url), |
33 do_not_prompt_for_login_(false) { | 33 do_not_prompt_for_login_(false) { |
34 } | 34 } |
35 | 35 |
36 DownloadUrlParameters::~DownloadUrlParameters() { | 36 DownloadUrlParameters::~DownloadUrlParameters() { |
37 } | 37 } |
38 | 38 |
39 // static | 39 // static |
40 scoped_ptr<DownloadUrlParameters> DownloadUrlParameters::FromWebContents( | 40 std::unique_ptr<DownloadUrlParameters> DownloadUrlParameters::FromWebContents( |
41 WebContents* web_contents, | 41 WebContents* web_contents, |
42 const GURL& url) { | 42 const GURL& url) { |
43 return scoped_ptr<DownloadUrlParameters>(new DownloadUrlParameters( | 43 return std::unique_ptr<DownloadUrlParameters>(new DownloadUrlParameters( |
44 url, web_contents->GetRenderProcessHost()->GetID(), | 44 url, web_contents->GetRenderProcessHost()->GetID(), |
45 web_contents->GetRenderViewHost()->GetRoutingID(), | 45 web_contents->GetRenderViewHost()->GetRoutingID(), |
46 web_contents->GetMainFrame()->GetRoutingID(), | 46 web_contents->GetMainFrame()->GetRoutingID(), |
47 web_contents->GetBrowserContext()->GetResourceContext())); | 47 web_contents->GetBrowserContext()->GetResourceContext())); |
48 } | 48 } |
49 | 49 |
50 } // namespace content | 50 } // namespace content |
OLD | NEW |