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

Unified Diff: chrome/browser/browser_init.cc

Issue 246085: Hook up --pack-extension on Linux and FreeBSD. (Closed)
Patch Set: duh .. use correct define Created 11 years, 2 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 | chrome/chrome.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_init.cc
diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc
index b551bcf7b9eef3390943778bbd7541626c503ee5..b10aed5af5c9cd648545da741f53906fc113a62d 100644
--- a/chrome/browser/browser_init.cc
+++ b/chrome/browser/browser_init.cc
@@ -28,7 +28,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/browser_window.h"
#include "chrome/browser/defaults.h"
-#if defined(OS_WIN) // TODO(port)
+#if !defined(OS_MACOSX) // TODO(port)
#include "chrome/browser/extensions/extension_creator.h"
#endif
#include "chrome/browser/extensions/extensions_service.h"
@@ -747,11 +747,9 @@ bool BrowserInit::ProcessCmdLineImpl(const CommandLine& command_line,
output_private_key_path.ReplaceExtension(FILE_PATH_LITERAL("pem"));
}
- // TODO(port): Creation & running is removed from mac & linux because
- // ExtensionCreator depends on base/crypto/rsa_private_key and
- // base/crypto/signature_creator, both of which only have windows
- // implementations.
-#if defined(OS_WIN)
+ // TODO(port): Creation & running is removed from Mac because
+ // ExtensionCreator depends on base/crypto/signature_creator
+#if !defined(OS_MACOSX)
scoped_ptr<ExtensionCreator> creator(new ExtensionCreator());
if (creator->Run(src_dir, crx_path, private_key_path,
output_private_key_path)) {
@@ -769,16 +767,24 @@ bool BrowserInit::ProcessCmdLineImpl(const CommandLine& command_line,
message = StringPrintf(L"Created the extension:\n\n%ls",
crx_path.ToWStringHack().c_str());
}
+#if defined(OS_WIN)
win_util::MessageBox(NULL, message, L"Extension Packaging Success",
MB_OK | MB_SETFOREGROUND);
+#else
+ fprintf(stderr, "Extension Packaging Success");
+#endif
} else {
+#if defined(OS_WIN)
win_util::MessageBox(NULL, UTF8ToWide(creator->error_message()),
L"Extension Packaging Error", MB_OK | MB_SETFOREGROUND);
+#else
+ fprintf(stderr, "Extension Packaging Error: %s", creator->error_message().c_str());
+#endif
return false;
}
#else
- NOTIMPLEMENTED() << " extension creation not implemented on POSIX.";
-#endif // defined(OS_WIN)
+ NOTIMPLEMENTED() << " extension creation not implemented on Mac.";
+#endif // !defined(OS_MACOSX)
return false;
}
}
« no previous file with comments | « no previous file | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698