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

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

Issue 8342048: Make NotificationService an interface in the content namespace, and switch callers to use it. Mov... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 // Implementation of the MalwareDetailsRedirectsCollector class. 5 // Implementation of the MalwareDetailsRedirectsCollector class.
6 6
7 #include "chrome/browser/safe_browsing/malware_details_history.h" 7 #include "chrome/browser/safe_browsing/malware_details_history.h"
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
11 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/browser/safe_browsing/malware_details.h" 12 #include "chrome/browser/safe_browsing/malware_details.h"
13 #include "chrome/common/chrome_notification_types.h" 13 #include "chrome/common/chrome_notification_types.h"
14 #include "content/browser/browser_thread.h" 14 #include "content/browser/browser_thread.h"
15 #include "content/browser/renderer_host/render_view_host.h" 15 #include "content/browser/renderer_host/render_view_host.h"
16 #include "content/browser/tab_contents/navigation_entry.h" 16 #include "content/browser/tab_contents/navigation_entry.h"
17 #include "content/browser/tab_contents/tab_contents.h" 17 #include "content/browser/tab_contents/tab_contents.h"
18 #include "content/common/notification_service.h"
19 #include "content/public/browser/notification_details.h" 18 #include "content/public/browser/notification_details.h"
20 #include "content/public/browser/notification_source.h" 19 #include "content/public/browser/notification_source.h"
21 20
22 MalwareDetailsRedirectsCollector::MalwareDetailsRedirectsCollector( 21 MalwareDetailsRedirectsCollector::MalwareDetailsRedirectsCollector(
23 Profile* profile) 22 Profile* profile)
24 : profile_(profile), 23 : profile_(profile),
25 has_started_(false) { 24 has_started_(false) {
26 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 25 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
27 if (profile) { 26 if (profile) {
28 registrar_.Add(this, chrome::NOTIFICATION_PROFILE_DESTROYED, 27 registrar_.Add(this, chrome::NOTIFICATION_PROFILE_DESTROYED,
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 125
127 void MalwareDetailsRedirectsCollector::Observe( 126 void MalwareDetailsRedirectsCollector::Observe(
128 int type, 127 int type,
129 const content::NotificationSource& source, 128 const content::NotificationSource& source,
130 const content::NotificationDetails& details) { 129 const content::NotificationDetails& details) {
131 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 130 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
132 DCHECK_EQ(type, chrome::NOTIFICATION_PROFILE_DESTROYED); 131 DCHECK_EQ(type, chrome::NOTIFICATION_PROFILE_DESTROYED);
133 DVLOG(1) << "Profile gone."; 132 DVLOG(1) << "Profile gone.";
134 profile_ = NULL; 133 profile_ = NULL;
135 } 134 }
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/client_side_detection_service.cc ('k') | chrome/browser/safe_browsing/safe_browsing_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698