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 <unistd.h> | 8 #include <unistd.h> |
9 | 9 |
10 #include "base/mac/mac_util.h" | 10 #include "base/mac/mac_util.h" |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 .msg_id_swap_integer = 416, | 105 .msg_id_swap_integer = 416, |
106 .look_up2_fill_reply = &LaunchdLookUp2FillReply<look_up2_reply_10_6>, | 106 .look_up2_fill_reply = &LaunchdLookUp2FillReply<look_up2_reply_10_6>, |
107 .swap_integer_is_get_only = | 107 .swap_integer_is_get_only = |
108 &LaunchdSwapIntegerIsGetOnly<swap_integer_request_10_6>, | 108 &LaunchdSwapIntegerIsGetOnly<swap_integer_request_10_6>, |
109 }; | 109 }; |
110 | 110 |
111 if (base::mac::IsOSSnowLeopard()) { | 111 if (base::mac::IsOSSnowLeopard()) { |
112 shim.look_up2_get_request_name = | 112 shim.look_up2_get_request_name = |
113 &LaunchdLookUp2GetRequestName<look_up2_request_10_6>; | 113 &LaunchdLookUp2GetRequestName<look_up2_request_10_6>; |
114 } else if (base::mac::IsOSLionOrLater() && | 114 } else if (base::mac::IsOSLionOrLater() && |
115 !base::mac::IsOSLaterThanMavericks_DontCallThis()) { | 115 !base::mac::IsOSYosemiteOrLater()) { |
116 shim.look_up2_get_request_name = | 116 shim.look_up2_get_request_name = |
117 &LaunchdLookUp2GetRequestName<look_up2_request_10_7>; | 117 &LaunchdLookUp2GetRequestName<look_up2_request_10_7>; |
118 } else { | 118 } else { |
119 DLOG(ERROR) << "Unknown OS, using launchd compatibility shim from 10.7."; | 119 DLOG(ERROR) << "Unknown OS, using launchd compatibility shim from 10.7."; |
120 shim.look_up2_get_request_name = | 120 shim.look_up2_get_request_name = |
121 &LaunchdLookUp2GetRequestName<look_up2_request_10_7>; | 121 &LaunchdLookUp2GetRequestName<look_up2_request_10_7>; |
122 } | 122 } |
123 | 123 |
124 return shim; | 124 return shim; |
125 } | 125 } |
126 | 126 |
127 } // namespace sandbox | 127 } // namespace sandbox |
OLD | NEW |