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

Side by Side Diff: ppapi/native_client/src/trusted/plugin/plugin.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 #ifdef _MSC_VER 5 #ifdef _MSC_VER
6 // Do not warn about use of std::copy with raw pointers. 6 // Do not warn about use of std::copy with raw pointers.
7 #pragma warning(disable : 4996) 7 #pragma warning(disable : 4996)
8 #endif 8 #endif
9 9
10 #include "ppapi/native_client/src/trusted/plugin/plugin.h" 10 #include "ppapi/native_client/src/trusted/plugin/plugin.h"
(...skipping 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after
1207 callback_factory_.NewCallback(&Plugin::BitcodeDidTranslate); 1207 callback_factory_.NewCallback(&Plugin::BitcodeDidTranslate);
1208 // Will always call the callback on success or failure. 1208 // Will always call the callback on success or failure.
1209 pnacl_coordinator_.reset( 1209 pnacl_coordinator_.reset(
1210 PnaclCoordinator::BitcodeToNative(this, 1210 PnaclCoordinator::BitcodeToNative(this,
1211 program_url, 1211 program_url,
1212 pnacl_options, 1212 pnacl_options,
1213 translate_callback)); 1213 translate_callback));
1214 return; 1214 return;
1215 } else { 1215 } else {
1216 error_info.SetReport(ERROR_PNACL_NOT_ENABLED, 1216 error_info.SetReport(ERROR_PNACL_NOT_ENABLED,
1217 "PNaCl has not been enabled (e.g., by setting " 1217 "PNaCl has been disabled (e.g., by setting "
1218 "the --enable-pnacl flag)."); 1218 "the --disable-pnacl flag).");
1219 } 1219 }
1220 } else { 1220 } else {
1221 // Try the fast path first. This will only block if the file is installed. 1221 // Try the fast path first. This will only block if the file is installed.
1222 if (OpenURLFast(program_url, &nexe_downloader_)) { 1222 if (OpenURLFast(program_url, &nexe_downloader_)) {
1223 NexeFileDidOpen(PP_OK); 1223 NexeFileDidOpen(PP_OK);
1224 } else { 1224 } else {
1225 pp::CompletionCallback open_callback = 1225 pp::CompletionCallback open_callback =
1226 callback_factory_.NewCallback(&Plugin::NexeFileDidOpen); 1226 callback_factory_.NewCallback(&Plugin::NexeFileDidOpen);
1227 // Will always call the callback on success or failure. 1227 // Will always call the callback on success or failure.
1228 CHECK( 1228 CHECK(
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
1681 static_cast<uint32_t>(text.size())); 1681 static_cast<uint32_t>(text.size()));
1682 const PPB_Console* console_interface = 1682 const PPB_Console* console_interface =
1683 static_cast<const PPB_Console*>( 1683 static_cast<const PPB_Console*>(
1684 module->GetBrowserInterface(PPB_CONSOLE_INTERFACE)); 1684 module->GetBrowserInterface(PPB_CONSOLE_INTERFACE));
1685 console_interface->LogWithSource(pp_instance(), PP_LOGLEVEL_LOG, prefix, str); 1685 console_interface->LogWithSource(pp_instance(), PP_LOGLEVEL_LOG, prefix, str);
1686 var_interface->Release(prefix); 1686 var_interface->Release(prefix);
1687 var_interface->Release(str); 1687 var_interface->Release(str);
1688 } 1688 }
1689 1689
1690 } // namespace plugin 1690 } // namespace plugin
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698