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

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: 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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 sample = out_of_range_replacement; 214 sample = out_of_range_replacement;
215 } 215 }
216 uma_interface_.HistogramEnumeration(name, sample, maximum); 216 uma_interface_.HistogramEnumeration(name, sample, maximum);
217 } 217 }
218 218
219 void Plugin::HistogramEnumerateOsArch(const std::string& sandbox_isa) { 219 void Plugin::HistogramEnumerateOsArch(const std::string& sandbox_isa) {
220 enum NaClOSArch { 220 enum NaClOSArch {
221 kNaClLinux32 = 0, 221 kNaClLinux32 = 0,
222 kNaClLinux64, 222 kNaClLinux64,
223 kNaClLinuxArm, 223 kNaClLinuxArm,
224 kNaClLinuxMips,
224 kNaClMac32, 225 kNaClMac32,
225 kNaClMac64, 226 kNaClMac64,
226 kNaClMacArm, 227 kNaClMacArm,
dmichael (off chromium) 2014/02/05 23:55:22 I believe these enum values have to be stable, so
petarj 2014/02/06 00:38:48 Done.
jvoung (off chromium) 2014/02/06 00:39:56 I think we need to update server to know of the ne
227 kNaClWin32, 228 kNaClWin32,
228 kNaClWin64, 229 kNaClWin64,
229 kNaClWinArm, 230 kNaClWinArm,
230 kNaClOSArchMax 231 kNaClOSArchMax
231 }; 232 };
232 233
233 NaClOSArch os_arch = kNaClOSArchMax; 234 NaClOSArch os_arch = kNaClOSArchMax;
234 #if NACL_LINUX 235 #if NACL_LINUX
235 os_arch = kNaClLinux32; 236 os_arch = kNaClLinux32;
236 #elif NACL_OSX 237 #elif NACL_OSX
237 os_arch = kNaClMac32; 238 os_arch = kNaClMac32;
238 #elif NACL_WINDOWS 239 #elif NACL_WINDOWS
239 os_arch = kNaClWin32; 240 os_arch = kNaClWin32;
240 #endif 241 #endif
241 242
242 if (sandbox_isa == "x86-64") 243 if (sandbox_isa == "x86-64")
243 os_arch = static_cast<NaClOSArch>(os_arch + 1); 244 os_arch = static_cast<NaClOSArch>(os_arch + 1);
244 if (sandbox_isa == "arm") 245 if (sandbox_isa == "arm")
245 os_arch = static_cast<NaClOSArch>(os_arch + 2); 246 os_arch = static_cast<NaClOSArch>(os_arch + 2);
247 if (sandbox_isa == "mips")
248 os_arch = static_cast<NaClOSArch>(os_arch + 3);
dmichael (off chromium) 2014/02/05 23:55:22 If mips only makes sense on linux, maybe you shoul
petarj 2014/02/06 00:38:48 Done.
246 249
247 HistogramEnumerate("NaCl.Client.OSArch", os_arch, kNaClOSArchMax, -1); 250 HistogramEnumerate("NaCl.Client.OSArch", os_arch, kNaClOSArchMax, -1);
248 } 251 }
249 252
250 void Plugin::HistogramEnumerateLoadStatus(PluginErrorCode error_code, 253 void Plugin::HistogramEnumerateLoadStatus(PluginErrorCode error_code,
251 bool is_installed) { 254 bool is_installed) {
252 HistogramEnumerate("NaCl.LoadStatus.Plugin", error_code, ERROR_MAX, 255 HistogramEnumerate("NaCl.LoadStatus.Plugin", error_code, ERROR_MAX,
253 ERROR_UNKNOWN); 256 ERROR_UNKNOWN);
254 257
255 // Gather data to see if being installed changes load outcomes. 258 // Gather data to see if being installed changes load outcomes.
(...skipping 1322 matching lines...) Expand 10 before | Expand all | Expand 10 after
1578 DCHECK(pp::Module::Get()->core()->IsMainThread()); 1581 DCHECK(pp::Module::Get()->core()->IsMainThread());
1579 DCHECK(nacl_interface_); 1582 DCHECK(nacl_interface_);
1580 exit_status_ = exit_status; 1583 exit_status_ = exit_status;
1581 nacl_interface_->SetReadOnlyProperty(pp_instance(), 1584 nacl_interface_->SetReadOnlyProperty(pp_instance(),
1582 pp::Var("exitStatus").pp_var(), 1585 pp::Var("exitStatus").pp_var(),
1583 pp::Var(exit_status_).pp_var()); 1586 pp::Var(exit_status_).pp_var());
1584 } 1587 }
1585 1588
1586 1589
1587 } // namespace plugin 1590 } // namespace plugin
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698