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 1ebe3af4a2e779be5ce682219100f6967218cd0e..1f9a7f136487956bff23d0e5e4750a61ebdf13db 100644 | 
| --- a/chrome/browser/extensions/extension_tab_util.cc | 
| +++ b/chrome/browser/extensions/extension_tab_util.cc | 
| @@ -133,6 +133,25 @@ DictionaryValue* ExtensionTabUtil::CreateTabValue( | 
| return result; | 
| } | 
| +DictionaryValue* ExtensionTabUtil::ScrubTabValue( | 
| + const WebContents* contents, | 
| + const Extension* extension, | 
| + const DictionaryValue* update_info) { | 
| + DictionaryValue* scrubbed_info = update_info->DeepCopy(); | 
| 
 
not at google - send to devlin
2013/01/08 21:25:09
it doesn't seem necessary to return a copy here; w
 
mvrable
2013/01/09 01:46:59
Done.
 
 | 
| + | 
| + // Strip any sensitive data fields out of the update dictionary, if the | 
| + // extension does not have the tabs permission. | 
| + if (!extension || | 
| + !extension->HasAPIPermissionForTab(ExtensionTabUtil::GetTabId(contents), | 
| + APIPermission::kTab)) { | 
| + scrubbed_info->Remove(keys::kUrlKey, NULL); | 
| + scrubbed_info->Remove(keys::kTitleKey, NULL); | 
| + scrubbed_info->Remove(keys::kFaviconUrlKey, NULL); | 
| + } | 
| + | 
| + return scrubbed_info; | 
| +} | 
| 
 
not at google - send to devlin
2013/01/08 21:25:09
It would be nice to avoid the duplication here and
 
mvrable
2013/01/09 01:46:59
Done, I think: do these changes look reasonable?
 
 | 
| + | 
| bool ExtensionTabUtil::GetTabStripModel(const WebContents* web_contents, | 
| TabStripModel** tab_strip_model, | 
| int* tab_index) { |