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

Unified Diff: chrome/browser/media/webrtc/media_permission.cc

Issue 2759593002: Remove c/b/media/webrtc/media_permission.{h,cc} (Closed)
Patch Set: Remove c/b/media/webrtc/media_permission.{h,cc} Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/media/webrtc/media_permission.cc
diff --git a/chrome/browser/media/webrtc/media_permission.cc b/chrome/browser/media/webrtc/media_permission.cc
deleted file mode 100644
index e1171119f9d45cb5bcbbd374b1ddec8be569c312..0000000000000000000000000000000000000000
--- a/chrome/browser/media/webrtc/media_permission.cc
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/media/webrtc/media_permission.h"
-
-#include "chrome/browser/permissions/permission_context_base.h"
-#include "chrome/browser/permissions/permission_manager.h"
-#include "chrome/browser/profiles/profile.h"
-#include "chrome/common/pref_names.h"
-#include "content/public/browser/permission_manager.h"
-#include "content/public/browser/web_contents.h"
-#include "content/public/common/url_constants.h"
-#include "extensions/common/constants.h"
-
-MediaPermission::MediaPermission(ContentSettingsType content_type,
- const GURL& requesting_origin,
- const GURL& embedding_origin,
- Profile* profile,
- content::WebContents* web_contents)
- : content_type_(content_type),
- requesting_origin_(requesting_origin),
- embedding_origin_(embedding_origin),
- profile_(profile),
- web_contents_(web_contents) {
- // Currently |web_contents_| is only used on ChromeOS but it's not worth
- // #ifdef'ing out all its usage, so just mark it used here.
- (void)web_contents_;
-}
-
-ContentSetting MediaPermission::GetPermissionStatus(
- content::MediaStreamRequestResult* denial_reason) const {
- DCHECK(!requesting_origin_.is_empty());
-
- PermissionManager* permission_manager = PermissionManager::Get(profile_);
-
- // Find out if the kill switch is on. Set the denial reason to kill switch.
- if (permission_manager->IsPermissionKillSwitchOn(content_type_)) {
- *denial_reason = content::MEDIA_DEVICE_KILL_SWITCH_ON;
- return CONTENT_SETTING_BLOCK;
- }
-
- // Check policy and content settings.
- ContentSetting content_setting =
- permission_manager
- ->GetPermissionStatus(content_type_, requesting_origin_,
- embedding_origin_)
- .content_setting;
- if (content_setting == CONTENT_SETTING_BLOCK)
- *denial_reason = content::MEDIA_DEVICE_PERMISSION_DENIED;
- return content_setting;
-}
« no previous file with comments | « chrome/browser/media/webrtc/media_permission.h ('k') | chrome/browser/media/webrtc/media_stream_devices_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698