| 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" |
| 11 #include "base/debug/debugger.h" | |
| 12 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
| 13 #include "base/mac/bundle_locations.h" | 12 #include "base/mac/bundle_locations.h" |
| 14 #include "base/mac/mac_util.h" | 13 #include "base/mac/mac_util.h" |
| 15 #include "base/mac/scoped_nsobject.h" | 14 #include "base/mac/scoped_nsobject.h" |
| 16 #include "base/metrics/histogram.h" | 15 #include "base/metrics/histogram.h" |
| 17 #include "base/path_service.h" | 16 #include "base/path_service.h" |
| 18 #include "chrome/app/breakpad_mac.h" | 17 #include "chrome/app/breakpad_mac.h" |
| 19 #import "chrome/browser/app_controller_mac.h" | 18 #import "chrome/browser/app_controller_mac.h" |
| 20 #import "chrome/browser/chrome_browser_application_mac.h" | 19 #import "chrome/browser/chrome_browser_application_mac.h" |
| 21 #include "chrome/browser/mac/install_from_dmg.h" | 20 #include "chrome/browser/mac/install_from_dmg.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 COMPILE_ASSERT(kMaxCatsAndSixtyFours >= CAT_SIXTY_FOUR_MAX, | 142 COMPILE_ASSERT(kMaxCatsAndSixtyFours >= CAT_SIXTY_FOUR_MAX, |
| 144 CatSixtyFour_enum_grew_too_large); | 143 CatSixtyFour_enum_grew_too_large); |
| 145 | 144 |
| 146 UMA_HISTOGRAM_ENUMERATION("OSX.CatSixtyFour", | 145 UMA_HISTOGRAM_ENUMERATION("OSX.CatSixtyFour", |
| 147 cat_sixty_four, | 146 cat_sixty_four, |
| 148 kMaxCatsAndSixtyFours); | 147 kMaxCatsAndSixtyFours); |
| 149 } | 148 } |
| 150 | 149 |
| 151 } // namespace | 150 } // namespace |
| 152 | 151 |
| 153 void RecordBreakpadStatusUMA(MetricsService* metrics) { | |
| 154 metrics->RecordBreakpadRegistration(IsCrashReporterEnabled()); | |
| 155 metrics->RecordBreakpadHasDebugger(base::debug::BeingDebugged()); | |
| 156 } | |
| 157 | |
| 158 void WarnAboutMinimumSystemRequirements() { | |
| 159 // Nothing to check for on Mac right now. | |
| 160 } | |
| 161 | |
| 162 // From browser_main_win.h, stubs until we figure out the right thing... | |
| 163 | |
| 164 int DoUninstallTasks(bool chrome_still_running) { | |
| 165 return content::RESULT_CODE_NORMAL_EXIT; | |
| 166 } | |
| 167 | |
| 168 // ChromeBrowserMainPartsMac --------------------------------------------------- | 152 // ChromeBrowserMainPartsMac --------------------------------------------------- |
| 169 | 153 |
| 170 ChromeBrowserMainPartsMac::ChromeBrowserMainPartsMac( | 154 ChromeBrowserMainPartsMac::ChromeBrowserMainPartsMac( |
| 171 const content::MainFunctionParams& parameters) | 155 const content::MainFunctionParams& parameters) |
| 172 : ChromeBrowserMainPartsPosix(parameters) { | 156 : ChromeBrowserMainPartsPosix(parameters) { |
| 173 } | 157 } |
| 174 | 158 |
| 175 ChromeBrowserMainPartsMac::~ChromeBrowserMainPartsMac() { | 159 ChromeBrowserMainPartsMac::~ChromeBrowserMainPartsMac() { |
| 176 } | 160 } |
| 177 | 161 |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 [[NSUserDefaults standardUserDefaults] | 263 [[NSUserDefaults standardUserDefaults] |
| 280 setObject:@"NO" forKey:@"NSTreatUnknownArgumentsAsOpen"]; | 264 setObject:@"NO" forKey:@"NSTreatUnknownArgumentsAsOpen"]; |
| 281 } | 265 } |
| 282 | 266 |
| 283 void ChromeBrowserMainPartsMac::PreProfileInit() { | 267 void ChromeBrowserMainPartsMac::PreProfileInit() { |
| 284 storage_monitor_.reset(new chrome::StorageMonitorMac()); | 268 storage_monitor_.reset(new chrome::StorageMonitorMac()); |
| 285 | 269 |
| 286 ChromeBrowserMainPartsPosix::PreProfileInit(); | 270 ChromeBrowserMainPartsPosix::PreProfileInit(); |
| 287 } | 271 } |
| 288 | 272 |
| 273 void ChromeBrowserMainPartsMac::PostProfileInit() { |
| 274 ChromeBrowserMainPartsPosix::PostProfileInit(); |
| 275 metrics->RecordBreakpadRegistration(IsCrashReporterEnabled()); |
| 276 } |
| 277 |
| 289 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() { | 278 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() { |
| 290 AppController* appController = [NSApp delegate]; | 279 AppController* appController = [NSApp delegate]; |
| 291 [appController didEndMainMessageLoop]; | 280 [appController didEndMainMessageLoop]; |
| 292 } | 281 } |
| OLD | NEW |