OLD | NEW |
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> |
11 | 11 |
12 #include "base/base64.h" | 12 #include "base/base64.h" |
13 #include "base/file_util.h" | 13 #include "base/file_util.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/scoped_ptr.h" | 15 #include "base/scoped_ptr.h" |
16 #include "base/task.h" | 16 #include "base/task.h" |
17 #include "chrome/browser/browser_thread.h" | 17 #include "chrome/browser/browser_thread.h" |
18 #include "chrome/browser/shell_dialogs.h" | |
19 #include "chrome/common/net/x509_certificate_model.h" | 18 #include "chrome/common/net/x509_certificate_model.h" |
20 #include "grit/generated_resources.h" | 19 #include "grit/generated_resources.h" |
21 #include "ui/base/l10n/l10n_util.h" | 20 #include "ui/base/l10n/l10n_util.h" |
22 | 21 |
23 namespace { | 22 namespace { |
24 | 23 |
25 //////////////////////////////////////////////////////////////////////////////// | 24 //////////////////////////////////////////////////////////////////////////////// |
26 // General utility functions. | 25 // General utility functions. |
27 | 26 |
28 class Writer : public Task { | 27 class Writer : public Task { |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 type, string16(), | 174 type, string16(), |
176 suggested_path, &file_type_info, 1, | 175 suggested_path, &file_type_info, 1, |
177 FILE_PATH_LITERAL("crt"), parent, | 176 FILE_PATH_LITERAL("crt"), parent, |
178 params); | 177 params); |
179 } | 178 } |
180 | 179 |
181 void ShowCertExportDialog(gfx::NativeWindow parent, | 180 void ShowCertExportDialog(gfx::NativeWindow parent, |
182 net::X509Certificate::OSCertHandle cert) { | 181 net::X509Certificate::OSCertHandle cert) { |
183 new Exporter(parent, cert); | 182 new Exporter(parent, cert); |
184 } | 183 } |
OLD | NEW |