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

Unified Diff: chrome/browser/dom_ui/options/certificate_manager_handler.cc

Issue 6277001: Fix error dialog in certificate manager missing ok button. Fix leak. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/options/certificate_manager_handler.cc
diff --git a/chrome/browser/dom_ui/options/certificate_manager_handler.cc b/chrome/browser/dom_ui/options/certificate_manager_handler.cc
index 480fcb4a3cd7460c8ca28f66d7666bd330ea477f..ef949ff943aedfdf6dac35a892a9e81bbd3cbfca 100644
--- a/chrome/browser/dom_ui/options/certificate_manager_handler.cc
+++ b/chrome/browser/dom_ui/options/certificate_manager_handler.cc
@@ -8,6 +8,7 @@
#include "app/l10n_util_collator.h"
#include "base/file_util.h" // for FileAccessProvider
#include "base/safe_strerror_posix.h"
+#include "base/scoped_vector.h"
#include "base/string_number_conversions.h"
#include "base/values.h"
#include "chrome/browser/browser_process.h"
@@ -858,14 +859,14 @@ void CertificateManagerHandler::PopulateTree(const std::string& tab_name,
void CertificateManagerHandler::ShowError(const std::string& title,
const std::string& error) const {
- std::vector<const Value*> args;
+ ScopedVector<const Value> args;
args.push_back(Value::CreateStringValue(title));
args.push_back(Value::CreateStringValue(error));
- args.push_back(Value::CreateNullValue()); // okTitle
- args.push_back(Value::CreateStringValue("")); // cancelTitle
+ args.push_back(Value::CreateStringValue(l10n_util::GetStringUTF8(IDS_OK)));
+ args.push_back(Value::CreateNullValue()); // cancelTitle
args.push_back(Value::CreateNullValue()); // okCallback
args.push_back(Value::CreateNullValue()); // cancelCallback
- dom_ui_->CallJavascriptFunction(L"AlertOverlay.show", args);
+ dom_ui_->CallJavascriptFunction(L"AlertOverlay.show", args.get());
}
void CertificateManagerHandler::ShowImportErrors(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698