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

Unified Diff: chrome/browser/extensions/startup_helper.cc

Issue 10825333: extensions: Print to stdout on all platform with --pack-extension. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase and fix nit 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/startup_helper.cc
diff --git a/chrome/browser/extensions/startup_helper.cc b/chrome/browser/extensions/startup_helper.cc
index 2b74c7e25193df55afb449f2279cb23f093c6351..0778ad873cb4ea5698fff2f121c11e8d8ea035ff 100644
--- a/chrome/browser/extensions/startup_helper.cc
+++ b/chrome/browser/extensions/startup_helper.cc
@@ -9,9 +9,16 @@
#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& message) {
+ base::StringPrintf("%s\n", message.c_str());
+}
+
+} // namespace
+
namespace extensions {
StartupHelper::StartupHelper() : pack_job_succeeded_(false) {}
@@ -19,16 +26,15 @@ StartupHelper::StartupHelper() : pack_job_succeeded_(false) {}
void StartupHelper::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(
+ UTF16ToUTF8(
+ PackExtensionJob::StandardSuccessMessage(crx_path,
+ output_private_key_path)));
}
void StartupHelper::OnPackFailure(const std::string& error_message,
ExtensionCreator::ErrorType type) {
- chrome::ShowMessageBox(NULL, ASCIIToUTF16("Extension Packaging Error"),
- UTF8ToUTF16(error_message), chrome::MESSAGE_BOX_TYPE_WARNING);
+ PrintPackExtensionMessage(error_message);
}
bool StartupHelper::PackExtension(const CommandLine& cmd_line) {
« 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