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

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

Issue 1129083003: More base::Values-related bare pointer -> scoped_ptr conversions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix bad merge Created 5 years, 7 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 #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 <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after
1109 web_ui()->CallJavascriptFunction("CertificateManager.onPopulateTree", args); 1109 web_ui()->CallJavascriptFunction("CertificateManager.onPopulateTree", args);
1110 } 1110 }
1111 } 1111 }
1112 1112
1113 void CertificateManagerHandler::ShowError(const std::string& title, 1113 void CertificateManagerHandler::ShowError(const std::string& title,
1114 const std::string& error) const { 1114 const std::string& error) const {
1115 ScopedVector<const base::Value> args; 1115 ScopedVector<const base::Value> args;
1116 args.push_back(new base::StringValue(title)); 1116 args.push_back(new base::StringValue(title));
1117 args.push_back(new base::StringValue(error)); 1117 args.push_back(new base::StringValue(error));
1118 args.push_back(new base::StringValue(l10n_util::GetStringUTF8(IDS_OK))); 1118 args.push_back(new base::StringValue(l10n_util::GetStringUTF8(IDS_OK)));
1119 args.push_back(base::Value::CreateNullValue()); // cancelTitle 1119 args.push_back(base::Value::CreateNullValue().release()); // cancelTitle
1120 args.push_back(base::Value::CreateNullValue()); // okCallback 1120 args.push_back(base::Value::CreateNullValue().release()); // okCallback
1121 args.push_back(base::Value::CreateNullValue()); // cancelCallback 1121 args.push_back(base::Value::CreateNullValue().release()); // cancelCallback
1122 web_ui()->CallJavascriptFunction("AlertOverlay.show", args.get()); 1122 web_ui()->CallJavascriptFunction("AlertOverlay.show", args.get());
1123 } 1123 }
1124 1124
1125 void CertificateManagerHandler::ShowImportErrors( 1125 void CertificateManagerHandler::ShowImportErrors(
1126 const std::string& title, 1126 const std::string& title,
1127 const net::NSSCertDatabase::ImportCertFailureList& not_imported) const { 1127 const net::NSSCertDatabase::ImportCertFailureList& not_imported) const {
1128 std::string error; 1128 std::string error;
1129 if (selected_cert_list_.size() == 1) 1129 if (selected_cert_list_.size() == 1)
1130 error = l10n_util::GetStringUTF8( 1130 error = l10n_util::GetStringUTF8(
1131 IDS_CERT_MANAGER_IMPORT_SINGLE_NOT_IMPORTED); 1131 IDS_CERT_MANAGER_IMPORT_SINGLE_NOT_IMPORTED);
(...skipping 17 matching lines...) Expand all
1149 title_value, 1149 title_value,
1150 error_value, 1150 error_value,
1151 cert_error_list); 1151 cert_error_list);
1152 } 1152 }
1153 1153
1154 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const { 1154 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const {
1155 return web_ui()->GetWebContents()->GetTopLevelNativeWindow(); 1155 return web_ui()->GetWebContents()->GetTopLevelNativeWindow();
1156 } 1156 }
1157 1157
1158 } // namespace options 1158 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698