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

Unified Diff: chrome/browser/extensions/api/tabs/tabs_api.cc

Issue 140433003: tab capture: Change the permissions for tabs.captureVisibleTab(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 11 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
Index: chrome/browser/extensions/api/tabs/tabs_api.cc
diff --git a/chrome/browser/extensions/api/tabs/tabs_api.cc b/chrome/browser/extensions/api/tabs/tabs_api.cc
index 302de3ce81035206e90912b4361e4c2b51a94163..fded9c9929014d6e5a67fbaa945e339164d95a5c 100644
--- a/chrome/browser/extensions/api/tabs/tabs_api.cc
+++ b/chrome/browser/extensions/api/tabs/tabs_api.cc
@@ -1676,20 +1676,7 @@ WebContents* TabsCaptureVisibleTabFunction::GetWebContentsForID(int window_id) {
return NULL;
}
- // Use the last committed URL rather than the active URL for permissions
- // checking, since the visible page won't be updated until it has been
- // committed. A canonical example of this is interstitials, which show the
- // URL of the new/loading page (active) but would capture the content of the
- // old page (last committed).
- //
- // TODO(creis): Use WebContents::GetLastCommittedURL instead.
- // http://crbug.com/237908.
- NavigationEntry* last_committed_entry =
- contents->GetController().GetLastCommittedEntry();
- GURL last_committed_url = last_committed_entry ?
- last_committed_entry->GetURL() : GURL();
if (!PermissionsData::CanCaptureVisiblePage(GetExtension(),
- last_committed_url,
SessionID::IdForTab(contents),
&error_)) {
return NULL;
« no previous file with comments | « chrome/browser/extensions/active_tab_unittest.cc ('k') | chrome/browser/extensions/extension_tabs_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698