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

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

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 years, 1 month 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/renderer_host/render_view_host.h" 14 #include "content/browser/renderer_host/render_view_host.h"
15 #include "content/browser/tab_contents/navigation_entry.h" 15 #include "content/browser/tab_contents/navigation_entry.h"
16 #include "content/browser/tab_contents/tab_contents.h" 16 #include "content/browser/tab_contents/tab_contents.h"
17 #include "content/public/browser/browser_thread.h" 17 #include "content/public/browser/browser_thread.h"
18 #include "content/public/browser/notification_details.h" 18 #include "content/public/browser/notification_details.h"
19 #include "content/public/browser/notification_source.h" 19 #include "content/public/browser/notification_source.h"
20 20
21 using content::BrowserThread;
22
21 MalwareDetailsRedirectsCollector::MalwareDetailsRedirectsCollector( 23 MalwareDetailsRedirectsCollector::MalwareDetailsRedirectsCollector(
22 Profile* profile) 24 Profile* profile)
23 : profile_(profile), 25 : profile_(profile),
24 has_started_(false) { 26 has_started_(false) {
25 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 27 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
26 if (profile) { 28 if (profile) {
27 registrar_.Add(this, chrome::NOTIFICATION_PROFILE_DESTROYED, 29 registrar_.Add(this, chrome::NOTIFICATION_PROFILE_DESTROYED,
28 content::Source<Profile>(profile)); 30 content::Source<Profile>(profile));
29 } 31 }
30 } 32 }
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 127
126 void MalwareDetailsRedirectsCollector::Observe( 128 void MalwareDetailsRedirectsCollector::Observe(
127 int type, 129 int type,
128 const content::NotificationSource& source, 130 const content::NotificationSource& source,
129 const content::NotificationDetails& details) { 131 const content::NotificationDetails& details) {
130 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 132 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
131 DCHECK_EQ(type, chrome::NOTIFICATION_PROFILE_DESTROYED); 133 DCHECK_EQ(type, chrome::NOTIFICATION_PROFILE_DESTROYED);
132 DVLOG(1) << "Profile gone."; 134 DVLOG(1) << "Profile gone.";
133 profile_ = NULL; 135 profile_ = NULL;
134 } 136 }
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/malware_details_history.h ('k') | chrome/browser/safe_browsing/malware_details_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698