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

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: Sync 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
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 void TabContents::AddObservers() { 406 void TabContents::AddObservers() {
406 printing_.reset(new printing::PrintViewManager(this)); 407 printing_.reset(new printing::PrintViewManager(this));
407 print_preview_.reset(new printing::PrintPreviewMessageHandler(this)); 408 print_preview_.reset(new printing::PrintPreviewMessageHandler(this));
408 fav_icon_helper_.reset(new FavIconHelper(this)); 409 fav_icon_helper_.reset(new FavIconHelper(this));
409 autofill_manager_.reset(new AutoFillManager(this)); 410 autofill_manager_.reset(new AutoFillManager(this));
410 autocomplete_history_manager_.reset(new AutocompleteHistoryManager(this)); 411 autocomplete_history_manager_.reset(new AutocompleteHistoryManager(this));
411 prerender_plt_recorder_.reset(new prerender::PrerenderPLTRecorder(this)); 412 prerender_plt_recorder_.reset(new prerender::PrerenderPLTRecorder(this));
412 desktop_notification_handler_.reset( 413 desktop_notification_handler_.reset(
413 new DesktopNotificationHandlerForTC(this, GetRenderProcessHost())); 414 new DesktopNotificationHandlerForTC(this, GetRenderProcessHost()));
414 plugin_observer_.reset(new PluginObserver(this)); 415 plugin_observer_.reset(new PluginObserver(this));
416 safebrowsing_detection_host_.reset(new safe_browsing::ClientSideDetectionHost(
417 this));
415 } 418 }
416 419
417 // static 420 // static
418 void TabContents::RegisterUserPrefs(PrefService* prefs) { 421 void TabContents::RegisterUserPrefs(PrefService* prefs) {
419 prefs->RegisterBooleanPref(prefs::kAlternateErrorPagesEnabled, true); 422 prefs->RegisterBooleanPref(prefs::kAlternateErrorPagesEnabled, true);
420 423
421 WebPreferences pref_defaults; 424 WebPreferences pref_defaults;
422 prefs->RegisterBooleanPref(prefs::kWebKitJavascriptEnabled, 425 prefs->RegisterBooleanPref(prefs::kWebKitJavascriptEnabled,
423 pref_defaults.javascript_enabled); 426 pref_defaults.javascript_enabled);
424 prefs->RegisterBooleanPref(prefs::kWebKitWebSecurityEnabled, 427 prefs->RegisterBooleanPref(prefs::kWebKitWebSecurityEnabled,
(...skipping 2525 matching lines...) Expand 10 before | Expand all | Expand 10 after
2950 } 2953 }
2951 2954
2952 bool TabContents::MaybeUsePreloadedPage(const GURL& url) { 2955 bool TabContents::MaybeUsePreloadedPage(const GURL& url) {
2953 prerender::PrerenderManager* pm = profile()->GetPrerenderManager(); 2956 prerender::PrerenderManager* pm = profile()->GetPrerenderManager();
2954 if (pm != NULL) { 2957 if (pm != NULL) {
2955 if (pm->MaybeUsePreloadedPage(this, url)) 2958 if (pm->MaybeUsePreloadedPage(this, url))
2956 return true; 2959 return true;
2957 } 2960 }
2958 return false; 2961 return false;
2959 } 2962 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698