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

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: 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..8fcff841d2874aa766a98c547a34481c8342c0c2 100644
--- a/chrome/browser/extensions/api/tab_capture/tab_capture_api.cc
+++ b/chrome/browser/extensions/api/tab_capture/tab_capture_api.cc
@@ -35,6 +35,19 @@ namespace GetCapturedTabs = TabCapture::GetCapturedTabs;
namespace extensions {
+// Whitelisted extensions that do not check for a browser action grant because
achuithb 2015/05/08 04:44:43 I'd move this code to below the anonymous namespac
hubbe 2015/05/12 17:25:41 I also think this should be moved.
jdufault 2015/05/12 18:08:54 Done.
jdufault 2015/05/12 18:16:38 This broke the build (since kChromecastExtensionId
+// 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 {
const char kCapturingSameTab[] = "Cannot capture a tab with an active stream.";
@@ -49,17 +62,6 @@ const char kMediaStreamSource[] = "chromeMediaSource";
const char kMediaStreamSourceId[] = "chromeMediaSourceId";
const char kMediaStreamSourceTab[] = "tab";
-// 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
-};
-
} // namespace
bool TabCaptureCaptureFunction::RunSync() {
@@ -91,8 +93,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