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

Side by Side Diff: chrome/browser/safe_browsing/client_side_detection_host.cc

Issue 6721021: Move a bunch of renderer->browser messages to content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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/safe_browsing/client_side_detection_host.h" 5 #include "chrome/browser/safe_browsing/client_side_detection_host.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/metrics/histogram.h" 11 #include "base/metrics/histogram.h"
12 #include "base/ref_counted.h" 12 #include "base/ref_counted.h"
13 #include "base/task.h" 13 #include "base/task.h"
14 #include "chrome/browser/browser_process.h" 14 #include "chrome/browser/browser_process.h"
15 #include "chrome/browser/safe_browsing/client_side_detection_service.h" 15 #include "chrome/browser/safe_browsing/client_side_detection_service.h"
16 #include "chrome/browser/safe_browsing/safe_browsing_service.h" 16 #include "chrome/browser/safe_browsing/safe_browsing_service.h"
17 #include "chrome/common/chrome_switches.h" 17 #include "chrome/common/chrome_switches.h"
18 #include "chrome/common/render_messages.h" 18 #include "chrome/common/render_messages.h"
19 #include "chrome/common/render_messages_params.h"
20 #include "chrome/common/safebrowsing_messages.h" 19 #include "chrome/common/safebrowsing_messages.h"
21 #include "content/browser/browser_thread.h" 20 #include "content/browser/browser_thread.h"
22 #include "content/browser/renderer_host/render_process_host.h" 21 #include "content/browser/renderer_host/render_process_host.h"
23 #include "content/browser/renderer_host/render_view_host.h" 22 #include "content/browser/renderer_host/render_view_host.h"
24 #include "content/browser/renderer_host/resource_dispatcher_host.h" 23 #include "content/browser/renderer_host/resource_dispatcher_host.h"
25 #include "content/browser/tab_contents/navigation_controller.h" 24 #include "content/browser/tab_contents/navigation_controller.h"
26 #include "content/browser/tab_contents/tab_contents.h" 25 #include "content/browser/tab_contents/tab_contents.h"
27 #include "content/common/notification_service.h" 26 #include "content/common/notification_service.h"
28 #include "content/common/notification_type.h" 27 #include "content/common/notification_type.h"
28 #include "content/common/view_messages.h"
29 #include "googleurl/src/gurl.h" 29 #include "googleurl/src/gurl.h"
30 30
31 namespace safe_browsing { 31 namespace safe_browsing {
32 32
33 // This class is instantiated each time a new toplevel URL loads, and 33 // This class is instantiated each time a new toplevel URL loads, and
34 // asynchronously checks whether the phishing classifier should run for this 34 // asynchronously checks whether the phishing classifier should run for this
35 // URL. If so, it notifies the renderer with a StartPhishingDetection IPC. 35 // URL. If so, it notifies the renderer with a StartPhishingDetection IPC.
36 // Objects of this class are ref-counted and will be destroyed once nobody 36 // Objects of this class are ref-counted and will be destroyed once nobody
37 // uses it anymore. If |tab_contents|, |csd_service| or |host| go away you need 37 // uses it anymore. If |tab_contents|, |csd_service| or |host| go away you need
38 // to call Cancel(). We keep the |sb_service| alive in a ref pointer for as 38 // to call Cancel(). We keep the |sb_service| alive in a ref pointer for as
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 ClientSideDetectionService* service) { 331 ClientSideDetectionService* service) {
332 csd_service_ = service; 332 csd_service_ = service;
333 } 333 }
334 334
335 void ClientSideDetectionHost::set_safe_browsing_service( 335 void ClientSideDetectionHost::set_safe_browsing_service(
336 SafeBrowsingService* service) { 336 SafeBrowsingService* service) {
337 sb_service_ = service; 337 sb_service_ = service;
338 } 338 }
339 339
340 } // namespace safe_browsing 340 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698