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

Side by Side Diff: ppapi/native_client/src/trusted/plugin/plugin.cc

Issue 152133007: [MIPS] Support for MIPS PNaCl in PPAPI (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase. Created 6 years, 10 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
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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 enum NaClOSArch { 206 enum NaClOSArch {
207 kNaClLinux32 = 0, 207 kNaClLinux32 = 0,
208 kNaClLinux64, 208 kNaClLinux64,
209 kNaClLinuxArm, 209 kNaClLinuxArm,
210 kNaClMac32, 210 kNaClMac32,
211 kNaClMac64, 211 kNaClMac64,
212 kNaClMacArm, 212 kNaClMacArm,
213 kNaClWin32, 213 kNaClWin32,
214 kNaClWin64, 214 kNaClWin64,
215 kNaClWinArm, 215 kNaClWinArm,
216 kNaClLinuxMips,
216 kNaClOSArchMax 217 kNaClOSArchMax
217 }; 218 };
218 219
219 NaClOSArch os_arch = kNaClOSArchMax; 220 NaClOSArch os_arch = kNaClOSArchMax;
220 #if NACL_LINUX 221 #if NACL_LINUX
221 os_arch = kNaClLinux32; 222 os_arch = kNaClLinux32;
222 #elif NACL_OSX 223 #elif NACL_OSX
223 os_arch = kNaClMac32; 224 os_arch = kNaClMac32;
224 #elif NACL_WINDOWS 225 #elif NACL_WINDOWS
225 os_arch = kNaClWin32; 226 os_arch = kNaClWin32;
226 #endif 227 #endif
227 228
228 if (sandbox_isa == "x86-64") 229 if (sandbox_isa == "x86-64")
229 os_arch = static_cast<NaClOSArch>(os_arch + 1); 230 os_arch = static_cast<NaClOSArch>(os_arch + 1);
230 if (sandbox_isa == "arm") 231 if (sandbox_isa == "arm")
231 os_arch = static_cast<NaClOSArch>(os_arch + 2); 232 os_arch = static_cast<NaClOSArch>(os_arch + 2);
233 if (sandbox_isa == "mips32")
234 os_arch = kNaClLinuxMips;
232 235
233 HistogramEnumerate("NaCl.Client.OSArch", os_arch, kNaClOSArchMax, -1); 236 HistogramEnumerate("NaCl.Client.OSArch", os_arch, kNaClOSArchMax, -1);
234 } 237 }
235 238
236 void Plugin::HistogramEnumerateLoadStatus(PluginErrorCode error_code, 239 void Plugin::HistogramEnumerateLoadStatus(PluginErrorCode error_code,
237 bool is_installed) { 240 bool is_installed) {
238 HistogramEnumerate("NaCl.LoadStatus.Plugin", error_code, ERROR_MAX, 241 HistogramEnumerate("NaCl.LoadStatus.Plugin", error_code, ERROR_MAX,
239 ERROR_UNKNOWN); 242 ERROR_UNKNOWN);
240 243
241 // Gather data to see if being installed changes load outcomes. 244 // Gather data to see if being installed changes load outcomes.
(...skipping 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after
1480 DCHECK(pp::Module::Get()->core()->IsMainThread()); 1483 DCHECK(pp::Module::Get()->core()->IsMainThread());
1481 DCHECK(nacl_interface_); 1484 DCHECK(nacl_interface_);
1482 exit_status_ = exit_status; 1485 exit_status_ = exit_status;
1483 nacl_interface_->SetReadOnlyProperty(pp_instance(), 1486 nacl_interface_->SetReadOnlyProperty(pp_instance(),
1484 pp::Var("exitStatus").pp_var(), 1487 pp::Var("exitStatus").pp_var(),
1485 pp::Var(exit_status_).pp_var()); 1488 pp::Var(exit_status_).pp_var());
1486 } 1489 }
1487 1490
1488 1491
1489 } // namespace plugin 1492 } // namespace plugin
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698