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

Side by Side Diff: chrome/browser/ui/webui/nacl_ui.cc

Issue 23326003: Enable PNaCl by default (revert disabling CL) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes for Jan's comments. Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/common/chrome_content_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/nacl_ui.h" 5 #include "chrome/browser/ui/webui/nacl_ui.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 } 242 }
243 } 243 }
244 AddLineBreak(list); 244 AddLineBreak(list);
245 } 245 }
246 246
247 void NaClDomHandler::AddPnaclInfo(ListValue* list) { 247 void NaClDomHandler::AddPnaclInfo(ListValue* list) {
248 // Display whether PNaCl is enabled. 248 // Display whether PNaCl is enabled.
249 string16 pnacl_enabled_string = ASCIIToUTF16("Enabled"); 249 string16 pnacl_enabled_string = ASCIIToUTF16("Enabled");
250 if (!isPluginEnabled(0)) { 250 if (!isPluginEnabled(0)) {
251 pnacl_enabled_string = ASCIIToUTF16("Disabled in profile prefs"); 251 pnacl_enabled_string = ASCIIToUTF16("Disabled in profile prefs");
252 } else if (!CommandLine::ForCurrentProcess()->HasSwitch( 252 } else if (CommandLine::ForCurrentProcess()->HasSwitch(
253 switches::kEnablePnacl)) { 253 switches::kDisablePnacl)) {
254 pnacl_enabled_string = ASCIIToUTF16("Not enabled by flag '--enable-pnacl'"); 254 pnacl_enabled_string = ASCIIToUTF16("Disabled by flag '--disable-pnacl'");
255 } 255 }
256 AddPair(list, 256 AddPair(list,
257 ASCIIToUTF16("Portable Native Client (PNaCl)"), 257 ASCIIToUTF16("Portable Native Client (PNaCl)"),
258 pnacl_enabled_string); 258 pnacl_enabled_string);
259 259
260 // Obtain the version of the PNaCl translator. 260 // Obtain the version of the PNaCl translator.
261 base::FilePath pnacl_path; 261 base::FilePath pnacl_path;
262 bool got_path = PathService::Get(chrome::DIR_PNACL_COMPONENT, &pnacl_path); 262 bool got_path = PathService::Get(chrome::DIR_PNACL_COMPONENT, &pnacl_path);
263 if (!got_path || pnacl_path.empty() || !pnacl_path_exists_) { 263 if (!got_path || pnacl_path.empty() || !pnacl_path_exists_) {
264 AddPair(list, 264 AddPair(list,
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 383
384 NaClUI::NaClUI(content::WebUI* web_ui) : WebUIController(web_ui) { 384 NaClUI::NaClUI(content::WebUI* web_ui) : WebUIController(web_ui) {
385 content::RecordAction(UserMetricsAction("ViewAboutNaCl")); 385 content::RecordAction(UserMetricsAction("ViewAboutNaCl"));
386 386
387 web_ui->AddMessageHandler(new NaClDomHandler()); 387 web_ui->AddMessageHandler(new NaClDomHandler());
388 388
389 // Set up the about:nacl source. 389 // Set up the about:nacl source.
390 Profile* profile = Profile::FromWebUI(web_ui); 390 Profile* profile = Profile::FromWebUI(web_ui);
391 content::WebUIDataSource::Add(profile, CreateNaClUIHTMLSource()); 391 content::WebUIDataSource::Add(profile, CreateNaClUIHTMLSource());
392 } 392 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/common/chrome_content_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698