Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "chrome/browser/chrome_browser_main_mac.h" | 5 #include "chrome/browser/chrome_browser_main_mac.h" |
| 6 | 6 |
| 7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
| 8 #include <sys/sysctl.h> | 8 #include <sys/sysctl.h> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 55 SNOW_LEOPARD_64, | 55 SNOW_LEOPARD_64, |
| 56 LION_32, // Unexpected, Lion requires a 64-bit CPU. | 56 LION_32, // Unexpected, Lion requires a 64-bit CPU. |
| 57 LION_64, | 57 LION_64, |
| 58 MOUNTAIN_LION_32, // Unexpected, Mountain Lion requires a 64-bit CPU. | 58 MOUNTAIN_LION_32, // Unexpected, Mountain Lion requires a 64-bit CPU. |
| 59 MOUNTAIN_LION_64, | 59 MOUNTAIN_LION_64, |
| 60 | 60 |
| 61 // DON'T add new constants here. It's important to keep the constant values, | 61 // DON'T add new constants here. It's important to keep the constant values, |
| 62 // um, constant. Add new constants at the bottom. | 62 // um, constant. Add new constants at the bottom. |
| 63 | 63 |
| 64 // Newer than any known cat. | 64 // Newer than any known cat. |
| 65 FUTURE_CAT_32, // Unexpected, it's unlikely Apple will un-obsolete old CPUs. | 65 FUTURE_CAT_32, // Unexpected, it's unlikely Apple will un-obsolete old CPUs. |
|
Mark Mentovai
2013/10/01 18:30:59
Since there’s no 10.10 in the wild yet in any subs
Avi (use Gerrit)
2013/10/01 19:24:22
Done.
| |
| 66 FUTURE_CAT_64, | 66 FUTURE_CAT_64, |
| 67 | 67 |
| 68 // What if the bitsiness of the CPU can't be determined? | 68 // What if the bitsiness of the CPU can't be determined? |
| 69 SABER_TOOTHED_CAT_DUNNO, | 69 SABER_TOOTHED_CAT_DUNNO, |
| 70 SNOW_LEOPARD_DUNNO, | 70 SNOW_LEOPARD_DUNNO, |
| 71 LION_DUNNO, | 71 LION_DUNNO, |
| 72 MOUNTAIN_LION_DUNNO, | 72 MOUNTAIN_LION_DUNNO, |
| 73 FUTURE_CAT_DUNNO, | 73 FUTURE_CAT_DUNNO, |
| 74 | 74 |
| 75 // Add new constants here. | 75 // Add new constants here. |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 107 SNOW_LEOPARD_DUNNO; | 107 SNOW_LEOPARD_DUNNO; |
| 108 } | 108 } |
| 109 if (base::mac::IsOSLion()) { | 109 if (base::mac::IsOSLion()) { |
| 110 return cpu64_known ? (cpu64 ? LION_64 : LION_32) : | 110 return cpu64_known ? (cpu64 ? LION_64 : LION_32) : |
| 111 LION_DUNNO; | 111 LION_DUNNO; |
| 112 } | 112 } |
| 113 if (base::mac::IsOSMountainLion()) { | 113 if (base::mac::IsOSMountainLion()) { |
| 114 return cpu64_known ? (cpu64 ? MOUNTAIN_LION_64 : MOUNTAIN_LION_32) : | 114 return cpu64_known ? (cpu64 ? MOUNTAIN_LION_64 : MOUNTAIN_LION_32) : |
| 115 MOUNTAIN_LION_DUNNO; | 115 MOUNTAIN_LION_DUNNO; |
| 116 } | 116 } |
| 117 if (base::mac::IsOSLaterThanMountainLion_DontCallThis()) { | 117 if (base::mac::IsOSMavericksOrLater()) { |
| 118 return cpu64_known ? (cpu64 ? FUTURE_CAT_64 : FUTURE_CAT_32) : | 118 return cpu64_known ? (cpu64 ? FUTURE_CAT_64 : FUTURE_CAT_32) : |
| 119 FUTURE_CAT_DUNNO; | 119 FUTURE_CAT_DUNNO; |
| 120 } | 120 } |
| 121 | 121 |
| 122 // If it's not any of the expected OS versions or later than them, it must | 122 // If it's not any of the expected OS versions or later than them, it must |
| 123 // be prehistoric. | 123 // be prehistoric. |
| 124 return cpu64_known ? (cpu64 ? SABER_TOOTHED_CAT_64 : SABER_TOOTHED_CAT_32) : | 124 return cpu64_known ? (cpu64 ? SABER_TOOTHED_CAT_64 : SABER_TOOTHED_CAT_32) : |
| 125 SABER_TOOTHED_CAT_DUNNO; | 125 SABER_TOOTHED_CAT_DUNNO; |
| 126 } | 126 } |
| 127 | 127 |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 260 void ChromeBrowserMainPartsMac::PostProfileInit() { | 260 void ChromeBrowserMainPartsMac::PostProfileInit() { |
| 261 ChromeBrowserMainPartsPosix::PostProfileInit(); | 261 ChromeBrowserMainPartsPosix::PostProfileInit(); |
| 262 g_browser_process->metrics_service()->RecordBreakpadRegistration( | 262 g_browser_process->metrics_service()->RecordBreakpadRegistration( |
| 263 IsCrashReporterEnabled()); | 263 IsCrashReporterEnabled()); |
| 264 } | 264 } |
| 265 | 265 |
| 266 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() { | 266 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() { |
| 267 AppController* appController = [NSApp delegate]; | 267 AppController* appController = [NSApp delegate]; |
| 268 [appController didEndMainMessageLoop]; | 268 [appController didEndMainMessageLoop]; |
| 269 } | 269 } |
| OLD | NEW |