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

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: Remove comment 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/sessions/session_types.h" 68 #include "chrome/browser/sessions/session_types.h"
68 #include "chrome/browser/tab_contents/infobar_delegate.h" 69 #include "chrome/browser/tab_contents/infobar_delegate.h"
69 #include "chrome/browser/tab_contents/interstitial_page.h" 70 #include "chrome/browser/tab_contents/interstitial_page.h"
70 #include "chrome/browser/tab_contents/navigation_entry.h" 71 #include "chrome/browser/tab_contents/navigation_entry.h"
71 #include "chrome/browser/tab_contents/provisional_load_details.h" 72 #include "chrome/browser/tab_contents/provisional_load_details.h"
72 #include "chrome/browser/tab_contents/tab_contents_delegate.h" 73 #include "chrome/browser/tab_contents/tab_contents_delegate.h"
73 #include "chrome/browser/tab_contents/tab_contents_observer.h" 74 #include "chrome/browser/tab_contents/tab_contents_observer.h"
74 #include "chrome/browser/tab_contents/tab_contents_ssl_helper.h" 75 #include "chrome/browser/tab_contents/tab_contents_ssl_helper.h"
75 #include "chrome/browser/tab_contents/tab_contents_view.h" 76 #include "chrome/browser/tab_contents/tab_contents_view.h"
76 #include "chrome/browser/tab_contents/thumbnail_generator.h" 77 #include "chrome/browser/tab_contents/thumbnail_generator.h"
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 prerender_plt_recorder_.reset(new prerender::PrerenderPLTRecorder(this)); 362 prerender_plt_recorder_.reset(new prerender::PrerenderPLTRecorder(this));
362 AddObserver(prerender_plt_recorder_.get()); 363 AddObserver(prerender_plt_recorder_.get());
363 AddObserver(&fav_icon_helper_); 364 AddObserver(&fav_icon_helper_);
364 AddObserver(printing_.get()); 365 AddObserver(printing_.get());
365 desktop_notification_handler_.reset( 366 desktop_notification_handler_.reset(
366 new DesktopNotificationHandler(this, GetRenderProcessHost())); 367 new DesktopNotificationHandler(this, GetRenderProcessHost()));
367 AddObserver(desktop_notification_handler_.get()); 368 AddObserver(desktop_notification_handler_.get());
368 plugin_observer_.reset(new PluginObserver(this)); 369 plugin_observer_.reset(new PluginObserver(this));
369 AddObserver(plugin_observer_.get()); 370 AddObserver(plugin_observer_.get());
370 AddObserver(print_preview_.get()); 371 AddObserver(print_preview_.get());
372 safebrowsing_detection_host_.reset(new safe_browsing::ClientSideDetectionHost(
373 this));
374 AddObserver(safebrowsing_detection_host_.get());
371 } 375 }
372 376
373 TabContents::~TabContents() { 377 TabContents::~TabContents() {
374 is_being_destroyed_ = true; 378 is_being_destroyed_ = true;
375 379
376 // We don't want any notifications while we're running our destructor. 380 // We don't want any notifications while we're running our destructor.
377 registrar_.RemoveAll(); 381 registrar_.RemoveAll();
378 pref_change_registrar_.RemoveAll(); 382 pref_change_registrar_.RemoveAll();
379 383
380 NotifyDisconnected(); 384 NotifyDisconnected();
(...skipping 2587 matching lines...) Expand 10 before | Expand all | Expand 10 after
2968 } 2972 }
2969 2973
2970 bool TabContents::MaybeUsePreloadedPage(const GURL& url) { 2974 bool TabContents::MaybeUsePreloadedPage(const GURL& url) {
2971 prerender::PrerenderManager* pm = profile()->GetPrerenderManager(); 2975 prerender::PrerenderManager* pm = profile()->GetPrerenderManager();
2972 if (pm != NULL) { 2976 if (pm != NULL) {
2973 if (pm->MaybeUsePreloadedPage(this, url)) 2977 if (pm->MaybeUsePreloadedPage(this, url))
2974 return true; 2978 return true;
2975 } 2979 }
2976 return false; 2980 return false;
2977 } 2981 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698