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

Unified Diff: chrome/browser/download/download_request_limiter.cc

Issue 10535120: TabContentsWrapper -> TabContents, part 43. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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/download/download_request_limiter.cc
diff --git a/chrome/browser/download/download_request_limiter.cc b/chrome/browser/download/download_request_limiter.cc
index 901071a36bb286ea995f1d87dd8b7a665405797a..155d6337c35e0eddbd217a91655e1da8ae71ec3c 100644
--- a/chrome/browser/download/download_request_limiter.cc
+++ b/chrome/browser/download/download_request_limiter.cc
@@ -65,10 +65,9 @@ void DownloadRequestLimiter::TabDownloadState::DidGetUserGesture() {
return;
}
- TabContents* tab_contents =
- TabContents::GetOwningTabContentsForWebContents(web_contents());
- // See PromptUserForDownload(): if there's no TCW, then DOWNLOADS_NOT_ALLOWED
- // is functionally equivalent to PROMPT_BEFORE_DOWNLOAD.
+ TabContents* tab_contents = TabContents::FromWebContents(web_contents());
+ // See PromptUserForDownload(): if there's no TabContents, then
+ // DOWNLOADS_NOT_ALLOWED is functionally equivalent to PROMPT_BEFORE_DOWNLOAD.
if ((tab_contents &&
status_ != DownloadRequestLimiter::ALLOW_ALL_DOWNLOADS &&
status_ != DownloadRequestLimiter::DOWNLOADS_NOT_ALLOWED) ||
@@ -92,8 +91,7 @@ void DownloadRequestLimiter::TabDownloadState::PromptUserForDownload(
NotifyCallbacks(DownloadRequestLimiter::delegate_->ShouldAllowDownload());
return;
}
- TabContents* tab_contents =
- TabContents::GetOwningTabContentsForWebContents(web_contents);
+ TabContents* tab_contents = TabContents::FromWebContents(web_contents);
if (!tab_contents) {
// If |web_contents| doesn't have a TabContents, then it isn't what a user
// thinks of as a tab, it's actually a "raw" WebContents like those used
@@ -319,7 +317,7 @@ void DownloadRequestLimiter::CanDownloadImpl(WebContents* originating_contents,
// shown, treat the request as if it came from the parent.
WebContents* effective_contents = originating_contents;
TabContents* originating_tab_contents =
- TabContents::GetOwningTabContentsForWebContents(originating_contents);
+ TabContents::FromWebContents(originating_contents);
if (originating_tab_contents &&
originating_tab_contents->blocked_content_tab_helper()->delegate()) {
effective_contents =
« no previous file with comments | « chrome/browser/debugger/devtools_window.cc ('k') | chrome/browser/download/download_request_limiter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698