| Index: chrome/browser/safe_browsing/malware_details.h
|
| ===================================================================
|
| --- chrome/browser/safe_browsing/malware_details.h (revision 84048)
|
| +++ chrome/browser/safe_browsing/malware_details.h (working copy)
|
| @@ -21,6 +21,7 @@
|
| #include "base/memory/scoped_ptr.h"
|
| #include "chrome/browser/safe_browsing/report.pb.h"
|
| #include "chrome/browser/safe_browsing/safe_browsing_service.h"
|
| +#include "content/browser/browser_thread.h"
|
| #include "content/browser/tab_contents/tab_contents_observer.h"
|
| #include "net/base/completion_callback.h"
|
|
|
| @@ -28,6 +29,7 @@
|
| struct SafeBrowsingHostMsg_MalwareDOMDetails_Node;
|
|
|
| class MalwareDetailsCacheCollector;
|
| +class MalwareDetailsRedirectsCollector;
|
| class MalwareDetailsFactory;
|
|
|
| namespace safe_browsing {
|
| @@ -54,12 +56,15 @@
|
|
|
| // The SafeBrowsingBlockingPage calls this from the IO thread when
|
| // the user is leaving the blocking page and has opted-in to sending
|
| - // the report. We start the cache collection, and when we are done,
|
| - // we send the report.
|
| + // the report. We start the redirection urls collection from history service
|
| + // in UI thread; then do cache collection back in IO thread.
|
| + // When we are done, we send the report.
|
| void FinishCollection();
|
|
|
| void OnCacheCollectionReady();
|
|
|
| + void OnRedirectionCollectionReady();
|
| +
|
| // TabContentsObserver implementation.
|
| virtual bool OnMessageReceived(const IPC::Message& message);
|
|
|
| @@ -108,6 +113,8 @@
|
| void OnReceivedMalwareDOMDetails(
|
| const std::vector<SafeBrowsingHostMsg_MalwareDOMDetails_Node>& params);
|
|
|
| + void AddRedirectUrlList(const std::vector<GURL>& urls);
|
| +
|
| scoped_refptr<SafeBrowsingService> sb_service_;
|
|
|
| const SafeBrowsingService::UnsafeResource resource_;
|
| @@ -127,9 +134,13 @@
|
| // Used to collect details from the HTTP Cache.
|
| scoped_refptr<MalwareDetailsCacheCollector> cache_collector_;
|
|
|
| + // Used to collect redirect urls from the history service
|
| + scoped_refptr<MalwareDetailsRedirectsCollector> redirects_collector_;
|
| +
|
| FRIEND_TEST_ALL_PREFIXES(MalwareDetailsTest, MalwareDOMDetails);
|
| FRIEND_TEST_ALL_PREFIXES(MalwareDetailsTest, HTTPCache);
|
| FRIEND_TEST_ALL_PREFIXES(MalwareDetailsTest, HTTPCacheNoEntries);
|
| + FRIEND_TEST_ALL_PREFIXES(MalwareDetailsTest, HistoryServiceUrls);
|
|
|
| DISALLOW_COPY_AND_ASSIGN(MalwareDetails);
|
| };
|
|
|