OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "sandbox/mac/os_compatibility.h" | 5 #include "sandbox/mac/os_compatibility.h" |
6 | 6 |
7 #include <servers/bootstrap.h> | 7 #include <servers/bootstrap.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 #include <unistd.h> | 10 #include <unistd.h> |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 return xpc_dictionary_get_bool(message.xpc, "set") == false && | 174 return xpc_dictionary_get_bool(message.xpc, "set") == false && |
175 xpc_dictionary_get_uint64(message.xpc, "ingsk") == 0 && | 175 xpc_dictionary_get_uint64(message.xpc, "ingsk") == 0 && |
176 xpc_dictionary_get_int64(message.xpc, "in") == 0; | 176 xpc_dictionary_get_int64(message.xpc, "in") == 0; |
177 } | 177 } |
178 }; | 178 }; |
179 | 179 |
180 } // namespace | 180 } // namespace |
181 | 181 |
182 // static | 182 // static |
183 std::unique_ptr<OSCompatibility> OSCompatibility::CreateForPlatform() { | 183 std::unique_ptr<OSCompatibility> OSCompatibility::CreateForPlatform() { |
184 if (base::mac::IsOS10_9()) | 184 if (base::mac::IsAtLeastOS10_10()) |
| 185 return base::WrapUnique(new OSCompatibility_10_10()); |
| 186 else |
185 return base::WrapUnique(new OSCompatibility_10_7()); | 187 return base::WrapUnique(new OSCompatibility_10_7()); |
186 else | |
187 return base::WrapUnique(new OSCompatibility_10_10()); | |
188 } | 188 } |
189 | 189 |
190 OSCompatibility::~OSCompatibility() {} | 190 OSCompatibility::~OSCompatibility() {} |
191 | 191 |
192 } // namespace sandbox | 192 } // namespace sandbox |
OLD | NEW |