Commit 21b9dfa7 authored by Devlin Cronin's avatar Devlin Cronin Committed by Commit Bot

[Extensions] Remove inIncognitoTab handling for manifest v1

Manifest v1 had an "inIncognitoTab" on the chrome.extension API object
property instead of the new "inIncognitoContext". Remove support for
this fully (and update a stale reference).

Bug: 816677

Change-Id: I4cefe0359ff3c4cae0df06b467c5628f6cd27fc6
Reviewed-on: https://chromium-review.googlesource.com/973542Reviewed-by: default avatarIstiaque Ahmed <lazyboy@chromium.org>
Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545627}
parent bb2025ae
...@@ -86,7 +86,8 @@ chrome.test.getConfig(function(config) { ...@@ -86,7 +86,8 @@ chrome.test.getConfig(function(config) {
var testUrl = "http://localhost:PORT/extensions/test_file.html" var testUrl = "http://localhost:PORT/extensions/test_file.html"
.replace(/PORT/, config.testServer.port); .replace(/PORT/, config.testServer.port);
// Test that chrome.extension.inIncognitoTab is true for incognito tabs. // Test that chrome.extension.inIncognitoContext is true for incognito
// tabs.
chrome.tabs.create({windowId: incognitoWindow.id, url: testUrl}, chrome.tabs.create({windowId: incognitoWindow.id, url: testUrl},
pass(function(tab) { pass(function(tab) {
chrome.tabs.executeScript(tab.id, chrome.tabs.executeScript(tab.id,
......
...@@ -14,7 +14,6 @@ var chrome = requireNative('chrome').GetChrome(); ...@@ -14,7 +14,6 @@ var chrome = requireNative('chrome').GetChrome();
var inIncognitoContext = requireNative('process').InIncognitoContext(); var inIncognitoContext = requireNative('process').InIncognitoContext();
var sendRequestIsDisabled = requireNative('process').IsSendRequestDisabled(); var sendRequestIsDisabled = requireNative('process').IsSendRequestDisabled();
var contextType = requireNative('process').GetContextType(); var contextType = requireNative('process').GetContextType();
var manifestVersion = requireNative('process').GetManifestVersion();
// This should match chrome.windows.WINDOW_ID_NONE. // This should match chrome.windows.WINDOW_ID_NONE.
// //
...@@ -26,10 +25,6 @@ var TAB_ID_NONE = -1; ...@@ -26,10 +25,6 @@ var TAB_ID_NONE = -1;
binding.registerCustomHook(function(bindingsAPI, extensionId) { binding.registerCustomHook(function(bindingsAPI, extensionId) {
var extension = bindingsAPI.compiledApi; var extension = bindingsAPI.compiledApi;
if (manifestVersion < 2) {
chrome.self = extension;
extension.inIncognitoTab = inIncognitoContext;
}
extension.inIncognitoContext = inIncognitoContext; extension.inIncognitoContext = inIncognitoContext;
var apiFunctions = bindingsAPI.apiFunctions; var apiFunctions = bindingsAPI.apiFunctions;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment