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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 296043014: Cleanup: Do not pass a non-const ref in RequestDesktopNotificationPermission. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 "chrome/browser/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 2011 matching lines...) Expand 10 before | Expand all | Expand 10 after
2022 render_process_id, render_view_id); 2022 render_process_id, render_view_id);
2023 } 2023 }
2024 2024
2025 content::MediaObserver* ChromeContentBrowserClient::GetMediaObserver() { 2025 content::MediaObserver* ChromeContentBrowserClient::GetMediaObserver() {
2026 return MediaCaptureDevicesDispatcher::GetInstance(); 2026 return MediaCaptureDevicesDispatcher::GetInstance();
2027 } 2027 }
2028 2028
2029 void ChromeContentBrowserClient::RequestDesktopNotificationPermission( 2029 void ChromeContentBrowserClient::RequestDesktopNotificationPermission(
2030 const GURL& source_origin, 2030 const GURL& source_origin,
2031 content::RenderFrameHost* render_frame_host, 2031 content::RenderFrameHost* render_frame_host,
2032 base::Closure& callback) { 2032 const base::Closure& callback) {
2033 #if defined(ENABLE_NOTIFICATIONS) 2033 #if defined(ENABLE_NOTIFICATIONS)
2034 // Skip showing the infobar if the request comes from an extension, and that 2034 // Skip showing the infobar if the request comes from an extension, and that
2035 // extension has the 'notify' permission. (If the extension does not have the 2035 // extension has the 'notify' permission. (If the extension does not have the
2036 // permission, the user will still be prompted.) 2036 // permission, the user will still be prompted.)
2037 Profile* profile = Profile::FromBrowserContext( 2037 Profile* profile = Profile::FromBrowserContext(
2038 render_frame_host->GetSiteInstance()->GetBrowserContext()); 2038 render_frame_host->GetSiteInstance()->GetBrowserContext());
2039 InfoMap* extension_info_map = 2039 InfoMap* extension_info_map =
2040 extensions::ExtensionSystem::Get(profile)->info_map(); 2040 extensions::ExtensionSystem::Get(profile)->info_map();
2041 DesktopNotificationService* notification_service = 2041 DesktopNotificationService* notification_service =
2042 DesktopNotificationServiceFactory::GetForProfile(profile); 2042 DesktopNotificationServiceFactory::GetForProfile(profile);
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
2752 switches::kDisableWebRtcEncryption, 2752 switches::kDisableWebRtcEncryption,
2753 }; 2753 };
2754 to_command_line->CopySwitchesFrom(from_command_line, 2754 to_command_line->CopySwitchesFrom(from_command_line,
2755 kWebRtcDevSwitchNames, 2755 kWebRtcDevSwitchNames,
2756 arraysize(kWebRtcDevSwitchNames)); 2756 arraysize(kWebRtcDevSwitchNames));
2757 } 2757 }
2758 } 2758 }
2759 #endif // defined(ENABLE_WEBRTC) 2759 #endif // defined(ENABLE_WEBRTC)
2760 2760
2761 } // namespace chrome 2761 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | content/public/browser/content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698