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

Side by Side Diff: chrome/browser/tab_contents/tab_contents.cc

Issue 6014003: Intergration of the client-side phishing detection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Dont DCHECK because some unit tests are failing. Created 9 years, 10 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 | Annotate | Revision Log
OLDNEW
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/tab_contents/tab_contents.h" 5 #include "chrome/browser/tab_contents/tab_contents.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 #include "chrome/browser/printing/print_preview_tab_controller.h" 57 #include "chrome/browser/printing/print_preview_tab_controller.h"
58 #include "chrome/browser/printing/print_view_manager.h" 58 #include "chrome/browser/printing/print_view_manager.h"
59 #include "chrome/browser/profiles/profile.h" 59 #include "chrome/browser/profiles/profile.h"
60 #include "chrome/browser/renderer_host/render_process_host.h" 60 #include "chrome/browser/renderer_host/render_process_host.h"
61 #include "chrome/browser/renderer_host/render_view_host.h" 61 #include "chrome/browser/renderer_host/render_view_host.h"
62 #include "chrome/browser/renderer_host/render_widget_host_view.h" 62 #include "chrome/browser/renderer_host/render_widget_host_view.h"
63 #include "chrome/browser/renderer_host/resource_request_details.h" 63 #include "chrome/browser/renderer_host/resource_request_details.h"
64 #include "chrome/browser/renderer_host/site_instance.h" 64 #include "chrome/browser/renderer_host/site_instance.h"
65 #include "chrome/browser/renderer_host/web_cache_manager.h" 65 #include "chrome/browser/renderer_host/web_cache_manager.h"
66 #include "chrome/browser/renderer_preferences_util.h" 66 #include "chrome/browser/renderer_preferences_util.h"
67 #include "chrome/browser/safe_browsing/client_side_detection_host.h"
67 #include "chrome/browser/search_engines/template_url.h" 68 #include "chrome/browser/search_engines/template_url.h"
68 #include "chrome/browser/search_engines/template_url_fetcher.h" 69 #include "chrome/browser/search_engines/template_url_fetcher.h"
69 #include "chrome/browser/search_engines/template_url_fetcher_ui_callbacks.h" 70 #include "chrome/browser/search_engines/template_url_fetcher_ui_callbacks.h"
70 #include "chrome/browser/search_engines/template_url_model.h" 71 #include "chrome/browser/search_engines/template_url_model.h"
71 #include "chrome/browser/sessions/session_types.h" 72 #include "chrome/browser/sessions/session_types.h"
72 #include "chrome/browser/tab_contents/infobar_delegate.h" 73 #include "chrome/browser/tab_contents/infobar_delegate.h"
73 #include "chrome/browser/tab_contents/interstitial_page.h" 74 #include "chrome/browser/tab_contents/interstitial_page.h"
74 #include "chrome/browser/tab_contents/navigation_entry.h" 75 #include "chrome/browser/tab_contents/navigation_entry.h"
75 #include "chrome/browser/tab_contents/provisional_load_details.h" 76 #include "chrome/browser/tab_contents/provisional_load_details.h"
76 #include "chrome/browser/tab_contents/tab_contents_delegate.h" 77 #include "chrome/browser/tab_contents/tab_contents_delegate.h"
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 prerender_plt_recorder_.reset(new PrerenderPLTRecorder(this)); 372 prerender_plt_recorder_.reset(new PrerenderPLTRecorder(this));
372 AddObserver(prerender_plt_recorder_.get()); 373 AddObserver(prerender_plt_recorder_.get());
373 AddObserver(&fav_icon_helper_); 374 AddObserver(&fav_icon_helper_);
374 AddObserver(printing_.get()); 375 AddObserver(printing_.get());
375 desktop_notification_handler_.reset( 376 desktop_notification_handler_.reset(
376 new DesktopNotificationHandler(this, GetRenderProcessHost())); 377 new DesktopNotificationHandler(this, GetRenderProcessHost()));
377 AddObserver(desktop_notification_handler_.get()); 378 AddObserver(desktop_notification_handler_.get());
378 plugin_observer_.reset(new PluginObserver(this)); 379 plugin_observer_.reset(new PluginObserver(this));
379 AddObserver(plugin_observer_.get()); 380 AddObserver(plugin_observer_.get());
380 AddObserver(print_preview_.get()); 381 AddObserver(print_preview_.get());
382 safebrowsing_detection_host_.reset(new safe_browsing::ClientSideDetectionHost(
383 this));
384 AddObserver(safebrowsing_detection_host_.get());
381 } 385 }
382 386
383 TabContents::~TabContents() { 387 TabContents::~TabContents() {
384 is_being_destroyed_ = true; 388 is_being_destroyed_ = true;
385 389
386 // We don't want any notifications while we're running our destructor. 390 // We don't want any notifications while we're running our destructor.
387 registrar_.RemoveAll(); 391 registrar_.RemoveAll();
388 pref_change_registrar_.RemoveAll(); 392 pref_change_registrar_.RemoveAll();
389 393
390 NotifyDisconnected(); 394 NotifyDisconnected();
(...skipping 2742 matching lines...) Expand 10 before | Expand all | Expand 10 after
3133 } 3137 }
3134 3138
3135 bool TabContents::MaybeUsePreloadedPage(const GURL& url) { 3139 bool TabContents::MaybeUsePreloadedPage(const GURL& url) {
3136 PrerenderManager* pm = profile()->GetPrerenderManager(); 3140 PrerenderManager* pm = profile()->GetPrerenderManager();
3137 if (pm != NULL) { 3141 if (pm != NULL) {
3138 if (pm->MaybeUsePreloadedPage(this, url)) 3142 if (pm->MaybeUsePreloadedPage(this, url))
3139 return true; 3143 return true;
3140 } 3144 }
3141 return false; 3145 return false;
3142 } 3146 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698