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

Side by Side Diff: chrome/renderer/pepper/ppb_nacl_private_impl.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
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/pepper/ppb_nacl_private_impl.h" 5 #include "chrome/renderer/pepper/ppb_nacl_private_impl.h"
6 6
7 #ifndef DISABLE_NACL 7 #ifndef DISABLE_NACL
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 return; 299 return;
300 g_pnacl_resource_host.Get()->ReportTranslationFinished(instance, success); 300 g_pnacl_resource_host.Get()->ReportTranslationFinished(instance, success);
301 } 301 }
302 302
303 PP_Bool IsOffTheRecord() { 303 PP_Bool IsOffTheRecord() {
304 return PP_FromBool(ChromeRenderProcessObserver::is_incognito_process()); 304 return PP_FromBool(ChromeRenderProcessObserver::is_incognito_process());
305 } 305 }
306 306
307 PP_Bool IsPnaclEnabled() { 307 PP_Bool IsPnaclEnabled() {
308 return PP_FromBool( 308 return PP_FromBool(
309 CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnablePnacl)); 309 !CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisablePnacl));
310 } 310 }
311 311
312 PP_ExternalPluginResult ReportNaClError(PP_Instance instance, 312 PP_ExternalPluginResult ReportNaClError(PP_Instance instance,
313 PP_NaClError error_id) { 313 PP_NaClError error_id) {
314 IPC::Sender* sender = content::RenderThread::Get(); 314 IPC::Sender* sender = content::RenderThread::Get();
315 315
316 if (!sender->Send( 316 if (!sender->Send(
317 new NaClHostMsg_NaClErrorStatus( 317 new NaClHostMsg_NaClErrorStatus(
318 // TODO(dschuff): does this enum need to be sent as an int, 318 // TODO(dschuff): does this enum need to be sent as an int,
319 // or is it safe to include the appropriate headers in 319 // or is it safe to include the appropriate headers in
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 &OpenNaClExecutable 369 &OpenNaClExecutable
370 }; 370 };
371 371
372 } // namespace 372 } // namespace
373 373
374 const PPB_NaCl_Private* PPB_NaCl_Private_Impl::GetInterface() { 374 const PPB_NaCl_Private* PPB_NaCl_Private_Impl::GetInterface() {
375 return &nacl_interface; 375 return &nacl_interface;
376 } 376 }
377 377
378 #endif // DISABLE_NACL 378 #endif // DISABLE_NACL
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.cc ('k') | chrome/test/data/nacl/pnacl_mime_type/pnacl_mime_type.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698