Chromium Code Reviews

Unified Diff: chrome/browser/ui/webui/options/password_manager_handler_unittest.cc

Issue 1898143002: Properly delete the unused policy in password_manager_handler_unittest.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@341477_about_flags
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: chrome/browser/ui/webui/options/password_manager_handler_unittest.cc
diff --git a/chrome/browser/ui/webui/options/password_manager_handler_unittest.cc b/chrome/browser/ui/webui/options/password_manager_handler_unittest.cc
index e3bf45990c51aeda2803acfe47ab28997708dee4..6605a28ba44342f4d008cec1db5999ff7e4792ac 100644
--- a/chrome/browser/ui/webui/options/password_manager_handler_unittest.cc
+++ b/chrome/browser/ui/webui/options/password_manager_handler_unittest.cc
@@ -25,12 +25,14 @@
using password_manager::MockPasswordStore;
namespace {
+
class TestSelectFileDialogFactory final : public ui::SelectFileDialogFactory {
public:
TestSelectFileDialogFactory() {}
~TestSelectFileDialogFactory() override {}
ui::SelectFileDialog* Create(ui::SelectFileDialog::Listener* listener,
ui::SelectFilePolicy* policy) override {
+ delete policy; // Ignore the policy, replace it with a test one.
return new TestSelectFileDialog(listener, new TestSelectFilePolicy);
}
« no previous file with comments | « chrome/browser/ui/webui/options/password_manager_handler.cc ('k') | tools/valgrind/memcheck/suppressions.txt » ('j') | no next file with comments »

Powered by Google App Engine