| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |