Chromium Code Reviews| 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; |
| } |