Commit fabf492c authored by vmpstr's avatar vmpstr Committed by Commit bot

chrome/browser/media: Change auto to not deduce raw pointers.

This patch updates the code to prevent auto deducing to a raw pointer.

R=sergeyu@chromium.org
BUG=554600

Review-Url: https://codereview.chromium.org/2194673002
Cr-Commit-Position: refs/heads/master@{#408715}
parent fbbdbf2f
...@@ -400,7 +400,7 @@ void PresentationFrameManager::OnPresentationSessionStarted( ...@@ -400,7 +400,7 @@ void PresentationFrameManager::OnPresentationSessionStarted(
const RenderFrameHostId& render_frame_host_id, const RenderFrameHostId& render_frame_host_id,
const content::PresentationSessionInfo& session, const content::PresentationSessionInfo& session,
const MediaRoute::Id& route_id) { const MediaRoute::Id& route_id) {
auto presentation_frame = GetOrAddPresentationFrame(render_frame_host_id); auto* presentation_frame = GetOrAddPresentationFrame(render_frame_host_id);
presentation_frame->OnPresentationSessionStarted(session, route_id); presentation_frame->OnPresentationSessionStarted(session, route_id);
} }
...@@ -408,7 +408,7 @@ void PresentationFrameManager::OnDefaultPresentationSessionStarted( ...@@ -408,7 +408,7 @@ void PresentationFrameManager::OnDefaultPresentationSessionStarted(
const PresentationRequest& request, const PresentationRequest& request,
const content::PresentationSessionInfo& session, const content::PresentationSessionInfo& session,
const MediaRoute::Id& route_id) { const MediaRoute::Id& route_id) {
auto presentation_frame = auto* presentation_frame =
presentation_frames_.get(request.render_frame_host_id()); presentation_frames_.get(request.render_frame_host_id());
if (presentation_frame) if (presentation_frame)
presentation_frame->OnPresentationSessionStarted(session, route_id); presentation_frame->OnPresentationSessionStarted(session, route_id);
...@@ -422,14 +422,14 @@ void PresentationFrameManager::OnDefaultPresentationSessionStarted( ...@@ -422,14 +422,14 @@ void PresentationFrameManager::OnDefaultPresentationSessionStarted(
const MediaRoute::Id PresentationFrameManager::GetRouteId( const MediaRoute::Id PresentationFrameManager::GetRouteId(
const RenderFrameHostId& render_frame_host_id, const RenderFrameHostId& render_frame_host_id,
const std::string& presentation_id) const { const std::string& presentation_id) const {
auto presentation_frame = presentation_frames_.get(render_frame_host_id); auto* presentation_frame = presentation_frames_.get(render_frame_host_id);
return presentation_frame ? presentation_frame->GetRouteId(presentation_id) return presentation_frame ? presentation_frame->GetRouteId(presentation_id)
: ""; : "";
} }
const std::vector<MediaRoute::Id> PresentationFrameManager::GetRouteIds( const std::vector<MediaRoute::Id> PresentationFrameManager::GetRouteIds(
const RenderFrameHostId& render_frame_host_id) const { const RenderFrameHostId& render_frame_host_id) const {
auto presentation_frame = presentation_frames_.get(render_frame_host_id); auto* presentation_frame = presentation_frames_.get(render_frame_host_id);
return presentation_frame ? presentation_frame->GetRouteIds() return presentation_frame ? presentation_frame->GetRouteIds()
: std::vector<MediaRoute::Id>(); : std::vector<MediaRoute::Id>();
} }
...@@ -438,7 +438,7 @@ bool PresentationFrameManager::SetScreenAvailabilityListener( ...@@ -438,7 +438,7 @@ bool PresentationFrameManager::SetScreenAvailabilityListener(
const RenderFrameHostId& render_frame_host_id, const RenderFrameHostId& render_frame_host_id,
content::PresentationScreenAvailabilityListener* listener) { content::PresentationScreenAvailabilityListener* listener) {
DCHECK(listener); DCHECK(listener);
auto presentation_frame = GetOrAddPresentationFrame(render_frame_host_id); auto* presentation_frame = GetOrAddPresentationFrame(render_frame_host_id);
return presentation_frame->SetScreenAvailabilityListener(listener); return presentation_frame->SetScreenAvailabilityListener(listener);
} }
...@@ -446,7 +446,7 @@ bool PresentationFrameManager::RemoveScreenAvailabilityListener( ...@@ -446,7 +446,7 @@ bool PresentationFrameManager::RemoveScreenAvailabilityListener(
const RenderFrameHostId& render_frame_host_id, const RenderFrameHostId& render_frame_host_id,
content::PresentationScreenAvailabilityListener* listener) { content::PresentationScreenAvailabilityListener* listener) {
DCHECK(listener); DCHECK(listener);
auto presentation_frame = presentation_frames_.get(render_frame_host_id); auto* presentation_frame = presentation_frames_.get(render_frame_host_id);
return presentation_frame && return presentation_frame &&
presentation_frame->RemoveScreenAvailabilityListener(listener); presentation_frame->RemoveScreenAvailabilityListener(listener);
} }
...@@ -454,7 +454,7 @@ bool PresentationFrameManager::RemoveScreenAvailabilityListener( ...@@ -454,7 +454,7 @@ bool PresentationFrameManager::RemoveScreenAvailabilityListener(
bool PresentationFrameManager::HasScreenAvailabilityListenerForTest( bool PresentationFrameManager::HasScreenAvailabilityListenerForTest(
const RenderFrameHostId& render_frame_host_id, const RenderFrameHostId& render_frame_host_id,
const MediaSource::Id& source_id) const { const MediaSource::Id& source_id) const {
auto presentation_frame = presentation_frames_.get(render_frame_host_id); auto* presentation_frame = presentation_frames_.get(render_frame_host_id);
return presentation_frame && return presentation_frame &&
presentation_frame->HasScreenAvailabilityListenerForTest(source_id); presentation_frame->HasScreenAvailabilityListenerForTest(source_id);
} }
...@@ -464,7 +464,7 @@ void PresentationFrameManager::ListenForConnectionStateChange( ...@@ -464,7 +464,7 @@ void PresentationFrameManager::ListenForConnectionStateChange(
const content::PresentationSessionInfo& connection, const content::PresentationSessionInfo& connection,
const content::PresentationConnectionStateChangedCallback& const content::PresentationConnectionStateChangedCallback&
state_changed_cb) { state_changed_cb) {
auto presentation_frame = presentation_frames_.get(render_frame_host_id); auto* presentation_frame = presentation_frames_.get(render_frame_host_id);
if (presentation_frame) { if (presentation_frame) {
presentation_frame->ListenForConnectionStateChange(connection, presentation_frame->ListenForConnectionStateChange(connection,
state_changed_cb); state_changed_cb);
...@@ -508,13 +508,13 @@ void PresentationFrameManager::SetDefaultPresentationUrl( ...@@ -508,13 +508,13 @@ void PresentationFrameManager::SetDefaultPresentationUrl(
void PresentationFrameManager::AddDelegateObserver( void PresentationFrameManager::AddDelegateObserver(
const RenderFrameHostId& render_frame_host_id, const RenderFrameHostId& render_frame_host_id,
DelegateObserver* observer) { DelegateObserver* observer) {
auto presentation_frame = GetOrAddPresentationFrame(render_frame_host_id); auto* presentation_frame = GetOrAddPresentationFrame(render_frame_host_id);
presentation_frame->set_delegate_observer(observer); presentation_frame->set_delegate_observer(observer);
} }
void PresentationFrameManager::RemoveDelegateObserver( void PresentationFrameManager::RemoveDelegateObserver(
const RenderFrameHostId& render_frame_host_id) { const RenderFrameHostId& render_frame_host_id) {
auto presentation_frame = presentation_frames_.get(render_frame_host_id); auto* presentation_frame = presentation_frames_.get(render_frame_host_id);
if (presentation_frame) { if (presentation_frame) {
presentation_frame->set_delegate_observer(nullptr); presentation_frame->set_delegate_observer(nullptr);
presentation_frames_.erase(render_frame_host_id); presentation_frames_.erase(render_frame_host_id);
...@@ -535,7 +535,7 @@ void PresentationFrameManager::RemoveDefaultPresentationRequestObserver( ...@@ -535,7 +535,7 @@ void PresentationFrameManager::RemoveDefaultPresentationRequestObserver(
void PresentationFrameManager::Reset( void PresentationFrameManager::Reset(
const RenderFrameHostId& render_frame_host_id) { const RenderFrameHostId& render_frame_host_id) {
auto presentation_frame = presentation_frames_.get(render_frame_host_id); auto* presentation_frame = presentation_frames_.get(render_frame_host_id);
if (presentation_frame) if (presentation_frame)
presentation_frame->Reset(); presentation_frame->Reset();
...@@ -550,7 +550,7 @@ void PresentationFrameManager::RemoveConnection( ...@@ -550,7 +550,7 @@ void PresentationFrameManager::RemoveConnection(
const RenderFrameHostId& render_frame_host_id, const RenderFrameHostId& render_frame_host_id,
const MediaRoute::Id& route_id, const MediaRoute::Id& route_id,
const std::string& presentation_id) { const std::string& presentation_id) {
auto presentation_frame = presentation_frames_.get(render_frame_host_id); auto* presentation_frame = presentation_frames_.get(render_frame_host_id);
if (presentation_frame) if (presentation_frame)
presentation_frame->RemoveConnection(route_id, presentation_id); presentation_frame->RemoveConnection(route_id, presentation_id);
} }
......
...@@ -87,7 +87,7 @@ void TabDesktopMediaList::Refresh() { ...@@ -87,7 +87,7 @@ void TabDesktopMediaList::Refresh() {
std::vector<std::pair<DesktopMediaID, gfx::ImageSkia>> favicon_pairs; std::vector<std::pair<DesktopMediaID, gfx::ImageSkia>> favicon_pairs;
// Enumerate all tabs with their titles and favicons for a user profile. // Enumerate all tabs with their titles and favicons for a user profile.
for (auto browser : browsers) { for (auto* browser : browsers) {
const TabStripModel* tab_strip_model = browser->tab_strip_model(); const TabStripModel* tab_strip_model = browser->tab_strip_model();
DCHECK(tab_strip_model); DCHECK(tab_strip_model);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment