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

Side by Side Diff: components/nacl/renderer/ppb_nacl_private_impl.cc

Issue 331973002: Pepper: Move more UMA stuff out of trusted plugin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment fix for dmichael Created 6 years, 6 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
« no previous file with comments | « no previous file | ppapi/api/private/ppb_nacl_private.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "components/nacl/renderer/ppb_nacl_private_impl.h" 5 #include "components/nacl/renderer/ppb_nacl_private_impl.h"
6 6
7 #include <numeric> 7 #include <numeric>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1481 matching lines...) Expand 10 before | Expand all | Expand 10 after
1492 if (!load_manager) 1492 if (!load_manager)
1493 return; 1493 return;
1494 1494
1495 // Gather data to see if being installed changes load outcomes. 1495 // Gather data to see if being installed changes load outcomes.
1496 const char* name = load_manager->is_installed() ? 1496 const char* name = load_manager->is_installed() ?
1497 "NaCl.LoadStatus.SelLdr.InstalledApp" : 1497 "NaCl.LoadStatus.SelLdr.InstalledApp" :
1498 "NaCl.LoadStatus.SelLdr.NotInstalledApp"; 1498 "NaCl.LoadStatus.SelLdr.NotInstalledApp";
1499 HistogramEnumerate(name, load_status, max_status); 1499 HistogramEnumerate(name, load_status, max_status);
1500 } 1500 }
1501 1501
1502 void LogTranslateTime(const char* histogram_name,
1503 int64_t time_in_us) {
1504 ppapi::PpapiGlobals::Get()->GetMainThreadMessageLoop()->PostTask(
1505 FROM_HERE,
1506 base::Bind(&HistogramTimeTranslation,
1507 std::string(histogram_name),
1508 time_in_us / 1000));
1509 }
1510
1502 const PPB_NaCl_Private nacl_interface = { 1511 const PPB_NaCl_Private nacl_interface = {
1503 &LaunchSelLdr, 1512 &LaunchSelLdr,
1504 &StartPpapiProxy, 1513 &StartPpapiProxy,
1505 &UrandomFD, 1514 &UrandomFD,
1506 &Are3DInterfacesDisabled, 1515 &Are3DInterfacesDisabled,
1507 &BrokerDuplicateHandle, 1516 &BrokerDuplicateHandle,
1508 &GetReadonlyPnaclFd, 1517 &GetReadonlyPnaclFd,
1509 &CreateTemporaryFile, 1518 &CreateTemporaryFile,
1510 &GetNumberOfProcessors, 1519 &GetNumberOfProcessors,
1511 &PPIsNonSFIModeEnabled, 1520 &PPIsNonSFIModeEnabled,
(...skipping 19 matching lines...) Expand all
1531 &GetManifestBaseURL, 1540 &GetManifestBaseURL,
1532 &ProcessNaClManifest, 1541 &ProcessNaClManifest,
1533 &DevInterfacesEnabled, 1542 &DevInterfacesEnabled,
1534 &ManifestGetProgramURL, 1543 &ManifestGetProgramURL,
1535 &ExternalManifestResolveKey, 1544 &ExternalManifestResolveKey,
1536 &GetPNaClResourceInfo, 1545 &GetPNaClResourceInfo,
1537 &GetCpuFeatureAttrs, 1546 &GetCpuFeatureAttrs,
1538 &PostMessageToJavaScript, 1547 &PostMessageToJavaScript,
1539 &DownloadNexe, 1548 &DownloadNexe,
1540 &DownloadFile, 1549 &DownloadFile,
1541 &ReportSelLdrStatus 1550 &ReportSelLdrStatus,
1551 &LogTranslateTime
1542 }; 1552 };
1543 1553
1544 } // namespace 1554 } // namespace
1545 1555
1546 const PPB_NaCl_Private* GetNaClPrivateInterface() { 1556 const PPB_NaCl_Private* GetNaClPrivateInterface() {
1547 return &nacl_interface; 1557 return &nacl_interface;
1548 } 1558 }
1549 1559
1550 } // namespace nacl 1560 } // namespace nacl
OLDNEW
« no previous file with comments | « no previous file | ppapi/api/private/ppb_nacl_private.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698