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

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

Issue 2681023004: Add a comment: Any new lists must already be supported by the SB server (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | 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 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 SB_THREAT_TYPE_BINARY_MALWARE_URL), 69 SB_THREAT_TYPE_BINARY_MALWARE_URL),
70 ListInfo(kSyncAlways, "ChromeExtMalware.store", GetChromeExtMalwareId(), 70 ListInfo(kSyncAlways, "ChromeExtMalware.store", GetChromeExtMalwareId(),
71 SB_THREAT_TYPE_EXTENSION), 71 SB_THREAT_TYPE_EXTENSION),
72 ListInfo(kSyncOnlyOnChromeBuilds, "ChromeUrlClientIncident.store", 72 ListInfo(kSyncOnlyOnChromeBuilds, "ChromeUrlClientIncident.store",
73 GetChromeUrlClientIncidentId(), 73 GetChromeUrlClientIncidentId(),
74 SB_THREAT_TYPE_BLACKLISTED_RESOURCE), 74 SB_THREAT_TYPE_BLACKLISTED_RESOURCE),
75 ListInfo(kSyncNever, "", GetChromeUrlApiId(), SB_THREAT_TYPE_API_ABUSE), 75 ListInfo(kSyncNever, "", GetChromeUrlApiId(), SB_THREAT_TYPE_API_ABUSE),
76 ListInfo(kSyncOnlyOnChromeBuilds, "UrlSubresourceFilter.store", 76 ListInfo(kSyncOnlyOnChromeBuilds, "UrlSubresourceFilter.store",
77 GetUrlSubresourceFilterId(), SB_THREAT_TYPE_SUBRESOURCE_FILTER), 77 GetUrlSubresourceFilterId(), SB_THREAT_TYPE_SUBRESOURCE_FILTER),
78 }); 78 });
79 // NOTE(vakh): IMPORTANT: Please make sure that the server already supports
80 // any list before adding it to this list otherwise the prefix updates break
81 // for all Canary users.
79 } 82 }
80 83
81 // Returns the severity information about a given SafeBrowsing list. The lowest 84 // Returns the severity information about a given SafeBrowsing list. The lowest
82 // value is 0, which represents the most severe list. 85 // value is 0, which represents the most severe list.
83 ThreatSeverity GetThreatSeverity(const ListIdentifier& list_id) { 86 ThreatSeverity GetThreatSeverity(const ListIdentifier& list_id) {
84 switch (list_id.threat_type()) { 87 switch (list_id.threat_type()) {
85 case MALWARE_THREAT: 88 case MALWARE_THREAT:
86 case SOCIAL_ENGINEERING_PUBLIC: 89 case SOCIAL_ENGINEERING_PUBLIC:
87 case MALICIOUS_BINARY: 90 case MALICIOUS_BINARY:
88 return 0; 91 return 0;
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 db_updated_callback_); 742 db_updated_callback_);
740 } 743 }
741 744
742 bool V4LocalDatabaseManager::AreStoresAvailableNow( 745 bool V4LocalDatabaseManager::AreStoresAvailableNow(
743 const StoresToCheck& stores_to_check) const { 746 const StoresToCheck& stores_to_check) const {
744 return enabled_ && v4_database_ && 747 return enabled_ && v4_database_ &&
745 v4_database_->AreStoresAvailable(stores_to_check); 748 v4_database_->AreStoresAvailable(stores_to_check);
746 } 749 }
747 750
748 } // namespace safe_browsing 751 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698