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

Side by Side Diff: chrome/browser/loader/safe_browsing_resource_throttle.cc

Issue 2814733002: Add the SocEng as a type for checking in CheckUrlForSubresourceFilter. (Closed)
Patch Set: . Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/loader/safe_browsing_resource_throttle.h" 5 #include "chrome/browser/loader/safe_browsing_resource_throttle.h"
6 6
7 #include <iterator> 7 #include <iterator>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 AsWeakPtr(), ui_manager(), resource)); 85 AsWeakPtr(), ui_manager(), resource));
86 } 86 }
87 87
88 // Static 88 // Static
89 void SafeBrowsingResourceThrottle::StartDisplayingBlockingPage( 89 void SafeBrowsingResourceThrottle::StartDisplayingBlockingPage(
90 const base::WeakPtr<safe_browsing::BaseResourceThrottle>& throttle, 90 const base::WeakPtr<safe_browsing::BaseResourceThrottle>& throttle,
91 scoped_refptr<BaseUIManager> ui_manager, 91 scoped_refptr<BaseUIManager> ui_manager,
92 const security_interstitials::UnsafeResource& resource) { 92 const security_interstitials::UnsafeResource& resource) {
93 content::WebContents* web_contents = resource.web_contents_getter.Run(); 93 content::WebContents* web_contents = resource.web_contents_getter.Run();
94 if (web_contents) { 94 if (web_contents) {
95 BaseResourceThrottle::NotifySubresourceFilterOfBlockedResource(resource);
96 prerender::PrerenderContents* prerender_contents = 95 prerender::PrerenderContents* prerender_contents =
97 prerender::PrerenderContents::FromWebContents(web_contents); 96 prerender::PrerenderContents::FromWebContents(web_contents);
98 if (prerender_contents) { 97 if (prerender_contents) {
99 prerender_contents->Destroy(prerender::FINAL_STATUS_SAFE_BROWSING); 98 prerender_contents->Destroy(prerender::FINAL_STATUS_SAFE_BROWSING);
100 } else { 99 } else {
101 ui_manager->DisplayBlockingPage(resource); 100 ui_manager->DisplayBlockingPage(resource);
102 return; 101 return;
103 } 102 }
104 } 103 }
105 104
106 // Tab is gone or it's being prerendered. 105 // Tab is gone or it's being prerendered.
107 content::BrowserThread::PostTask( 106 content::BrowserThread::PostTask(
108 content::BrowserThread::IO, FROM_HERE, 107 content::BrowserThread::IO, FROM_HERE,
109 base::BindOnce(&SafeBrowsingResourceThrottle::Cancel, throttle)); 108 base::BindOnce(&SafeBrowsingResourceThrottle::Cancel, throttle));
110 } 109 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698