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

Unified Diff: chrome/browser/ui/startup/startup_browser_creator.cc

Issue 12660017: Add a commandline flag to chrome to validate crx files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: small cleanup to string handling Created 7 years, 9 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 | « chrome/browser/extensions/startup_helper_browsertest.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/startup/startup_browser_creator.cc
diff --git a/chrome/browser/ui/startup/startup_browser_creator.cc b/chrome/browser/ui/startup/startup_browser_creator.cc
index 250048b6d00e2b12e26647f2a52ff7c11587b0fc..1a253225ef46121c0a6c16c7a1c7cfa589653d4d 100644
--- a/chrome/browser/ui/startup/startup_browser_creator.cc
+++ b/chrome/browser/ui/startup/startup_browser_creator.cc
@@ -542,6 +542,24 @@ bool StartupBrowserCreator::ProcessCmdLineImpl(
return false;
}
+ if (command_line.HasSwitch(switches::kValidateCrx)) {
+ if (!process_startup) {
+ LOG(ERROR) << "chrome is already running; you must close all running "
+ << "instances before running with the --"
+ << switches::kValidateCrx << " flag";
+ return false;
+ }
+ extensions::StartupHelper helper;
+ std::string message;
+ std::string error;
+ if (helper.ValidateCrx(command_line, &error))
+ message = std::string("ValidateCrx Success");
+ else
+ message = std::string("ValidateCrx Failure: ") + error;
+ printf("%s\n", message.c_str());
sky 2013/03/26 23:16:10 LOG?
+ return false;
+ }
+
if (command_line.HasSwitch(switches::kLimitedInstallFromWebstore)) {
extensions::StartupHelper helper;
helper.LimitedInstallFromWebstore(command_line, last_used_profile,
« no previous file with comments | « chrome/browser/extensions/startup_helper_browsertest.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698