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

Side by Side Diff: chrome/browser/ui/webui/options/certificate_manager_handler.h

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CERTIFICATE_MANAGER_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CERTIFICATE_MANAGER_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CERTIFICATE_MANAGER_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CERTIFICATE_MANAGER_HANDLER_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 10
10 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
11 #include "base/macros.h" 12 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/task/cancelable_task_tracker.h" 14 #include "base/task/cancelable_task_tracker.h"
15 #include "chrome/browser/certificate_manager_model.h" 15 #include "chrome/browser/certificate_manager_model.h"
16 #include "chrome/browser/ui/webui/options/options_ui.h" 16 #include "chrome/browser/ui/webui/options/options_ui.h"
17 #include "net/cert/nss_cert_database.h" 17 #include "net/cert/nss_cert_database.h"
18 #include "ui/gfx/native_widget_types.h" 18 #include "ui/gfx/native_widget_types.h"
19 #include "ui/shell_dialogs/select_file_dialog.h" 19 #include "ui/shell_dialogs/select_file_dialog.h"
20 20
21 namespace options { 21 namespace options {
22 22
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 void ImportCATrustSelected(const base::ListValue* args); 125 void ImportCATrustSelected(const base::ListValue* args);
126 126
127 // Export a certificate. 127 // Export a certificate.
128 void Export(const base::ListValue* args); 128 void Export(const base::ListValue* args);
129 129
130 // Delete certificate and private key (if any). 130 // Delete certificate and private key (if any).
131 void Delete(const base::ListValue* args); 131 void Delete(const base::ListValue* args);
132 132
133 // Model initialization methods. 133 // Model initialization methods.
134 void OnCertificateManagerModelCreated( 134 void OnCertificateManagerModelCreated(
135 scoped_ptr<CertificateManagerModel> model); 135 std::unique_ptr<CertificateManagerModel> model);
136 void CertificateManagerModelReady(); 136 void CertificateManagerModelReady();
137 137
138 // Populate the trees in all the tabs. 138 // Populate the trees in all the tabs.
139 void Populate(const base::ListValue* args); 139 void Populate(const base::ListValue* args);
140 140
141 // Populate the given tab's tree. 141 // Populate the given tab's tree.
142 void PopulateTree(const std::string& tab_name, 142 void PopulateTree(const std::string& tab_name,
143 net::CertType type, 143 net::CertType type,
144 const net::CertificateList& web_trust_certs); 144 const net::CertificateList& web_trust_certs);
145 145
(...skipping 12 matching lines...) Expand all
158 const std::string& title, 158 const std::string& title,
159 const net::NSSCertDatabase::ImportCertFailureList& not_imported) const; 159 const net::NSSCertDatabase::ImportCertFailureList& not_imported) const;
160 160
161 gfx::NativeWindow GetParentWindow() const; 161 gfx::NativeWindow GetParentWindow() const;
162 162
163 // True if certificate viewer should be shown in modal instead of constrianed 163 // True if certificate viewer should be shown in modal instead of constrianed
164 // dialog. 164 // dialog.
165 bool show_certs_in_modal_dialog_; 165 bool show_certs_in_modal_dialog_;
166 // The Certificates Manager model 166 // The Certificates Manager model
167 bool requested_certificate_manager_model_; 167 bool requested_certificate_manager_model_;
168 scoped_ptr<CertificateManagerModel> certificate_manager_model_; 168 std::unique_ptr<CertificateManagerModel> certificate_manager_model_;
169 169
170 // For multi-step import or export processes, we need to store the path, 170 // For multi-step import or export processes, we need to store the path,
171 // password, etc the user chose while we wait for them to enter a password, 171 // password, etc the user chose while we wait for them to enter a password,
172 // wait for file to be read, etc. 172 // wait for file to be read, etc.
173 base::FilePath file_path_; 173 base::FilePath file_path_;
174 base::string16 password_; 174 base::string16 password_;
175 bool use_hardware_backed_; 175 bool use_hardware_backed_;
176 std::string file_data_; 176 std::string file_data_;
177 net::CertificateList selected_cert_list_; 177 net::CertificateList selected_cert_list_;
178 scoped_refptr<ui::SelectFileDialog> select_file_dialog_; 178 scoped_refptr<ui::SelectFileDialog> select_file_dialog_;
179 scoped_refptr<net::CryptoModule> module_; 179 scoped_refptr<net::CryptoModule> module_;
180 180
181 // Used in reading and writing certificate files. 181 // Used in reading and writing certificate files.
182 base::CancelableTaskTracker tracker_; 182 base::CancelableTaskTracker tracker_;
183 scoped_refptr<FileAccessProvider> file_access_provider_; 183 scoped_refptr<FileAccessProvider> file_access_provider_;
184 184
185 scoped_ptr<CertIdMap> cert_id_map_; 185 std::unique_ptr<CertIdMap> cert_id_map_;
186 186
187 base::WeakPtrFactory<CertificateManagerHandler> weak_ptr_factory_; 187 base::WeakPtrFactory<CertificateManagerHandler> weak_ptr_factory_;
188 188
189 DISALLOW_COPY_AND_ASSIGN(CertificateManagerHandler); 189 DISALLOW_COPY_AND_ASSIGN(CertificateManagerHandler);
190 }; 190 };
191 191
192 } // namespace options 192 } // namespace options
193 193
194 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CERTIFICATE_MANAGER_HANDLER_H_ 194 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CERTIFICATE_MANAGER_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698