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

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

Issue 9030032: Get rid of a bunch of tab_contents.h includes from chrome. These are all trivial changes to use W... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix cros Created 8 years, 12 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/safe_browsing/safe_browsing_service.cc
===================================================================
--- chrome/browser/safe_browsing/safe_browsing_service.cc (revision 116331)
+++ chrome/browser/safe_browsing/safe_browsing_service.cc (working copy)
@@ -33,11 +33,11 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
+#include "content/public/browser/web_contents.h"
#include "net/base/registry_controlled_domain.h"
#include "net/url_request/url_request_context_getter.h"
@@ -47,6 +47,7 @@
using content::BrowserThread;
using content::NavigationEntry;
+using content::WebContents;
namespace {
@@ -1036,11 +1037,11 @@
}
// The tab might have been closed.
- TabContents* tab_contents =
- tab_util::GetTabContentsByID(resource.render_process_host_id,
+ WebContents* web_contents =
+ tab_util::GetWebContentsByID(resource.render_process_host_id,
resource.render_view_id);
- if (!tab_contents) {
+ if (!web_contents) {
// The tab is gone and we did not have a chance at showing the interstitial.
// Just act as if "Don't Proceed" were chosen.
std::vector<UnsafeResource> resources;
@@ -1054,9 +1055,9 @@
if (resource.threat_type != SafeBrowsingService::SAFE &&
CanReportStats()) {
- GURL page_url = tab_contents->GetURL();
+ GURL page_url = web_contents->GetURL();
GURL referrer_url;
- NavigationEntry* entry = tab_contents->GetController().GetActiveEntry();
+ NavigationEntry* entry = web_contents->GetController().GetActiveEntry();
if (entry)
referrer_url = entry->GetReferrer().url;
« no previous file with comments | « chrome/browser/safe_browsing/malware_details_history.cc ('k') | chrome/browser/safe_browsing/safe_browsing_tab_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698