| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/privacy_blacklist/blacklist_ui.h" | 5 #include "chrome/browser/privacy_blacklist/blacklist_ui.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
| 9 #include "base/string16.h" | 9 #include "base/string16.h" |
| 10 #include "chrome/browser/blocked_popup_container.h" | 10 #include "chrome/browser/blocked_popup_container.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 65 |
| 66 // static | 66 // static |
| 67 void BlacklistUI::OnNonvisualContentBlocked(const URLRequest* request) { | 67 void BlacklistUI::OnNonvisualContentBlocked(const URLRequest* request) { |
| 68 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO)); | 68 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO)); |
| 69 | 69 |
| 70 BlacklistRequestInfo* request_info = | 70 BlacklistRequestInfo* request_info = |
| 71 BlacklistRequestInfo::FromURLRequest(request); | 71 BlacklistRequestInfo::FromURLRequest(request); |
| 72 const BlacklistManager* blacklist_manager = | 72 const BlacklistManager* blacklist_manager = |
| 73 request_info->GetBlacklistManager(); | 73 request_info->GetBlacklistManager(); |
| 74 const Blacklist* blacklist = blacklist_manager->GetCompiledBlacklist(); | 74 const Blacklist* blacklist = blacklist_manager->GetCompiledBlacklist(); |
| 75 scoped_ptr<Blacklist::Match> match(blacklist->findMatch(request->url())); | 75 scoped_ptr<Blacklist::Match> match(blacklist->FindMatch(request->url())); |
| 76 const ResourceDispatcherHostRequestInfo* info = | 76 const ResourceDispatcherHostRequestInfo* info = |
| 77 ResourceDispatcherHost::InfoForRequest(request); | 77 ResourceDispatcherHost::InfoForRequest(request); |
| 78 | 78 |
| 79 // Notify the UI that something non-visual has been blocked. | 79 // Notify the UI that something non-visual has been blocked. |
| 80 ChromeThread::PostTask( | 80 ChromeThread::PostTask( |
| 81 ChromeThread::UI, FROM_HERE, | 81 ChromeThread::UI, FROM_HERE, |
| 82 new DisplayBlockedContentNoticeTask(request->url(), match.get(), info)); | 82 new DisplayBlockedContentNoticeTask(request->url(), match.get(), info)); |
| 83 } | 83 } |
| OLD | NEW |