summaryrefslogtreecommitdiffstats
path: root/chrome/browser/safe_browsing/malware_details.h
diff options
context:
space:
mode:
authorsgurun@chromium.org <sgurun@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-27 08:22:40 +0000
committersgurun@chromium.org <sgurun@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-27 08:22:40 +0000
commit5006a4185d3a95976ced07022188f9abb48790be (patch)
tree629c6ae8f59886242d00b597d85ce6b8762918cd /chrome/browser/safe_browsing/malware_details.h
parent4537a72e8b1ebaec9bef09a8419f4d76d9d21a47 (diff)
downloadchromium_src-5006a4185d3a95976ced07022188f9abb48790be.zip
chromium_src-5006a4185d3a95976ced07022188f9abb48790be.tar.gz
chromium_src-5006a4185d3a95976ced07022188f9abb48790be.tar.bz2
Fix the reverted patch from CL 11366042 by addressing lifetimes/access to ui and database managers.
BUG=159136 Review URL: https://chromiumcodereview.appspot.com/11411105 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@169608 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/safe_browsing/malware_details.h')
-rw-r--r--chrome/browser/safe_browsing/malware_details.h24
1 files changed, 15 insertions, 9 deletions
diff --git a/chrome/browser/safe_browsing/malware_details.h b/chrome/browser/safe_browsing/malware_details.h
index 6ea1bf8..d285fdd 100644
--- a/chrome/browser/safe_browsing/malware_details.h
+++ b/chrome/browser/safe_browsing/malware_details.h
@@ -20,11 +20,15 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/safe_browsing/report.pb.h"
-#include "chrome/browser/safe_browsing/safe_browsing_service.h"
+#include "chrome/browser/safe_browsing/ui_manager.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/web_contents_observer.h"
#include "net/base/completion_callback.h"
+namespace net {
+class URLRequestContextGetter;
+}
+
class MalwareDetailsCacheCollector;
class MalwareDetailsRedirectsCollector;
class MalwareDetailsFactory;
@@ -41,11 +45,13 @@ typedef base::hash_map<
class MalwareDetails : public base::RefCountedThreadSafe<MalwareDetails>,
public content::WebContentsObserver {
public:
+ typedef SafeBrowsingUIManager::UnsafeResource UnsafeResource;
+
// Constructs a new MalwareDetails instance, using the factory.
static MalwareDetails* NewMalwareDetails(
- SafeBrowsingService* sb_service,
+ SafeBrowsingUIManager* ui_manager,
content::WebContents* web_contents,
- const SafeBrowsingService::UnsafeResource& resource);
+ const UnsafeResource& resource);
// Makes the passed |factory| the factory used to instanciate
// SafeBrowsingBlockingPage objects. Useful for tests.
@@ -70,9 +76,9 @@ class MalwareDetails : public base::RefCountedThreadSafe<MalwareDetails>,
protected:
friend class MalwareDetailsFactoryImpl;
- MalwareDetails(SafeBrowsingService* sb_service,
+ MalwareDetails(SafeBrowsingUIManager* ui_manager,
content::WebContents* web_contents,
- const SafeBrowsingService::UnsafeResource& resource);
+ const UnsafeResource& resource);
virtual ~MalwareDetails();
@@ -116,9 +122,9 @@ class MalwareDetails : public base::RefCountedThreadSafe<MalwareDetails>,
void AddRedirectUrlList(const std::vector<GURL>& urls);
- scoped_refptr<SafeBrowsingService> sb_service_;
+ scoped_refptr<SafeBrowsingUIManager> ui_manager_;
- const SafeBrowsingService::UnsafeResource resource_;
+ const UnsafeResource resource_;
// For every Url we collect we create a Resource message. We keep
// them in a map so we can avoid duplicates.
@@ -152,9 +158,9 @@ class MalwareDetailsFactory {
virtual ~MalwareDetailsFactory() { }
virtual MalwareDetails* CreateMalwareDetails(
- SafeBrowsingService* sb_service,
+ SafeBrowsingUIManager* ui_manager,
content::WebContents* web_contents,
- const SafeBrowsingService::UnsafeResource& unsafe_resource) = 0;
+ const SafeBrowsingUIManager::UnsafeResource& unsafe_resource) = 0;
};
#endif // CHROME_BROWSER_SAFE_BROWSING_MALWARE_DETAILS_H_