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

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: 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 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 #endif 565 #endif
566 566
567 switch (status_value) { 567 switch (status_value) {
568 case ChromeViewHostMsg_GetPluginInfo_Status::kNotFound: { 568 case ChromeViewHostMsg_GetPluginInfo_Status::kNotFound: {
569 NOTREACHED(); 569 NOTREACHED();
570 break; 570 break;
571 } 571 }
572 case ChromeViewHostMsg_GetPluginInfo_Status::kAllowed: { 572 case ChromeViewHostMsg_GetPluginInfo_Status::kAllowed: {
573 const char* kPnaclMimeType = "application/x-pnacl"; 573 const char* kPnaclMimeType = "application/x-pnacl";
574 if (actual_mime_type == kPnaclMimeType) { 574 if (actual_mime_type == kPnaclMimeType) {
575 if (!CommandLine::ForCurrentProcess()->HasSwitch( 575 if (CommandLine::ForCurrentProcess()->HasSwitch(
576 switches::kEnablePnacl)) { 576 switches::kDisablePnacl)) {
577 frame->addMessageToConsole( 577 frame->addMessageToConsole(
578 WebConsoleMessage( 578 WebConsoleMessage(
579 WebConsoleMessage::LevelError, 579 WebConsoleMessage::LevelError,
580 "Portable Native Client must be enabled in about:flags.")); 580 "Portable Native Client must not be disabled in"
581 " about:flags."));
581 placeholder = PluginPlaceholder::CreateBlockedPlugin( 582 placeholder = PluginPlaceholder::CreateBlockedPlugin(
582 render_view, frame, params, plugin, identifier, group_name, 583 render_view, frame, params, plugin, identifier, group_name,
583 IDR_BLOCKED_PLUGIN_HTML, 584 IDR_BLOCKED_PLUGIN_HTML,
584 #if defined(OS_CHROMEOS) 585 #if defined(OS_CHROMEOS)
585 l10n_util::GetStringUTF16(IDS_NACL_PLUGIN_BLOCKED)); 586 l10n_util::GetStringUTF16(IDS_NACL_PLUGIN_BLOCKED));
586 #else 587 #else
587 l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name)); 588 l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name));
588 #endif 589 #endif
589 break; 590 break;
590 } 591 }
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
1278 if (CommandLine::ForCurrentProcess()->HasSwitch( 1279 if (CommandLine::ForCurrentProcess()->HasSwitch(
1279 switches::kEnablePepperTesting)) { 1280 switches::kEnablePepperTesting)) {
1280 return true; 1281 return true;
1281 } 1282 }
1282 #endif // !defined(OS_ANDROID) 1283 #endif // !defined(OS_ANDROID)
1283 return false; 1284 return false;
1284 } 1285 }
1285 1286
1286 1287
1287 } // namespace chrome 1288 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698