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

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

Issue 2496653002: Part 2 of base::IDMap refactor to eliminate IDMapOwnPointer/IDMapExternalPointer modes (Closed)
Patch Set: typedefs => using statements, update comments in base/id_map.h Created 4 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 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 #include "chrome/browser/ui/webui/options/certificate_manager_handler.h" 5 #include "chrome/browser/ui/webui/options/certificate_manager_handler.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 ~CertIdMap() {} 199 ~CertIdMap() {}
200 200
201 std::string CertToId(net::X509Certificate* cert); 201 std::string CertToId(net::X509Certificate* cert);
202 net::X509Certificate* IdToCert(const std::string& id); 202 net::X509Certificate* IdToCert(const std::string& id);
203 net::X509Certificate* CallbackArgsToCert(const base::ListValue* args); 203 net::X509Certificate* CallbackArgsToCert(const base::ListValue* args);
204 204
205 private: 205 private:
206 typedef std::map<net::X509Certificate*, int32_t> CertMap; 206 typedef std::map<net::X509Certificate*, int32_t> CertMap;
207 207
208 // Creates an ID for cert and looks up the cert for an ID. 208 // Creates an ID for cert and looks up the cert for an ID.
209 IDMap<net::X509Certificate>id_map_; 209 IDMap<net::X509Certificate*> id_map_;
210 210
211 // Finds the ID for a cert. 211 // Finds the ID for a cert.
212 CertMap cert_map_; 212 CertMap cert_map_;
213 213
214 DISALLOW_COPY_AND_ASSIGN(CertIdMap); 214 DISALLOW_COPY_AND_ASSIGN(CertIdMap);
215 }; 215 };
216 216
217 std::string CertIdMap::CertToId(net::X509Certificate* cert) { 217 std::string CertIdMap::CertToId(net::X509Certificate* cert) {
218 CertMap::const_iterator iter = cert_map_.find(cert); 218 CertMap::const_iterator iter = cert_map_.find(cert);
219 if (iter != cert_map_.end()) 219 if (iter != cert_map_.end())
(...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after
1228 web_ui()->CallJavascriptFunctionUnsafe("CertificateImportErrorOverlay.show", 1228 web_ui()->CallJavascriptFunctionUnsafe("CertificateImportErrorOverlay.show",
1229 title_value, error_value, 1229 title_value, error_value,
1230 cert_error_list); 1230 cert_error_list);
1231 } 1231 }
1232 1232
1233 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const { 1233 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const {
1234 return web_ui()->GetWebContents()->GetTopLevelNativeWindow(); 1234 return web_ui()->GetWebContents()->GetTopLevelNativeWindow();
1235 } 1235 }
1236 1236
1237 } // namespace options 1237 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/cookies_tree_model_util.h ('k') | chrome/browser/ui/webui/print_preview/print_preview_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698