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

Unified Diff: chrome/browser/ui/certificate_dialogs.cc

Issue 10667026: Start consolidating cross-port file selection code into ui/base/dialogs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Attempt to fix win Created 8 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
« no previous file with comments | « chrome/browser/ui/certificate_dialogs.h ('k') | chrome/browser/ui/chrome_select_file_policy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/certificate_dialogs.cc
diff --git a/chrome/browser/ui/certificate_dialogs.cc b/chrome/browser/ui/certificate_dialogs.cc
index 0b125901d4772b47a8d0fd10683ec7e30d079160..df1e5b1be5a1d842eb61074b96e144f99d743e10 100644
--- a/chrome/browser/ui/certificate_dialogs.cc
+++ b/chrome/browser/ui/certificate_dialogs.cc
@@ -12,6 +12,7 @@
#include "base/file_util.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
+#include "chrome/browser/ui/chrome_select_file_policy.h"
#include "chrome/common/net/x509_certificate_model.h"
#include "content/public/browser/browser_thread.h"
#include "grit/generated_resources.h"
@@ -79,7 +80,8 @@ class Exporter : public SelectFileDialog::Listener {
Exporter::Exporter(WebContents* web_contents,
gfx::NativeWindow parent,
net::X509Certificate::OSCertHandle cert)
- : select_file_dialog_(SelectFileDialog::Create(this)) {
+ : select_file_dialog_(SelectFileDialog::Create(
+ this, new ChromeSelectFilePolicy(web_contents))) {
x509_certificate_model::GetCertChainFromCert(cert, &cert_chain_list_);
// TODO(mattm): should this default to some directory?
@@ -92,7 +94,6 @@ Exporter::Exporter(WebContents* web_contents,
ShowCertSelectFileDialog(select_file_dialog_.get(),
SelectFileDialog::SELECT_SAVEAS_FILE,
suggested_path,
- web_contents,
parent,
NULL);
}
@@ -144,7 +145,6 @@ void Exporter::FileSelectionCanceled(void* params) {
void ShowCertSelectFileDialog(SelectFileDialog* select_file_dialog,
SelectFileDialog::Type type,
const FilePath& suggested_path,
- WebContents* web_contents,
gfx::NativeWindow parent,
void* params) {
SelectFileDialog::FileTypeInfo file_type_info;
@@ -170,7 +170,7 @@ void ShowCertSelectFileDialog(SelectFileDialog* select_file_dialog,
select_file_dialog->SelectFile(
type, string16(),
suggested_path, &file_type_info, 1,
- FILE_PATH_LITERAL("crt"), web_contents,
+ FILE_PATH_LITERAL("crt"),
parent, params);
}
« no previous file with comments | « chrome/browser/ui/certificate_dialogs.h ('k') | chrome/browser/ui/chrome_select_file_policy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698