Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc

Issue 14999008: Add a killswitch for CSD malware IP match and report feature. Use a new killswitch whitelist URL wh… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix the bug of 'and' -> && Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_database_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 const std::vector<SBChunkDelete>& chunk_deletes) OVERRIDE { 136 const std::vector<SBChunkDelete>& chunk_deletes) OVERRIDE {
137 ADD_FAILURE() << "Not implemented."; 137 ADD_FAILURE() << "Not implemented.";
138 } 138 }
139 virtual void UpdateFinished(bool update_succeeded) OVERRIDE { 139 virtual void UpdateFinished(bool update_succeeded) OVERRIDE {
140 ADD_FAILURE() << "Not implemented."; 140 ADD_FAILURE() << "Not implemented.";
141 } 141 }
142 virtual void CacheHashResults(const std::vector<SBPrefix>& prefixes, 142 virtual void CacheHashResults(const std::vector<SBPrefix>& prefixes,
143 const std::vector<SBFullHashResult>& full_hits) OVERRIDE { 143 const std::vector<SBFullHashResult>& full_hits) OVERRIDE {
144 // Do nothing for the cache. 144 // Do nothing for the cache.
145 } 145 }
146 virtual bool MalwareIPMatchKillSwitchOn() OVERRIDE {
147 return false;
148 }
146 149
147 // Fill up the database with test URL. 150 // Fill up the database with test URL.
148 void AddUrl(const GURL& url, 151 void AddUrl(const GURL& url,
149 const std::string& list_name, 152 const std::string& list_name,
150 const std::vector<SBPrefix>& prefix_hits, 153 const std::vector<SBPrefix>& prefix_hits,
151 const std::vector<SBFullHashResult>& full_hits) { 154 const std::vector<SBFullHashResult>& full_hits) {
152 badurls_[url.spec()].list_name = list_name; 155 badurls_[url.spec()].list_name = list_name;
153 badurls_[url.spec()].prefix_hits = prefix_hits; 156 badurls_[url.spec()].prefix_hits = prefix_hits;
154 badurls_[url.spec()].full_hits = full_hits; 157 badurls_[url.spec()].full_hits = full_hits;
155 } 158 }
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after
985 TestSBUpdateCookies) { 988 TestSBUpdateCookies) {
986 content::WindowedNotificationObserver observer( 989 content::WindowedNotificationObserver observer(
987 chrome::NOTIFICATION_SAFE_BROWSING_UPDATE_COMPLETE, 990 chrome::NOTIFICATION_SAFE_BROWSING_UPDATE_COMPLETE,
988 content::Source<SafeBrowsingDatabaseManager>( 991 content::Source<SafeBrowsingDatabaseManager>(
989 sb_service_->database_manager())); 992 sb_service_->database_manager()));
990 BrowserThread::PostTask( 993 BrowserThread::PostTask(
991 BrowserThread::IO, FROM_HERE, 994 BrowserThread::IO, FROM_HERE,
992 base::Bind(&SafeBrowsingDatabaseManagerCookieTest::ForceUpdate, this)); 995 base::Bind(&SafeBrowsingDatabaseManagerCookieTest::ForceUpdate, this));
993 observer.Wait(); 996 observer.Wait();
994 } 997 }
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_database_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698