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

Unified Diff: components/safe_browsing_db/v4_local_database_manager.cc

Issue 1932753005: Download Malware blacklist on desktop platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@v4_01_enable_v4db
Patch Set: Add link to bug Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/safe_browsing_db/BUILD.gn ('k') | components/safe_browsing_db/v4_update_protocol_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bc6c2c5d78f205bf36e83d10898d9f1f26e3fb0c..376d26edac729bd59e0727bb0a9588be447cd9e2 100644
--- a/components/safe_browsing_db/v4_local_database_manager.cc
+++ b/components/safe_browsing_db/v4_local_database_manager.cc
@@ -6,6 +6,7 @@
#include <vector>
+#include "components/safe_browsing_db/safebrowsing.pb.h"
#include "content/public/browser/browser_thread.h"
using content::BrowserThread;
@@ -138,10 +139,24 @@ void V4LocalDatabaseManager::CancelCheck(Client* client) {
void V4LocalDatabaseManager::StartOnIOThread(
net::URLRequestContextGetter* request_context_getter,
const V4ProtocolConfig& config) {
- // TODO(vakh): Implement this skeleton.
- VLOG(1) << "V4LocalDatabaseManager starting";
SafeBrowsingDatabaseManager::StartOnIOThread(request_context_getter, config);
+#if defined(OS_WIN) || defined (OS_LINUX) || defined (OS_MACOSX)
+ // TODO(vakh): Remove this if/endif block when the V4Database is implemented.
+ // Filed as http://crbug.com/608075
+ UpdateListIdentifier update_list_identifier;
+#if defined(OS_WIN)
+ update_list_identifier.platform_type = WINDOWS_PLATFORM;
+#elif defined (OS_LINUX)
Nathan Parker 2016/04/30 00:16:49 I think OS_LINUX _include_ chromeos (I don't know
vakh (use Gerrit instead) 2016/04/30 00:18:37 There's no separate Enum value for ChromeOS so I t
+ update_list_identifier.platform_type = LINUX_PLATFORM;
+#else
+ update_list_identifier.platform_type = OSX_PLATFORM;
+#endif
+ update_list_identifier.threat_entry_type = URL_EXPRESSION;
+ update_list_identifier.threat_type = MALWARE_THREAT;
+ current_list_states_[update_list_identifier] = "";
+#endif
+
V4UpdateCallback callback = base::Bind(
&V4LocalDatabaseManager::UpdateRequestCompleted, base::Unretained(this));
v4_update_protocol_manager_ = V4UpdateProtocolManager::Create(
@@ -152,7 +167,6 @@ void V4LocalDatabaseManager::StartOnIOThread(
void V4LocalDatabaseManager::StopOnIOThread(bool shutdown) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
- DVLOG(1) << "V4LocalDatabaseManager stopping";
// Delete the V4UpdateProtocolManager.
// This cancels any in-flight update request.
« no previous file with comments | « components/safe_browsing_db/BUILD.gn ('k') | components/safe_browsing_db/v4_update_protocol_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698