| 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 // This test creates a safebrowsing service using test safebrowsing database | 5 // This test creates a safebrowsing service using test safebrowsing database |
| 6 // and a test protocol manager. It is used to test logics in safebrowsing | 6 // and a test protocol manager. It is used to test logics in safebrowsing |
| 7 // service. | 7 // service. |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 if (!found) | 153 if (!found) |
| 154 return false; | 154 return false; |
| 155 DCHECK_LE(1U, prefix_hits->size()); | 155 DCHECK_LE(1U, prefix_hits->size()); |
| 156 return true; | 156 return true; |
| 157 } | 157 } |
| 158 bool ContainsCsdWhitelistedUrl(const GURL& url) override { return true; } | 158 bool ContainsCsdWhitelistedUrl(const GURL& url) override { return true; } |
| 159 bool ContainsDownloadWhitelistedString(const std::string& str) override { | 159 bool ContainsDownloadWhitelistedString(const std::string& str) override { |
| 160 return true; | 160 return true; |
| 161 } | 161 } |
| 162 bool ContainsDownloadWhitelistedUrl(const GURL& url) override { return true; } | 162 bool ContainsDownloadWhitelistedUrl(const GURL& url) override { return true; } |
| 163 bool ContainsInclusionWhitelistedUrl(const GURL& url) override { |
| 164 return true; |
| 165 } |
| 163 bool ContainsExtensionPrefixes(const std::vector<SBPrefix>& prefixes, | 166 bool ContainsExtensionPrefixes(const std::vector<SBPrefix>& prefixes, |
| 164 std::vector<SBPrefix>* prefix_hits) override { | 167 std::vector<SBPrefix>* prefix_hits) override { |
| 165 return true; | 168 return true; |
| 166 } | 169 } |
| 167 bool ContainsSideEffectFreeWhitelistUrl(const GURL& url) override { | 170 bool ContainsSideEffectFreeWhitelistUrl(const GURL& url) override { |
| 168 return true; | 171 return true; |
| 169 } | 172 } |
| 170 bool ContainsMalwareIP(const std::string& ip_address) override { | 173 bool ContainsMalwareIP(const std::string& ip_address) override { |
| 171 return true; | 174 return true; |
| 172 } | 175 } |
| (...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1233 content::WindowedNotificationObserver observer( | 1236 content::WindowedNotificationObserver observer( |
| 1234 chrome::NOTIFICATION_SAFE_BROWSING_UPDATE_COMPLETE, | 1237 chrome::NOTIFICATION_SAFE_BROWSING_UPDATE_COMPLETE, |
| 1235 content::Source<SafeBrowsingDatabaseManager>( | 1238 content::Source<SafeBrowsingDatabaseManager>( |
| 1236 sb_service_->database_manager().get())); | 1239 sb_service_->database_manager().get())); |
| 1237 BrowserThread::PostTask( | 1240 BrowserThread::PostTask( |
| 1238 BrowserThread::IO, | 1241 BrowserThread::IO, |
| 1239 FROM_HERE, | 1242 FROM_HERE, |
| 1240 base::Bind(&SafeBrowsingDatabaseManagerCookieTest::ForceUpdate, this)); | 1243 base::Bind(&SafeBrowsingDatabaseManagerCookieTest::ForceUpdate, this)); |
| 1241 observer.Wait(); | 1244 observer.Wait(); |
| 1242 } | 1245 } |
| OLD | NEW |