Index: chrome/browser/safe_browsing/client_side_detection_host_unittest.cc |
diff --git a/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc b/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc |
index 3a696b547cb434d54c7c4c7e3b7a3892ef167d2c..432aea57e6e974b0c59d7cfbf9a2553c14de3318 100644 |
--- a/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc |
+++ b/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc |
@@ -180,12 +180,6 @@ class ClientSideDetectionHostTest : public ChromeRenderViewHostTestHarness { |
typedef SafeBrowsingUIManager::UnsafeResource UnsafeResource; |
virtual void SetUp() { |
- // Set custom profile object so that we can mock calls to IsOffTheRecord. |
- // This needs to happen before we call the parent SetUp() function. We use |
- // a nice mock because other parts of the code are calling IsOffTheRecord. |
- mock_profile_ = new NiceMock<MockTestingProfile>(); |
- browser_context_.reset(mock_profile_); |
- |
ChromeRenderViewHostTestHarness::SetUp(); |
// Inject service classes. |
@@ -221,6 +215,14 @@ class ClientSideDetectionHostTest : public ChromeRenderViewHostTestHarness { |
ChromeRenderViewHostTestHarness::TearDown(); |
} |
+ virtual content::BrowserContext* CreateBrowserContext() OVERRIDE { |
+ // Set custom profile object so that we can mock calls to IsOffTheRecord. |
+ // This needs to happen before we call the parent SetUp() function. We use |
+ // a nice mock because other parts of the code are calling IsOffTheRecord. |
+ mock_profile_ = new NiceMock<MockTestingProfile>(); |
+ return mock_profile_; |
+ } |
+ |
void OnPhishingDetectionDone(const std::string& verdict_str) { |
csd_host_->OnPhishingDetectionDone(verdict_str); |
} |