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

Side by Side Diff: base/android/library_loader/library_prefetcher.cc

Issue 1543293003: Switch to standard integer types in base/android/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "base/android/library_loader/library_prefetcher.h" 5 #include "base/android/library_loader/library_prefetcher.h"
6 6
7 #include <stddef.h>
7 #include <sys/mman.h> 8 #include <sys/mman.h>
8 #include <sys/resource.h> 9 #include <sys/resource.h>
9 #include <sys/wait.h> 10 #include <sys/wait.h>
10 #include <unistd.h> 11 #include <unistd.h>
11 #include <algorithm> 12 #include <algorithm>
12 #include <utility> 13 #include <utility>
13 #include <vector> 14 #include <vector>
14 15
15 #include "base/macros.h" 16 #include "base/macros.h"
16 #include "base/metrics/histogram_macros.h" 17 #include "base/metrics/histogram_macros.h"
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 std::count_if(is_page_resident.begin(), is_page_resident.end(), 193 std::count_if(is_page_resident.begin(), is_page_resident.end(),
193 [](unsigned char x) { return x & 1; }); 194 [](unsigned char x) { return x & 1; });
194 } 195 }
195 if (total_pages == 0) 196 if (total_pages == 0)
196 return -1; 197 return -1;
197 return static_cast<int>((100 * resident_pages) / total_pages); 198 return static_cast<int>((100 * resident_pages) / total_pages);
198 } 199 }
199 200
200 } // namespace android 201 } // namespace android
201 } // namespace base 202 } // namespace base
OLDNEW
« no previous file with comments | « base/android/library_loader/library_prefetcher.h ('k') | base/android/library_loader/library_prefetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698