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

Side by Side Diff: content/renderer/renderer_main_platform_delegate_android.cc

Issue 2101943004: content: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase/update Created 4 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
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 #include "content/renderer/renderer_main_platform_delegate.h" 5 #include "content/renderer/renderer_main_platform_delegate.h"
6 6
7 #include "base/android/build_info.h" 7 #include "base/android/build_info.h"
8 #include "base/feature_list.h" 8 #include "base/feature_list.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 private: 45 private:
46 SeccompSandboxStatus status_; 46 SeccompSandboxStatus status_;
47 DISALLOW_COPY_AND_ASSIGN(RecordSeccompStatus); 47 DISALLOW_COPY_AND_ASSIGN(RecordSeccompStatus);
48 }; 48 };
49 49
50 #ifdef USE_SECCOMP_BPF 50 #ifdef USE_SECCOMP_BPF
51 // Determines if the running device should support Seccomp, based on the Android 51 // Determines if the running device should support Seccomp, based on the Android
52 // SDK version. 52 // SDK version.
53 bool IsSeccompBPFSupportedBySDK() { 53 bool IsSeccompBPFSupportedBySDK() {
54 const auto info = base::android::BuildInfo::GetInstance(); 54 auto* info = base::android::BuildInfo::GetInstance();
55 if (info->sdk_int() < 22) { 55 if (info->sdk_int() < 22) {
56 // Seccomp was never available pre-Lollipop. 56 // Seccomp was never available pre-Lollipop.
57 return false; 57 return false;
58 } else if (info->sdk_int() == 22) { 58 } else if (info->sdk_int() == 22) {
59 // On Lollipop-MR1, only select Nexus devices have Seccomp available. 59 // On Lollipop-MR1, only select Nexus devices have Seccomp available.
60 const char* const kDevices[] = { 60 const char* const kDevices[] = {
61 "deb", "flo", "hammerhead", "mako", 61 "deb", "flo", "hammerhead", "mako",
62 "manta", "shamu", "sprout", "volantis", 62 "manta", "shamu", "sprout", "volantis",
63 }; 63 };
64 64
65 for (const auto& device : kDevices) { 65 for (auto* device : kDevices) {
66 if (strcmp(device, info->device()) == 0) { 66 if (strcmp(device, info->device()) == 0) {
67 return true; 67 return true;
68 } 68 }
69 } 69 }
70 } else { 70 } else {
71 // On Marshmallow and higher, Seccomp is required by CTS. 71 // On Marshmallow and higher, Seccomp is required by CTS.
72 return true; 72 return true;
73 } 73 }
74 return false; 74 return false;
75 } 75 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 status_uma.set_status(RecordSeccompStatus::ENGAGED); 117 status_uma.set_status(RecordSeccompStatus::ENGAGED);
118 } else { 118 } else {
119 status_uma.set_status(RecordSeccompStatus::FEATURE_DISABLED); 119 status_uma.set_status(RecordSeccompStatus::FEATURE_DISABLED);
120 } 120 }
121 #endif 121 #endif
122 return true; 122 return true;
123 } 123 }
124 124
125 } // namespace content 125 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | content/renderer/scheduler/resource_dispatch_throttler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698