diff options
author | rafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-07 22:42:07 +0000 |
---|---|---|
committer | rafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-07 22:42:07 +0000 |
commit | 3a81f8e49c41feee532d571423c81fc6ac2c751e (patch) | |
tree | abc2483acc813e76f6e3e48cd2c0b17038b53a9d /chrome | |
parent | deb87c8535c2a5bd04152b6f2d2540c5c00bb9f3 (diff) | |
download | chromium_src-3a81f8e49c41feee532d571423c81fc6ac2c751e.zip chromium_src-3a81f8e49c41feee532d571423c81fc6ac2c751e.tar.gz chromium_src-3a81f8e49c41feee532d571423c81fc6ac2c751e.tar.bz2 |
Revert "Reland: HTML Pack Extension Dialog / Linux & Mac Packaging Support. Part 1."
This reverts commit c18585b4bd75664122be8af6ff1170cc5c6efc66.
TBR=tc
Review URL: http://codereview.chromium.org/270015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28331 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/browser_init.cc | 27 | ||||
-rw-r--r-- | chrome/browser/extensions/extensions_service_unittest.cc | 2 | ||||
-rw-r--r-- | chrome/browser/extensions/pack_extension_job.h | 8 | ||||
-rw-r--r-- | chrome/browser/net/chrome_url_request_context.cc | 3 | ||||
-rwxr-xr-x | chrome/chrome.gyp | 7 |
5 files changed, 22 insertions, 25 deletions
diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc index ce0c7f4..b551bcf 100644 --- a/chrome/browser/browser_init.cc +++ b/chrome/browser/browser_init.cc @@ -28,7 +28,9 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/browser_window.h" #include "chrome/browser/defaults.h" +#if defined(OS_WIN) // TODO(port) #include "chrome/browser/extensions/extension_creator.h" +#endif #include "chrome/browser/extensions/extensions_service.h" #include "chrome/browser/extensions/user_script_master.h" #include "chrome/browser/first_run.h" @@ -365,20 +367,6 @@ GURL GetWelcomePageURL() { return GURL(welcome_url); } -void ShowPackExtensionMessage(const std::wstring caption, - const std::wstring message) { -#if defined(OS_WIN) - win_util::MessageBox(NULL, message, caption, MB_OK | MB_SETFOREGROUND); -#else - // Just send caption & text to stdout on mac & linux. - std::string out_text = WideToASCII(caption); - out_text.append("\n\n"); - out_text.append(WideToASCII(message)); - out_text.append("\n"); - printf(out_text.c_str()); -#endif -} - } // namespace // static @@ -763,6 +751,7 @@ bool BrowserInit::ProcessCmdLineImpl(const CommandLine& command_line, // ExtensionCreator depends on base/crypto/rsa_private_key and // base/crypto/signature_creator, both of which only have windows // implementations. +#if defined(OS_WIN) scoped_ptr<ExtensionCreator> creator(new ExtensionCreator()); if (creator->Run(src_dir, crx_path, private_key_path, output_private_key_path)) { @@ -780,12 +769,16 @@ bool BrowserInit::ProcessCmdLineImpl(const CommandLine& command_line, message = StringPrintf(L"Created the extension:\n\n%ls", crx_path.ToWStringHack().c_str()); } - ShowPackExtensionMessage(L"Extension Packaging Success", message); + win_util::MessageBox(NULL, message, L"Extension Packaging Success", + MB_OK | MB_SETFOREGROUND); } else { - ShowPackExtensionMessage(L"Extension Packaging Error", - UTF8ToWide(creator->error_message())); + win_util::MessageBox(NULL, UTF8ToWide(creator->error_message()), + L"Extension Packaging Error", MB_OK | MB_SETFOREGROUND); return false; } +#else + NOTIMPLEMENTED() << " extension creation not implemented on POSIX."; +#endif // defined(OS_WIN) return false; } } diff --git a/chrome/browser/extensions/extensions_service_unittest.cc b/chrome/browser/extensions/extensions_service_unittest.cc index 57ae6f6..fa257e0 100644 --- a/chrome/browser/extensions/extensions_service_unittest.cc +++ b/chrome/browser/extensions/extensions_service_unittest.cc @@ -727,6 +727,7 @@ TEST_F(ExtensionsServiceTest, InstallExtension) { // TODO(erikkay): add tests for upgrade cases. } +#if defined(OS_WIN) // TODO(port) // Test Packaging and installing an extension. // TODO(rafaelw): add more tests for failure cases. TEST_F(ExtensionsServiceTest, PackExtension) { @@ -790,6 +791,7 @@ TEST_F(ExtensionsServiceTest, PackExtensionOpenSSLKey) { file_util::Delete(crx_path, false); } +#endif // defined(OS_WIN) TEST_F(ExtensionsServiceTest, InstallTheme) { InitializeEmptyExtensionsService(); diff --git a/chrome/browser/extensions/pack_extension_job.h b/chrome/browser/extensions/pack_extension_job.h index 8c3cf26..ec00f21 100644 --- a/chrome/browser/extensions/pack_extension_job.h +++ b/chrome/browser/extensions/pack_extension_job.h @@ -2,9 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_EXTENSIONS_PACK_EXTENSION_JOB_UI_H_ -#define CHROME_BROWSER_EXTENSIONS_PACK_EXTENSION_JOB_UI_H_ - #include <string> #include "base/file_path.h" @@ -14,7 +11,7 @@ class MessageLoop; // Manages packing an extension on the file thread and reporting the result // back to the UI. -class PackExtensionJob : public base::RefCountedThreadSafe<PackExtensionJob> { +class PackExtensionJob : public base::RefCounted<PackExtensionJob> { public: // Interface for people who want to use PackExtensionJob to implement. @@ -49,6 +46,3 @@ class PackExtensionJob : public base::RefCountedThreadSafe<PackExtensionJob> { DISALLOW_COPY_AND_ASSIGN(PackExtensionJob); }; - -#endif // CHROME_BROWSER_EXTENSIONS_PACK_EXTENSION_JOB_UI_H_ - diff --git a/chrome/browser/net/chrome_url_request_context.cc b/chrome/browser/net/chrome_url_request_context.cc index 2918b1f..2c68419 100644 --- a/chrome/browser/net/chrome_url_request_context.cc +++ b/chrome/browser/net/chrome_url_request_context.cc @@ -520,8 +520,9 @@ void ChromeURLRequestContext::OnDefaultCharsetChange( void ChromeURLRequestContext::OnNewExtensions(const std::string& id, const FilePath& path) { - if (!is_off_the_record_) + if (!is_off_the_record_) { extension_paths_[id] = path; + } } void ChromeURLRequestContext::OnUnloadedExtension(const std::string& id) { diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index c2b4ce5..fb39caf 100755 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -2753,6 +2753,11 @@ ['exclude', '^browser/tab_contents/tab_contents_view_gtk.h'], ['exclude', '^browser/tab_contents/render_view_context_menu_gtk.cc'], ['exclude', '^browser/tab_contents/render_view_context_menu_gtk.h'], + # This compiles but has Linux shared build linking issues due to + # missing rsa_private_key functions. + ['exclude', '^browser/extensions/extension_creator.cc'], + # This compiles but it needs extension_creator. + ['exclude', '^browser/extensions/pack_extension_job.cc'], # Overlaps with browser/views/frame/browser_view.cc ['exclude', '^browser/browser_list_gtk.cc'], ], @@ -2840,6 +2845,8 @@ 'browser/bookmarks/bookmark_menu_controller.h', 'browser/browser_accessibility.cc', 'browser/browser_accessibility_manager.cc', + 'browser/extensions/extension_creator.cc', + 'browser/extensions/pack_extension_job.cc', 'browser/dom_ui/html_dialog_contents.cc', 'browser/external_tab_container.cc', 'browser/google_update.cc', |