Chromium Code Reviews| Index: chrome/browser/extensions/extensions_startup.cc |
| diff --git a/chrome/browser/extensions/extensions_startup.cc b/chrome/browser/extensions/extensions_startup.cc |
| index cd11840f73b394350878e2a49af308d0bb04ba44..2725b6307b57db050c10a13734eb3c30fe61d38e 100644 |
| --- a/chrome/browser/extensions/extensions_startup.cc |
| +++ b/chrome/browser/extensions/extensions_startup.cc |
| @@ -9,26 +9,37 @@ |
| #include "base/utf_string_conversions.h" |
| #include "chrome/browser/extensions/extension_service.h" |
| #include "chrome/browser/profiles/profile.h" |
| -#include "chrome/browser/ui/simple_message_box.h" |
| #include "chrome/common/chrome_switches.h" |
| +namespace { |
| + |
| +void PrintPackExtensionMessage(const std::string& title, |
|
Aaron Boodman
2012/08/14 01:32:01
You can remove all the title strings. Just print t
tfarina
2012/08/14 01:48:58
Done.
|
| + const std::string& message) { |
| + std::string out_text(title); |
| + out_text.append("\n\n"); |
| + out_text.append(message); |
| + out_text.append("\n"); |
| + base::StringPrintf("%s", out_text.c_str()); |
| +} |
| + |
| +} // namespace |
| + |
| ExtensionsStartupUtil::ExtensionsStartupUtil() : pack_job_succeeded_(false) {} |
| void ExtensionsStartupUtil::OnPackSuccess( |
| const FilePath& crx_path, |
| const FilePath& output_private_key_path) { |
| pack_job_succeeded_ = true; |
| - chrome::ShowMessageBox(NULL, ASCIIToUTF16("Extension Packaging Success"), |
| - PackExtensionJob::StandardSuccessMessage(crx_path, |
| - output_private_key_path), |
| - chrome::MESSAGE_BOX_TYPE_INFORMATION); |
| + PrintPackExtensionMessage(std::string("Extension Packaging Success"), |
| + UTF16ToUTF8(PackExtensionJob::StandardSuccessMessage(crx_path, |
| + output_private_key_path))); |
| } |
| void ExtensionsStartupUtil::OnPackFailure( |
| const std::string& error_message, |
| extensions::ExtensionCreator::ErrorType type) { |
| - chrome::ShowMessageBox(NULL, ASCIIToUTF16("Extension Packaging Error"), |
| - UTF8ToUTF16(error_message), chrome::MESSAGE_BOX_TYPE_WARNING); |
| + PrintPackExtensionMessage(std::string("Extension Packaging Error"), |
| + error_message); |
| } |
| bool ExtensionsStartupUtil::PackExtension(const CommandLine& cmd_line) { |