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

Unified Diff: chrome/browser/extensions/api/tab_capture/tab_capture_api.cc

Issue 1129303002: Expose chromecast extension ids for usage by cast system tray integration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/api/tab_capture/tab_capture_api.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/tab_capture/tab_capture_api.cc
diff --git a/chrome/browser/extensions/api/tab_capture/tab_capture_api.cc b/chrome/browser/extensions/api/tab_capture/tab_capture_api.cc
index df6b5ff5b805fcf062f81452ee61c306e2e5b0b2..0cdc2b4ec56f4649e299e29b5c495cbe80d57fe5 100644
--- a/chrome/browser/extensions/api/tab_capture/tab_capture_api.cc
+++ b/chrome/browser/extensions/api/tab_capture/tab_capture_api.cc
@@ -34,7 +34,6 @@ namespace TabCapture = extensions::api::tab_capture;
namespace GetCapturedTabs = TabCapture::GetCapturedTabs;
namespace extensions {
-
namespace {
const char kCapturingSameTab[] = "Cannot capture a tab with an active stream.";
@@ -49,19 +48,21 @@ const char kMediaStreamSource[] = "chromeMediaSource";
const char kMediaStreamSourceId[] = "chromeMediaSourceId";
const char kMediaStreamSourceTab[] = "tab";
+} // namespace
+
// Whitelisted extensions that do not check for a browser action grant because
-// they provide API's.
-const char* const kWhitelist[] = {
- "enhhojjnijigcajfphajepfemndkmdlo", // Dev
- "pkedcjkdefgpdelpbcmbmeomcjbeemfm", // Trusted Tester
- "fmfcbgogabcbclcofgocippekhfcmgfj", // Staging
- "hfaagokkkhdbgiakmmlclaapfelnkoah", // Canary
- "F155646B5D1CA545F7E1E4E20D573DFDD44C2540", // Trusted Tester (public)
- "16CA7A47AAE4BE49B1E75A6B960C3875E945B264" // Release
+// they provide API's. If there are additional extension ids that need
+// whitelisting and are *not* the Chromecast extension, add them to a new
+// kWhitelist array.
+const char* const kChromecastExtensionIds[] = {
+ "enhhojjnijigcajfphajepfemndkmdlo", // Dev
+ "pkedcjkdefgpdelpbcmbmeomcjbeemfm", // Dogfood
+ "fmfcbgogabcbclcofgocippekhfcmgfj", // Staging
+ "hfaagokkkhdbgiakmmlclaapfelnkoah", // Canary
+ "dliochdbjfkdbacpmhlcpmleaejidimm", // Google Cast Beta
+ "boadgeojelhgndaghljhdicfkmllpafd", // Google Cast Stable
};
-} // namespace
-
bool TabCaptureCaptureFunction::RunSync() {
scoped_ptr<api::tab_capture::Capture::Params> params =
TabCapture::Capture::Params::Create(*args_);
@@ -91,8 +92,8 @@ bool TabCaptureCaptureFunction::RunSync() {
APIPermission::kTabCaptureForTab) &&
base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
switches::kWhitelistedExtensionID) != extension_id &&
- !SimpleFeature::IsIdInArray(
- extension_id, kWhitelist, arraysize(kWhitelist))) {
+ !SimpleFeature::IsIdInArray(extension_id, kChromecastExtensionIds,
+ arraysize(kChromecastExtensionIds))) {
error_ = kGrantError;
return false;
}
« no previous file with comments | « chrome/browser/extensions/api/tab_capture/tab_capture_api.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698