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

Side by Side Diff: chrome/browser/ui/gtk/certificate_dialogs.cc

Issue 6770026: Merge 79507 - Before object destruction, make sure that its select dialogs are told that we (Closed) Base URL: svn://svn.chromium.org/chrome/branches/696/src/
Patch Set: Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // TODO(mattm): this isn't gtk specific, it shouldn't be under the gtk dir 5 // TODO(mattm): this isn't gtk specific, it shouldn't be under the gtk dir
6 6
7 #include "chrome/browser/ui/gtk/certificate_dialogs.h" 7 #include "chrome/browser/ui/gtk/certificate_dialogs.h"
8 8
9 9
10 #include <vector> 10 #include <vector>
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 suggested_path = FilePath(cert_title); 100 suggested_path = FilePath(cert_title);
101 101
102 ShowCertSelectFileDialog(select_file_dialog_.get(), 102 ShowCertSelectFileDialog(select_file_dialog_.get(),
103 SelectFileDialog::SELECT_SAVEAS_FILE, 103 SelectFileDialog::SELECT_SAVEAS_FILE,
104 suggested_path, 104 suggested_path,
105 parent, 105 parent,
106 NULL); 106 NULL);
107 } 107 }
108 108
109 Exporter::~Exporter() { 109 Exporter::~Exporter() {
110 // There may be pending file dialogs, we need to tell them that we've gone
111 // away so they don't try and call back to us.
112 if (select_file_dialog_.get())
113 select_file_dialog_->ListenerDestroyed();
114
110 x509_certificate_model::DestroyCertChain(&cert_chain_list_); 115 x509_certificate_model::DestroyCertChain(&cert_chain_list_);
111 } 116 }
112 117
113 void Exporter::FileSelected(const FilePath& path, int index, void* params) { 118 void Exporter::FileSelected(const FilePath& path, int index, void* params) {
114 std::string data; 119 std::string data;
115 switch (index) { 120 switch (index) {
116 case 2: 121 case 2:
117 for (size_t i = 0; i < cert_chain_list_.size(); ++i) 122 for (size_t i = 0; i < cert_chain_list_.size(); ++i)
118 data += GetBase64String(cert_chain_list_[i]); 123 data += GetBase64String(cert_chain_list_[i]);
119 break; 124 break;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 type, string16(), 179 type, string16(),
175 suggested_path, &file_type_info, 1, 180 suggested_path, &file_type_info, 1,
176 FILE_PATH_LITERAL("crt"), parent, 181 FILE_PATH_LITERAL("crt"), parent,
177 params); 182 params);
178 } 183 }
179 184
180 void ShowCertExportDialog(gfx::NativeWindow parent, 185 void ShowCertExportDialog(gfx::NativeWindow parent,
181 net::X509Certificate::OSCertHandle cert) { 186 net::X509Certificate::OSCertHandle cert) {
182 new Exporter(parent, cert); 187 new Exporter(parent, cert);
183 } 188 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extensions_ui.cc ('k') | chrome/browser/ui/webui/options/advanced_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698