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

Unified Diff: chrome/browser/media/protected_media_identifier_permission_context.cc

Issue 383213007: ifdef more extensions code to be used only when extensions are enabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments, lint Created 6 years, 5 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/protected_media_identifier_permission_context.cc
diff --git a/chrome/browser/media/protected_media_identifier_permission_context.cc b/chrome/browser/media/protected_media_identifier_permission_context.cc
index 4b531892f5c32c45ef838a6601ca07a2e9a68d5e..5c56801586c980b866121874510d2fdead59bde2 100644
--- a/chrome/browser/media/protected_media_identifier_permission_context.cc
+++ b/chrome/browser/media/protected_media_identifier_permission_context.cc
@@ -14,8 +14,6 @@
#include "chrome/browser/content_settings/host_content_settings_map.h"
#include "chrome/browser/content_settings/permission_request_id.h"
#include "chrome/browser/content_settings/tab_specific_content_settings.h"
-#include "chrome/browser/extensions/extension_service.h"
-#include "chrome/browser/extensions/suggest_permission_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/tab_contents/tab_util.h"
#include "chrome/common/pref_names.h"
@@ -23,11 +21,16 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
+
+#if defined(ENABLE_EXTENSIONS)
+#include "chrome/browser/extensions/extension_service.h"
+#include "chrome/browser/extensions/suggest_permission_util.h"
#include "extensions/browser/extension_system.h"
#include "extensions/browser/view_type_utils.h"
#include "extensions/common/extension.h"
using extensions::APIPermission;
+#endif
ProtectedMediaIdentifierPermissionContext::
ProtectedMediaIdentifierPermissionContext(Profile* profile)
@@ -63,6 +66,7 @@ void ProtectedMediaIdentifierPermissionContext::
const PermissionRequestID id(
render_process_id, render_view_id, 0, origin);
+#if defined(ENABLE_EXTENSIONS)
if (extensions::GetViewType(web_contents) !=
extensions::VIEW_TYPE_TAB_CONTENTS) {
// The tab may have gone away, or the request may not be from a tab at all.
@@ -73,6 +77,7 @@ void ProtectedMediaIdentifierPermissionContext::
NotifyPermissionSet(id, origin, result_callback, false);
return;
}
+#endif
GURL embedder = web_contents->GetLastCommittedURL();
if (!origin.is_valid() || !embedder.is_valid()) {
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/metrics/chrome_stability_metrics_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698