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

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: added browser test 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
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..fd2e6ede86a796542d099b167ff029f075a302ed 100644
--- a/chrome/browser/ui/startup/startup_browser_creator.cc
+++ b/chrome/browser/ui/startup/startup_browser_creator.cc
@@ -542,6 +542,18 @@ 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;
+ helper.ValidateCrx(command_line);
+ return false;
+ }
+
if (command_line.HasSwitch(switches::kLimitedInstallFromWebstore)) {
extensions::StartupHelper helper;
helper.LimitedInstallFromWebstore(command_line, last_used_profile,

Powered by Google App Engine
This is Rietveld 408576698