Index: components/safe_browsing_db/v4_local_database_manager.cc |
diff --git a/components/safe_browsing_db/v4_local_database_manager.cc b/components/safe_browsing_db/v4_local_database_manager.cc |
index 493ccc54b606146452e5f93df7fe3a34d41b11eb..8432b4b59281c7477b01c97812dfc8be11beefb7 100644 |
--- a/components/safe_browsing_db/v4_local_database_manager.cc |
+++ b/components/safe_browsing_db/v4_local_database_manager.cc |
@@ -10,6 +10,7 @@ |
#include <vector> |
#include "base/callback.h" |
+#include "components/safe_browsing_db/safebrowsing.pb.h" |
#include "content/public/browser/browser_thread.h" |
using content::BrowserThread; |
@@ -17,12 +18,29 @@ |
namespace safe_browsing { |
namespace { |
+#if defined(OS_WIN) |
+#define PLATFORM_TYPE WINDOWS_PLATFORM |
+#elif defined(OS_LINUX) |
+#define PLATFORM_TYPE LINUX_PLATFORM |
+#elif defined(OS_MACOSX) |
+#define PLATFORM_TYPE OSX_PLATFORM |
+#else |
+// This should ideally never compile but it is getting compiled on Android. |
+// See: https://bugs.chromium.org/p/chromium/issues/detail?id=621647 |
+// TODO(vakh): Once that bug is fixed, this should be removed. If we leave |
+// the platform_type empty, the server won't recognize the request and |
+// return an error response which will pollute our UMA metrics. |
+#define PLATFORM_TYPE LINUX_PLATFORM |
+#endif |
// TODO(vakh): Implement this to populate the map appopriately. |
// Filed as http://crbug.com/608075 |
StoreFileNameMap GetStoreFileNameMap() { |
return StoreFileNameMap( |
- {{kUrlMalwareId, "UrlMalware.store"}, {kUrlSocengId, "UrlSoceng.store"}}); |
+ {{UpdateListIdentifier(PLATFORM_TYPE, URL, MALWARE_THREAT), |
+ "UrlMalware.store"}, |
+ {UpdateListIdentifier(PLATFORM_TYPE, URL, SOCIAL_ENGINEERING_PUBLIC), |
+ "UrlSoceng.store"}}); |
} |
} // namespace |
@@ -136,7 +154,7 @@ |
bool V4LocalDatabaseManager::CheckBrowseUrl(const GURL& url, Client* client) { |
// TODO(vakh): Implement this skeleton. |
DCHECK_CURRENTLY_ON(BrowserThread::IO); |
- if (!enabled_ || !CanCheckUrl(url)) { |
+ if (!enabled_) { |
return true; |
} |