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

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

Issue 2415863002: Use PermissionType instead of ContentSettingsType in Android permission infobars (Closed)
Patch Set: Merge branch 'master' into use_permission_type_for_infobar Created 4 years, 2 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_stream_infobar_delegate_android.cc
diff --git a/chrome/browser/media/webrtc/media_stream_infobar_delegate_android.cc b/chrome/browser/media/webrtc/media_stream_infobar_delegate_android.cc
index 23bfb353c0ee5f1b8666ba9e4d55e6d61f983c40..39025ae5877ddb006bfdbcd2327ab342eb69a534 100644
--- a/chrome/browser/media/webrtc/media_stream_infobar_delegate_android.cc
+++ b/chrome/browser/media/webrtc/media_stream_infobar_delegate_android.cc
@@ -16,9 +16,9 @@
#include "chrome/common/url_constants.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/grit/theme_resources.h"
-#include "components/content_settings/core/common/content_settings_types.h"
#include "components/google/core/browser/google_util.h"
#include "components/infobars/core/infobar.h"
+#include "content/public/browser/permission_type.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/origin_util.h"
#include "ui/base/l10n/l10n_util.h"
@@ -86,7 +86,6 @@ MediaStreamInfoBarDelegateAndroid::MediaStreamInfoBarDelegateAndroid(
// TODO(lshang): Merge MediaStreamInfoBarDelegateAndroid into
// GroupedPermissionInfoBarDelegate. See crbug.com/606138.
content::PermissionType::AUDIO_CAPTURE,
- CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC,
false,
profile,
// This is only passed in to fit into PermissionInfoBarDelegate.
@@ -187,11 +186,11 @@ GURL MediaStreamInfoBarDelegateAndroid::GetLinkURL() const {
return GURL(chrome::kMediaAccessLearnMoreUrl);
}
-std::vector<int> MediaStreamInfoBarDelegateAndroid::content_settings() const {
+std::vector<int> MediaStreamInfoBarDelegateAndroid::permission_types() const {
std::vector<int> types;
if (controller_->IsAskingForAudio())
- types.push_back(CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC);
+ types.push_back(static_cast<int>(content::PermissionType::AUDIO_CAPTURE));
if (controller_->IsAskingForVideo())
- types.push_back(CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA);
+ types.push_back(static_cast<int>(content::PermissionType::VIDEO_CAPTURE));
return types;
}

Powered by Google App Engine
This is Rietveld 408576698