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

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

Issue 8430033: Adds a webstorePrivate method for silently installing extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mihai Created 9 years, 1 month 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
Index: chrome/browser/extensions/extension_browsertest.cc
diff --git a/chrome/browser/extensions/extension_browsertest.cc b/chrome/browser/extensions/extension_browsertest.cc
index 771b1adc136e063857fdc19b44d22f6b23321d9d..c49be53abd585635f7561f508b9745d0db11167d 100644
--- a/chrome/browser/extensions/extension_browsertest.cc
+++ b/chrome/browser/extensions/extension_browsertest.cc
@@ -170,16 +170,29 @@ FilePath ExtensionBrowserTest::PackExtension(const FilePath& dir_path) {
return FilePath();
}
+ return PackExtensionWithOptions(dir_path, crx_path, FilePath(), pem_path);
+}
+
+FilePath ExtensionBrowserTest::PackExtensionWithOptions(
+ const FilePath& dir_path,
+ const FilePath& crx_path,
+ const FilePath& pem_path,
+ const FilePath& pem_out_path) {
if (!file_util::PathExists(dir_path)) {
ADD_FAILURE() << "Extension dir not found: " << dir_path.value();
return FilePath();
}
+ if (!file_util::PathExists(pem_path) && pem_out_path.empty()) {
+ ADD_FAILURE() << "Must specify a PEM file or PEM output path";
+ return FilePath();
+ }
+
scoped_ptr<ExtensionCreator> creator(new ExtensionCreator());
if (!creator->Run(dir_path,
crx_path,
- FilePath(), // no existing pem, use empty path
- pem_path)) {
+ pem_path,
+ pem_out_path)) {
ADD_FAILURE() << "ExtensionCreator::Run() failed: "
<< creator->error_message();
return FilePath();
« no previous file with comments | « chrome/browser/extensions/extension_browsertest.h ('k') | chrome/browser/extensions/extension_function_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698