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

Side by Side Diff: components/safe_browsing_db/v4_local_database_manager.cc

Issue 2645283007: Add the client for accessing Subresource Filter only list. (Closed)
Patch Set: feature Created 3 years, 8 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 file should not be build on Android but is currently getting built. 5 // This file should not be build on Android but is currently getting built.
6 // TODO(vakh): Fix that: http://crbug.com/621647 6 // TODO(vakh): Fix that: http://crbug.com/621647
7 7
8 #include "components/safe_browsing_db/v4_local_database_manager.h" 8 #include "components/safe_browsing_db/v4_local_database_manager.h"
9 9
10 #include <vector> 10 #include <vector>
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 ThreatSeverity GetThreatSeverity(const ListIdentifier& list_id) { 87 ThreatSeverity GetThreatSeverity(const ListIdentifier& list_id) {
88 switch (list_id.threat_type()) { 88 switch (list_id.threat_type()) {
89 case MALWARE_THREAT: 89 case MALWARE_THREAT:
90 case SOCIAL_ENGINEERING_PUBLIC: 90 case SOCIAL_ENGINEERING_PUBLIC:
91 case MALICIOUS_BINARY: 91 case MALICIOUS_BINARY:
92 return 0; 92 return 0;
93 case UNWANTED_SOFTWARE: 93 case UNWANTED_SOFTWARE:
94 return 1; 94 return 1;
95 case API_ABUSE: 95 case API_ABUSE:
96 case CLIENT_INCIDENT: 96 case CLIENT_INCIDENT:
97 case SUBRESOURCE_FILTER:
97 return 2; 98 return 2;
98 default: 99 default:
99 NOTREACHED() << "Unexpected ThreatType encountered: " 100 NOTREACHED() << "Unexpected ThreatType encountered: "
100 << list_id.threat_type(); 101 << list_id.threat_type();
101 return kLeastSeverity; 102 return kLeastSeverity;
102 } 103 }
103 } 104 }
104 105
105 } // namespace 106 } // namespace
106 107
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 db_updated_callback_); 757 db_updated_callback_);
757 } 758 }
758 759
759 bool V4LocalDatabaseManager::AreStoresAvailableNow( 760 bool V4LocalDatabaseManager::AreStoresAvailableNow(
760 const StoresToCheck& stores_to_check) const { 761 const StoresToCheck& stores_to_check) const {
761 return enabled_ && v4_database_ && 762 return enabled_ && v4_database_ &&
762 v4_database_->AreStoresAvailable(stores_to_check); 763 v4_database_->AreStoresAvailable(stores_to_check);
763 } 764 }
764 765
765 } // namespace safe_browsing 766 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « components/safe_browsing_db/v4_database.h ('k') | components/subresource_filter/content/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698