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

Unified Diff: chrome/common/safe_browsing/file_type_policies_test_util.cc

Issue 2072933002: Add sampling of unknown filetypes in download protection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/safe_browsing/file_type_policies_test_util.cc
diff --git a/chrome/common/safe_browsing/file_type_policies_test_util.cc b/chrome/common/safe_browsing/file_type_policies_test_util.cc
new file mode 100644
index 0000000000000000000000000000000000000000..5c9b5f9c34557348e893aa57f1f52da0eec15a67
--- /dev/null
+++ b/chrome/common/safe_browsing/file_type_policies_test_util.cc
@@ -0,0 +1,19 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/common/safe_browsing/file_type_policies_test_util.h"
+
+namespace safe_browsing {
+
+FileTypePoliciesTestOverlay::FileTypePoliciesTestOverlay()
+ : policies_(new FileTypePolicies()) {
+ policies_->PopulateFromResourceBundle();
+ FileTypePolicies::SetInstanceForTests(policies_.get());
+}
+
+FileTypePoliciesTestOverlay::~FileTypePoliciesTestOverlay() {
+ FileTypePolicies::SetInstanceForTests(nullptr);
+}
+
+} // namespace safe_browsing

Powered by Google App Engine
This is Rietveld 408576698