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

Unified Diff: chrome/browser/ui/browser_init.cc

Issue 8348026: Add a component installer for Portable NaCl. Registration of installer is (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 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
Index: chrome/browser/ui/browser_init.cc
diff --git a/chrome/browser/ui/browser_init.cc b/chrome/browser/ui/browser_init.cc
index 7ba03b7aa5b74e058821e6aa8bdf4823538711f5..32c7f6b98044346ab4d6d9e07a330de5df0fa878 100644
--- a/chrome/browser/ui/browser_init.cc
+++ b/chrome/browser/ui/browser_init.cc
@@ -69,6 +69,7 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "chrome/installer/util/browser_distribution.h"
+#include "chrome/nacl/pnacl_component_installer.h"
#include "content/browser/browser_thread.h"
#include "content/browser/child_process_security_policy.h"
#include "content/browser/renderer_host/render_process_host.h"
@@ -527,7 +528,7 @@ void RecordAppLaunches(
}
}
-void RegisterComponentsForUpdate() {
+void RegisterComponentsForUpdate(const CommandLine& command_line) {
ComponentUpdateService* cus = g_browser_process->component_updater();
if (!cus)
return;
@@ -538,6 +539,11 @@ void RegisterComponentsForUpdate() {
RegisterPepperFlashComponent(cus);
RegisterNPAPIFlashComponent(cus);
+ // This developer version of PNaCl should only be installed for developers.
+ if (command_line.HasSwitch(switches::kEnablePNaCl)) {
+ RegisterPNaClComponent(cus);
+ }
+
// CRLSetFetcher attempts to load a CRL set from either the local disk
// or network.
// TODO(agl): this is disabled for now while it's plumbed in.
@@ -1395,7 +1401,7 @@ bool BrowserInit::ProcessCmdLineImpl(const CommandLine& command_line,
if (command_line.HasSwitch(switches::kDisablePromptOnRepost))
NavigationController::DisablePromptOnRepost();
- RegisterComponentsForUpdate();
+ RegisterComponentsForUpdate(command_line);
// Look for the testing channel ID ONLY during process startup
if (command_line.HasSwitch(switches::kTestingChannelID)) {

Powered by Google App Engine
This is Rietveld 408576698