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

Side by Side Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 19079002: Enable pnacl by default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more --enable-pnacl occurrences and code review fixes Created 7 years, 5 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
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/renderer/chrome_content_renderer_client.h" 5 #include "chrome/renderer/chrome_content_renderer_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 #endif 564 #endif
565 565
566 switch (status_value) { 566 switch (status_value) {
567 case ChromeViewHostMsg_GetPluginInfo_Status::kNotFound: { 567 case ChromeViewHostMsg_GetPluginInfo_Status::kNotFound: {
568 NOTREACHED(); 568 NOTREACHED();
569 break; 569 break;
570 } 570 }
571 case ChromeViewHostMsg_GetPluginInfo_Status::kAllowed: { 571 case ChromeViewHostMsg_GetPluginInfo_Status::kAllowed: {
572 const char* kPnaclMimeType = "application/x-pnacl"; 572 const char* kPnaclMimeType = "application/x-pnacl";
573 if (actual_mime_type == kPnaclMimeType) { 573 if (actual_mime_type == kPnaclMimeType) {
574 if (!CommandLine::ForCurrentProcess()->HasSwitch( 574 if (CommandLine::ForCurrentProcess()->HasSwitch(
575 switches::kEnablePnacl)) { 575 switches::kDisablePnacl)) {
576 frame->addMessageToConsole( 576 frame->addMessageToConsole(
577 WebConsoleMessage( 577 WebConsoleMessage(
578 WebConsoleMessage::LevelError, 578 WebConsoleMessage::LevelError,
579 "Portable Native Client must be enabled in about:flags.")); 579 "Portable Native Client must not be disabled in"
580 " about:flags."));
580 placeholder = PluginPlaceholder::CreateBlockedPlugin( 581 placeholder = PluginPlaceholder::CreateBlockedPlugin(
581 render_view, frame, params, plugin, identifier, group_name, 582 render_view, frame, params, plugin, identifier, group_name,
582 IDR_BLOCKED_PLUGIN_HTML, 583 IDR_BLOCKED_PLUGIN_HTML,
583 #if defined(OS_CHROMEOS) 584 #if defined(OS_CHROMEOS)
584 l10n_util::GetStringUTF16(IDS_NACL_PLUGIN_BLOCKED)); 585 l10n_util::GetStringUTF16(IDS_NACL_PLUGIN_BLOCKED));
585 #else 586 #else
586 l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name)); 587 l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name));
587 #endif 588 #endif
588 break; 589 break;
589 } 590 }
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
1282 if (CommandLine::ForCurrentProcess()->HasSwitch( 1283 if (CommandLine::ForCurrentProcess()->HasSwitch(
1283 switches::kEnablePepperTesting)) { 1284 switches::kEnablePepperTesting)) {
1284 return true; 1285 return true;
1285 } 1286 }
1286 #endif // !defined(OS_ANDROID) 1287 #endif // !defined(OS_ANDROID)
1287 return false; 1288 return false;
1288 } 1289 }
1289 1290
1290 1291
1291 } // namespace chrome 1292 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698