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

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

Issue 503051: Fixes crash when message IDS_EXTENSION_PACK_DIALOG_SUCCESS_BODY_NEW has non-A... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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 | 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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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/extensions_ui.h" 5 #include "chrome/browser/extensions/extensions_ui.h"
6 6
7 #include "app/gfx/codec/png_codec.h" 7 #include "app/gfx/codec/png_codec.h"
8 #include "app/gfx/color_utils.h" 8 #include "app/gfx/color_utils.h"
9 #include "app/gfx/skbitmap_operations.h" 9 #include "app/gfx/skbitmap_operations.h"
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 } 487 }
488 488
489 pack_job_ = new PackExtensionJob(this, root_directory, key_file); 489 pack_job_ = new PackExtensionJob(this, root_directory, key_file);
490 pack_job_->Start(); 490 pack_job_->Start();
491 } 491 }
492 492
493 void ExtensionsDOMHandler::OnPackSuccess(const FilePath& crx_file, 493 void ExtensionsDOMHandler::OnPackSuccess(const FilePath& crx_file,
494 const FilePath& pem_file) { 494 const FilePath& pem_file) {
495 std::string message; 495 std::string message;
496 if (!pem_file.empty()) { 496 if (!pem_file.empty()) {
497 message = WideToASCII(l10n_util::GetStringF( 497 message = WideToUTF8(l10n_util::GetStringF(
498 IDS_EXTENSION_PACK_DIALOG_SUCCESS_BODY_NEW, 498 IDS_EXTENSION_PACK_DIALOG_SUCCESS_BODY_NEW,
499 crx_file.ToWStringHack(), 499 crx_file.ToWStringHack(),
500 pem_file.ToWStringHack())); 500 pem_file.ToWStringHack()));
501 } else { 501 } else {
502 message = WideToASCII(l10n_util::GetStringF( 502 message = WideToUTF8(l10n_util::GetStringF(
503 IDS_EXTENSION_PACK_DIALOG_SUCCESS_BODY_UPDATE, 503 IDS_EXTENSION_PACK_DIALOG_SUCCESS_BODY_UPDATE,
504 crx_file.ToWStringHack())); 504 crx_file.ToWStringHack()));
505 } 505 }
506 ShowAlert(message); 506 ShowAlert(message);
507 507
508 ListValue results; 508 ListValue results;
509 dom_ui_->CallJavascriptFunction(L"hidePackDialog", results); 509 dom_ui_->CallJavascriptFunction(L"hidePackDialog", results);
510 } 510 }
511 511
512 void ExtensionsDOMHandler::OnPackFailure(const std::wstring& error) { 512 void ExtensionsDOMHandler::OnPackFailure(const std::wstring& error) {
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 // static 748 // static
749 RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes() { 749 RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes() {
750 return ResourceBundle::GetSharedInstance(). 750 return ResourceBundle::GetSharedInstance().
751 LoadDataResourceBytes(IDR_PLUGIN); 751 LoadDataResourceBytes(IDR_PLUGIN);
752 } 752 }
753 753
754 // static 754 // static
755 void ExtensionsUI::RegisterUserPrefs(PrefService* prefs) { 755 void ExtensionsUI::RegisterUserPrefs(PrefService* prefs) {
756 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, false); 756 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, false);
757 } 757 }
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