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

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

Issue 503061: Merge 34957 - Fixes crash when message IDS_EXTENSION_PACK_DIALOG_SUCCESS_BODY... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/249/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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 } 486 }
487 487
488 pack_job_ = new PackExtensionJob(this, root_directory, key_file); 488 pack_job_ = new PackExtensionJob(this, root_directory, key_file);
489 pack_job_->Start(); 489 pack_job_->Start();
490 } 490 }
491 491
492 void ExtensionsDOMHandler::OnPackSuccess(const FilePath& crx_file, 492 void ExtensionsDOMHandler::OnPackSuccess(const FilePath& crx_file,
493 const FilePath& pem_file) { 493 const FilePath& pem_file) {
494 std::string message; 494 std::string message;
495 if (!pem_file.empty()) { 495 if (!pem_file.empty()) {
496 message = WideToASCII(l10n_util::GetStringF( 496 message = WideToUTF8(l10n_util::GetStringF(
497 IDS_EXTENSION_PACK_DIALOG_SUCCESS_BODY_NEW, 497 IDS_EXTENSION_PACK_DIALOG_SUCCESS_BODY_NEW,
498 crx_file.ToWStringHack(), 498 crx_file.ToWStringHack(),
499 pem_file.ToWStringHack())); 499 pem_file.ToWStringHack()));
500 } else { 500 } else {
501 message = WideToASCII(l10n_util::GetStringF( 501 message = WideToUTF8(l10n_util::GetStringF(
502 IDS_EXTENSION_PACK_DIALOG_SUCCESS_BODY_UPDATE, 502 IDS_EXTENSION_PACK_DIALOG_SUCCESS_BODY_UPDATE,
503 crx_file.ToWStringHack())); 503 crx_file.ToWStringHack()));
504 } 504 }
505 ShowAlert(message); 505 ShowAlert(message);
506 506
507 ListValue results; 507 ListValue results;
508 dom_ui_->CallJavascriptFunction(L"hidePackDialog", results); 508 dom_ui_->CallJavascriptFunction(L"hidePackDialog", results);
509 } 509 }
510 510
511 void ExtensionsDOMHandler::OnPackFailure(const std::wstring& error) { 511 void ExtensionsDOMHandler::OnPackFailure(const std::wstring& error) {
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 // static 747 // static
748 RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes() { 748 RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes() {
749 return ResourceBundle::GetSharedInstance(). 749 return ResourceBundle::GetSharedInstance().
750 LoadImageResourceBytes(IDR_PLUGIN); 750 LoadImageResourceBytes(IDR_PLUGIN);
751 } 751 }
752 752
753 // static 753 // static
754 void ExtensionsUI::RegisterUserPrefs(PrefService* prefs) { 754 void ExtensionsUI::RegisterUserPrefs(PrefService* prefs) {
755 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, false); 755 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, false);
756 } 756 }
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