 Chromium Code Reviews
 Chromium Code Reviews Issue 2900563002:
  Network service: Safe browsing check for sub-resources from renderer.  (Closed)
    
  
    Issue 2900563002:
  Network service: Safe browsing check for sub-resources from renderer.  (Closed) 
  | Index: chrome/renderer/chrome_content_renderer_client.h | 
| diff --git a/chrome/renderer/chrome_content_renderer_client.h b/chrome/renderer/chrome_content_renderer_client.h | 
| index dd11c11af11c2a34f816048d36b27b6fc1cfbcc3..736ab6d3c47a8395371f31df2a09e1633b77b8b0 100644 | 
| --- a/chrome/renderer/chrome_content_renderer_client.h | 
| +++ b/chrome/renderer/chrome_content_renderer_client.h | 
| @@ -16,6 +16,7 @@ | 
| #include "base/compiler_specific.h" | 
| #include "base/gtest_prod_util.h" | 
| #include "base/strings/string16.h" | 
| +#include "chrome/common/safe_browsing.mojom.h" | 
| #include "chrome/renderer/media/chrome_key_systems_provider.h" | 
| #include "components/rappor/public/interfaces/rappor_recorder.mojom.h" | 
| #include "components/spellcheck/spellcheck_build_features.h" | 
| @@ -139,7 +140,9 @@ class ChromeContentRendererClient : public content::ContentRendererClient { | 
| bool WillSendRequest(blink::WebLocalFrame* frame, | 
| ui::PageTransition transition_type, | 
| const blink::WebURL& url, | 
| - GURL* new_url) override; | 
| + GURL* new_url, | 
| + std::vector<std::unique_ptr<content::URLLoaderThrottle>>* | 
| + throttles) override; | 
| bool IsPrefetchOnly(content::RenderFrame* render_frame, | 
| const blink::WebURLRequest& request) override; | 
| unsigned long long VisitedLinkHash(const char* canonical_url, | 
| @@ -210,6 +213,8 @@ class ChromeContentRendererClient : public content::ContentRendererClient { | 
| const GURL& url, const std::set<std::string>& whitelist); | 
| #endif | 
| + void OnRenderFrameDestruct(content::RenderFrame* frame); | 
| + | 
| private: | 
| FRIEND_TEST_ALL_PREFIXES(ChromeContentRendererClientTest, NaClRestriction); | 
| FRIEND_TEST_ALL_PREFIXES(ChromeContentRendererClientTest, | 
| @@ -271,6 +276,14 @@ class ChromeContentRendererClient : public content::ContentRendererClient { | 
| mojom::ModuleEventSinkPtr module_event_sink_; | 
| #endif | 
| + struct FrameData { | 
| + FrameData(); | 
| + ~FrameData(); | 
| + chrome::mojom::SafeBrowsingPtr safe_browsing; | 
| + }; | 
| + using FrameDataMap = std::map<content::RenderFrame*, FrameData>; | 
| + FrameDataMap frame_data_map_; | 
| 
Adam Rice
2017/05/25 11:33:24
Could content::RenderFrame be made to inherit from
 
yzshen1
2017/05/26 20:43:52
I have changed the SafeBrowsing interface to be pe
 | 
| + | 
| DISALLOW_COPY_AND_ASSIGN(ChromeContentRendererClient); | 
| }; |