Chromium Code Reviews| Index: chrome/browser/media/router/presentation_service_delegate_impl.cc |
| diff --git a/chrome/browser/media/router/presentation_service_delegate_impl.cc b/chrome/browser/media/router/presentation_service_delegate_impl.cc |
| index d49c6f1c36fb13b74b5310bc8a68fd5255499e4d..46f0847059706bb3620100e7c222237813570619 100644 |
| --- a/chrome/browser/media/router/presentation_service_delegate_impl.cc |
| +++ b/chrome/browser/media/router/presentation_service_delegate_impl.cc |
| @@ -548,7 +548,6 @@ void PresentationServiceDelegateImpl::StartSession( |
| int render_process_id, |
| int render_frame_id, |
| const std::string& presentation_url, |
| - const std::string& presentation_id, |
| const PresentationSessionSuccessCallback& success_cb, |
| const PresentationSessionErrorCallback& error_cb) { |
| if (presentation_url.empty() || !IsValidPresentationUrl(presentation_url)) { |
| @@ -557,16 +556,14 @@ void PresentationServiceDelegateImpl::StartSession( |
| return; |
| } |
| RenderFrameHostId render_frame_host_id(render_process_id, render_frame_id); |
| - std::string final_presentation_id = |
| - presentation_id.empty() |
| - ? frame_manager_->GetDefaultPresentationId(render_frame_host_id) |
| - : presentation_id; |
| - if (final_presentation_id.empty()) |
| - // TODO(imcheng): Remove presentation_id argument entirely if required |
| - // by Presentation API spec. |
| - final_presentation_id = base::GenerateGUID(); |
| + |
| + std::string presentation_id = |
|
mark a. foltz
2015/07/06 21:00:57
The code path to retrieve the default presentation
mlamouri (slow - plz ping)
2015/07/08 14:37:09
I will keep it as-is and add a TODO saying that we
|
| + frame_manager_->GetDefaultPresentationId(render_frame_host_id); |
| + if (presentation_id.empty()) |
| + presentation_id = base::GenerateGUID(); |
| + |
| scoped_ptr<CreateSessionRequest> context(new CreateSessionRequest( |
| - presentation_url, final_presentation_id, |
| + presentation_url, presentation_id, |
| GetLastCommittedURLForFrame(render_frame_host_id), |
| base::Bind(&PresentationServiceDelegateImpl::OnStartSessionSucceeded, |
| weak_factory_.GetWeakPtr(), render_process_id, render_frame_id, |