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

Unified Diff: chrome/browser/ui/webui/options/password_manager_handler.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. 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 | « no previous file | chrome/browser/ui/webui/options/password_manager_handler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options/password_manager_handler.cc
diff --git a/chrome/browser/ui/webui/options/password_manager_handler.cc b/chrome/browser/ui/webui/options/password_manager_handler.cc
index 404018f310c9feb6f859c23084dcbb4682ceefb6..66c9effebad4520ccc5d23a490bcb7e42b614f4d 100644
--- a/chrome/browser/ui/webui/options/password_manager_handler.cc
+++ b/chrome/browser/ui/webui/options/password_manager_handler.cc
@@ -6,7 +6,6 @@
#include "base/bind.h"
#include "base/command_line.h"
-#include "base/debug/leak_annotations.h"
#include "base/feature_list.h"
#include "base/files/file_path.h"
#include "base/macros.h"
@@ -326,10 +325,8 @@ void PasswordManagerHandler::HandlePasswordImport(const base::ListValue* args) {
DCHECK(!file_type_info.extensions.empty() &&
!file_type_info.extensions[0].empty());
file_type_info.include_all_files = true;
- ChromeSelectFilePolicy* select_file_policy =
- new ChromeSelectFilePolicy(web_ui()->GetWebContents());
- ANNOTATE_LEAKING_OBJECT_PTR(select_file_policy);
- select_file_dialog_ = ui::SelectFileDialog::Create(this, select_file_policy);
+ select_file_dialog_ = ui::SelectFileDialog::Create(
+ this, new ChromeSelectFilePolicy(web_ui()->GetWebContents()));
select_file_dialog_->SelectFile(
ui::SelectFileDialog::SELECT_OPEN_FILE,
l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_IMPORT_DIALOG_TITLE),
@@ -391,10 +388,8 @@ void PasswordManagerHandler::HandlePasswordExport(const base::ListValue* args) {
DCHECK(!file_type_info.extensions.empty() &&
!file_type_info.extensions[0].empty());
file_type_info.include_all_files = true;
- ChromeSelectFilePolicy* select_file_policy =
- new ChromeSelectFilePolicy(web_ui()->GetWebContents());
- ANNOTATE_LEAKING_OBJECT_PTR(select_file_policy);
- select_file_dialog_ = ui::SelectFileDialog::Create(this, select_file_policy);
+ select_file_dialog_ = ui::SelectFileDialog::Create(
+ this, new ChromeSelectFilePolicy(web_ui()->GetWebContents()));
select_file_dialog_->SelectFile(
ui::SelectFileDialog::SELECT_SAVEAS_FILE,
l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_EXPORT_DIALOG_TITLE),
« no previous file with comments | « no previous file | chrome/browser/ui/webui/options/password_manager_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698