| OLD | NEW | 
|     1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |     1 // Copyright (c) 2012 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 "base/files/file_path.h" |     5 #include "base/files/file_path.h" | 
|     6 #include "base/memory/ref_counted.h" |     6 #include "base/memory/ref_counted.h" | 
|     7 #include "base/memory/scoped_ptr.h" |     7 #include "base/memory/scoped_ptr.h" | 
|     8 #include "base/run_loop.h" |     8 #include "base/run_loop.h" | 
|     9 #include "base/strings/stringprintf.h" |     9 #include "base/strings/stringprintf.h" | 
|    10 #include "base/synchronization/waitable_event.h" |    10 #include "base/synchronization/waitable_event.h" | 
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   238     // This needs to happen before we call the parent SetUp() function.  We use |   238     // This needs to happen before we call the parent SetUp() function.  We use | 
|   239     // a nice mock because other parts of the code are calling IsOffTheRecord. |   239     // a nice mock because other parts of the code are calling IsOffTheRecord. | 
|   240     mock_profile_ = new NiceMock<MockTestingProfile>(); |   240     mock_profile_ = new NiceMock<MockTestingProfile>(); | 
|   241     return mock_profile_; |   241     return mock_profile_; | 
|   242   } |   242   } | 
|   243  |   243  | 
|   244   void OnPhishingDetectionDone(const std::string& verdict_str) { |   244   void OnPhishingDetectionDone(const std::string& verdict_str) { | 
|   245     csd_host_->OnPhishingDetectionDone(verdict_str); |   245     csd_host_->OnPhishingDetectionDone(verdict_str); | 
|   246   } |   246   } | 
|   247  |   247  | 
|   248   void DidStopLoading() { |   248   void DidStopLoading() { csd_host_->DidStopLoading(); } | 
|   249     csd_host_->DidStopLoading(pending_rvh()); |  | 
|   250   } |  | 
|   251  |   249  | 
|   252   void UpdateIPUrlMap(const std::string& ip, const std::string& host) { |   250   void UpdateIPUrlMap(const std::string& ip, const std::string& host) { | 
|   253     csd_host_->UpdateIPUrlMap(ip, host, "", "", content::RESOURCE_TYPE_OBJECT); |   251     csd_host_->UpdateIPUrlMap(ip, host, "", "", content::RESOURCE_TYPE_OBJECT); | 
|   254   } |   252   } | 
|   255  |   253  | 
|   256   BrowseInfo* GetBrowseInfo() { |   254   BrowseInfo* GetBrowseInfo() { | 
|   257     return csd_host_->browse_info_.get(); |   255     return csd_host_->browse_info_.get(); | 
|   258   } |   256   } | 
|   259  |   257  | 
|   260   void ExpectPreClassificationChecks(const GURL& url, |   258   void ExpectPreClassificationChecks(const GURL& url, | 
| (...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1143   EXPECT_EQ(url, resource.url); |  1141   EXPECT_EQ(url, resource.url); | 
|  1144   EXPECT_EQ(url, resource.original_url); |  1142   EXPECT_EQ(url, resource.original_url); | 
|  1145  |  1143  | 
|  1146   ExpectStartPhishingDetection(NULL); |  1144   ExpectStartPhishingDetection(NULL); | 
|  1147  |  1145  | 
|  1148   // Showing a phishing warning will invalidate all the weak pointers which |  1146   // Showing a phishing warning will invalidate all the weak pointers which | 
|  1149   // means we will not extract malware features. |  1147   // means we will not extract malware features. | 
|  1150   ExpectShouldClassifyForMalwareResult(false); |  1148   ExpectShouldClassifyForMalwareResult(false); | 
|  1151 } |  1149 } | 
|  1152 }  // namespace safe_browsing |  1150 }  // namespace safe_browsing | 
| OLD | NEW |