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

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

Issue 1509673004: Adding support for specifying user-cert filename from URL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « chrome/browser/resources/options/certificate_manager.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options/certificate_manager_handler.cc
diff --git a/chrome/browser/ui/webui/options/certificate_manager_handler.cc b/chrome/browser/ui/webui/options/certificate_manager_handler.cc
index 02ff4775eaa8550dc09316b17a855123550612ed..9c7d4313a753a939d3b70e8b8af383899390a751 100644
--- a/chrome/browser/ui/webui/options/certificate_manager_handler.cc
+++ b/chrome/browser/ui/webui/options/certificate_manager_handler.cc
@@ -709,6 +709,10 @@ void CertificateManagerHandler::StartImportPersonal(
ImportExportCleanup();
return;
}
+ base::FilePath default_path;
+ base::string16 path_string;
+ if (args->GetString(1, &path_string))
+ default_path = base::FilePath::FromUTF16Unsafe(path_string);
file_type_info.extensions.resize(1);
file_type_info.extensions[0].push_back(FILE_PATH_LITERAL("p12"));
file_type_info.extensions[0].push_back(FILE_PATH_LITERAL("crt"));
@@ -719,7 +723,7 @@ void CertificateManagerHandler::StartImportPersonal(
this, new ChromeSelectFilePolicy(web_ui()->GetWebContents()));
select_file_dialog_->SelectFile(
ui::SelectFileDialog::SELECT_OPEN_FILE, base::string16(),
- base::FilePath(), &file_type_info, 1, FILE_PATH_LITERAL("p12"),
+ default_path, &file_type_info, 1, FILE_PATH_LITERAL("p12"),
GetParentWindow(),
reinterpret_cast<void*>(IMPORT_PERSONAL_FILE_SELECTED));
}
« no previous file with comments | « chrome/browser/resources/options/certificate_manager.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698