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

Side by Side Diff: chrome/browser/extensions/extension_error_ui.cc

Issue 10824103: Fix garbled text in extension error bubble. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/extensions/extension_error_ui.h" 5 #include "chrome/browser/extensions/extension_error_ui.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/string16.h" 8 #include "base/string16.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 int template_message_id) { 43 int template_message_id) {
44 CHECK(extensions); 44 CHECK(extensions);
45 CHECK(template_message_id); 45 CHECK(template_message_id);
46 string16 message; 46 string16 message;
47 47
48 for (ExtensionIdSet::const_iterator iter = extensions->begin(); 48 for (ExtensionIdSet::const_iterator iter = extensions->begin();
49 iter != extensions->end(); ++iter) { 49 iter != extensions->end(); ++iter) {
50 const extensions::Extension* e = extension_service_->GetExtensionById(*iter, 50 const extensions::Extension* e = extension_service_->GetExtensionById(*iter,
51 true); 51 true);
52 message += l10n_util::GetStringFUTF16(template_message_id, 52 message += l10n_util::GetStringFUTF16(template_message_id,
53 string16(ASCIIToUTF16(e->name()))); 53 UTF8ToUTF16(e->name()));
54 } 54 }
55 return message; 55 return message;
56 } 56 }
57 57
58 string16 ExtensionErrorUI::GenerateMessage() { 58 string16 ExtensionErrorUI::GenerateMessage() {
59 return GenerateMessageSection(external_extension_ids_.get(), 59 return GenerateMessageSection(external_extension_ids_.get(),
60 IDS_EXTENSION_ALERT_ITEM_EXTERNAL) + 60 IDS_EXTENSION_ALERT_ITEM_EXTERNAL) +
61 GenerateMessageSection(blacklisted_extension_ids_.get(), 61 GenerateMessageSection(blacklisted_extension_ids_.get(),
62 IDS_EXTENSION_ALERT_ITEM_BLACKLISTED) + 62 IDS_EXTENSION_ALERT_ITEM_BLACKLISTED) +
63 GenerateMessageSection(orphaned_extension_ids_.get(), 63 GenerateMessageSection(orphaned_extension_ids_.get(),
(...skipping 25 matching lines...) Expand all
89 extension_service_->HandleExtensionAlertClosed(); 89 extension_service_->HandleExtensionAlertClosed();
90 } 90 }
91 91
92 void ExtensionErrorUI::BubbleViewAcceptButtonPressed() { 92 void ExtensionErrorUI::BubbleViewAcceptButtonPressed() {
93 extension_service_->HandleExtensionAlertAccept(); 93 extension_service_->HandleExtensionAlertAccept();
94 } 94 }
95 95
96 void ExtensionErrorUI::BubbleViewCancelButtonPressed() { 96 void ExtensionErrorUI::BubbleViewCancelButtonPressed() {
97 extension_service_->HandleExtensionAlertDetails(); 97 extension_service_->HandleExtensionAlertDetails();
98 } 98 }
OLDNEW
« 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