| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/safe_browsing/safe_browsing_tab_observer.h" | 5 #include "chrome/browser/safe_browsing/safe_browsing_tab_observer.h" |
| 6 | 6 |
| 7 #include "chrome/browser/browser_process.h" | 7 #include "chrome/browser/browser_process.h" |
| 8 #include "chrome/browser/prefs/pref_service.h" | 8 #include "chrome/browser/prefs/pref_service.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 10 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 g_browser_process->safe_browsing_detection_service()) { | 84 g_browser_process->safe_browsing_detection_service()) { |
| 85 if (!safebrowsing_detection_host_.get()) { | 85 if (!safebrowsing_detection_host_.get()) { |
| 86 safebrowsing_detection_host_.reset( | 86 safebrowsing_detection_host_.reset( |
| 87 ClientSideDetectionHost::Create(wrapper_->web_contents())); | 87 ClientSideDetectionHost::Create(wrapper_->web_contents())); |
| 88 } | 88 } |
| 89 } else { | 89 } else { |
| 90 safebrowsing_detection_host_.reset(); | 90 safebrowsing_detection_host_.reset(); |
| 91 } | 91 } |
| 92 | 92 |
| 93 RenderViewHost* rvh = wrapper_->web_contents()->GetRenderViewHost(); | 93 RenderViewHost* rvh = wrapper_->web_contents()->GetRenderViewHost(); |
| 94 rvh->Send(new ChromeViewMsg_SetClientSidePhishingDetection(rvh->routing_id(), | 94 rvh->Send(new ChromeViewMsg_SetClientSidePhishingDetection( |
| 95 safe_browsing)); | 95 rvh->GetRoutingID(), safe_browsing)); |
| 96 #endif | 96 #endif |
| 97 } | 97 } |
| 98 | 98 |
| 99 } // namespace safe_browsing | 99 } // namespace safe_browsing |
| OLD | NEW |