Chromium Code Reviews| Index: chrome/browser/extensions/extension_tab_util.cc |
| diff --git a/chrome/browser/extensions/extension_tab_util.cc b/chrome/browser/extensions/extension_tab_util.cc |
| index 5d4b89b667faac9facefd526cd0de2a974db0499..1bb6b176f3028bc68a06b005618ff443e658535f 100644 |
| --- a/chrome/browser/extensions/extension_tab_util.cc |
| +++ b/chrome/browser/extensions/extension_tab_util.cc |
| @@ -315,6 +315,9 @@ int ExtensionTabUtil::GetWindowIdOfTabStripModel( |
| } |
| int ExtensionTabUtil::GetTabId(const WebContents* web_contents) { |
| + Browser* browser = chrome::FindBrowserWithWebContents(web_contents); |
| + if (browser && browser->is_devtools()) |
|
not at google - send to devlin
2015/07/17 16:44:58
ExtensionTabUtil::BrowserSupportsTabs(browser)
|
| + return -1; |
| return SessionTabHelper::IdForTab(web_contents); |
| } |
| @@ -489,6 +492,8 @@ bool ExtensionTabUtil::GetTabById(int tab_id, |
| TabStripModel** tab_strip, |
| WebContents** contents, |
| int* tab_index) { |
| + if (tab_id == api::tabs::TAB_ID_NONE) |
| + return false; |
| Profile* profile = Profile::FromBrowserContext(browser_context); |
| Profile* incognito_profile = |
| include_incognito && profile->HasOffTheRecordProfile() ? |