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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_tab_observer.cc

Issue 10539066: TabContentsWrapper -> TabContents, part 25. (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
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_tab_observer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/safe_browsing_tab_observer.cc
diff --git a/chrome/browser/safe_browsing/safe_browsing_tab_observer.cc b/chrome/browser/safe_browsing/safe_browsing_tab_observer.cc
index c7c9fb12f031ce687c330a3409869a0ee9352805..c76ced8c4cf5c9959ed9cab098f5d79d230e86be 100644
--- a/chrome/browser/safe_browsing/safe_browsing_tab_observer.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_tab_observer.cc
@@ -7,7 +7,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/render_messages.h"
@@ -30,9 +30,9 @@ class ClientSideDetectionHost { };
#endif
SafeBrowsingTabObserver::SafeBrowsingTabObserver(
- TabContentsWrapper* wrapper) : wrapper_(wrapper) {
+ TabContents* tab_contents) : tab_contents_(tab_contents) {
#if defined(ENABLE_SAFE_BROWSING)
- PrefService* prefs = wrapper_->profile()->GetPrefs();
+ PrefService* prefs = tab_contents_->profile()->GetPrefs();
if (prefs) {
pref_change_registrar_.Init(prefs);
pref_change_registrar_.Add(prefs::kSafeBrowsingEnabled, this);
@@ -40,7 +40,7 @@ SafeBrowsingTabObserver::SafeBrowsingTabObserver(
if (prefs->GetBoolean(prefs::kSafeBrowsingEnabled) &&
g_browser_process->safe_browsing_detection_service()) {
safebrowsing_detection_host_.reset(
- ClientSideDetectionHost::Create(wrapper_->web_contents()));
+ ClientSideDetectionHost::Create(tab_contents_->web_contents()));
}
}
#endif
@@ -60,7 +60,7 @@ void SafeBrowsingTabObserver::Observe(
case chrome::NOTIFICATION_PREF_CHANGED: {
std::string* pref_name = content::Details<std::string>(details).ptr();
DCHECK(content::Source<PrefService>(source).ptr() ==
- wrapper_->profile()->GetPrefs());
+ tab_contents_->profile()->GetPrefs());
if (*pref_name == prefs::kSafeBrowsingEnabled) {
UpdateSafebrowsingDetectionHost();
} else {
@@ -78,19 +78,20 @@ void SafeBrowsingTabObserver::Observe(
void SafeBrowsingTabObserver::UpdateSafebrowsingDetectionHost() {
#if defined(ENABLE_SAFE_BROWSING)
- PrefService* prefs = wrapper_->profile()->GetPrefs();
+ PrefService* prefs = tab_contents_->profile()->GetPrefs();
bool safe_browsing = prefs->GetBoolean(prefs::kSafeBrowsingEnabled);
if (safe_browsing &&
g_browser_process->safe_browsing_detection_service()) {
if (!safebrowsing_detection_host_.get()) {
safebrowsing_detection_host_.reset(
- ClientSideDetectionHost::Create(wrapper_->web_contents()));
+ ClientSideDetectionHost::Create(tab_contents_->web_contents()));
}
} else {
safebrowsing_detection_host_.reset();
}
- content::RenderViewHost* rvh = wrapper_->web_contents()->GetRenderViewHost();
+ content::RenderViewHost* rvh =
+ tab_contents_->web_contents()->GetRenderViewHost();
rvh->Send(new ChromeViewMsg_SetClientSidePhishingDetection(
rvh->GetRoutingID(), safe_browsing));
#endif
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_tab_observer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698