| 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/files/file_path.h" |   11 #include "base/files/file_path.h" | 
|   12 #include "base/mac/bundle_locations.h" |   12 #include "base/mac/bundle_locations.h" | 
|   13 #include "base/mac/mac_util.h" |   13 #include "base/mac/mac_util.h" | 
|   14 #include "base/mac/scoped_nsobject.h" |   14 #include "base/mac/scoped_nsobject.h" | 
|   15 #include "base/metrics/histogram.h" |   15 #include "base/metrics/histogram.h" | 
|   16 #include "base/path_service.h" |   16 #include "base/path_service.h" | 
|   17 #import "chrome/browser/app_controller_mac.h" |   17 #import "chrome/browser/app_controller_mac.h" | 
|   18 #include "chrome/browser/apps/app_shim/app_shim_host_manager_mac.h" |   18 #include "chrome/browser/apps/app_shim/app_shim_host_manager_mac.h" | 
|   19 #include "chrome/browser/browser_process.h" |   19 #include "chrome/browser/browser_process.h" | 
|   20 #import "chrome/browser/chrome_browser_application_mac.h" |   20 #import "chrome/browser/chrome_browser_application_mac.h" | 
|   21 #include "chrome/browser/mac/install_from_dmg.h" |   21 #include "chrome/browser/mac/install_from_dmg.h" | 
|   22 #import "chrome/browser/mac/keystone_glue.h" |   22 #import "chrome/browser/mac/keystone_glue.h" | 
|   23 #include "chrome/browser/mac/mac_startup_profiler.h" |   23 #include "chrome/browser/mac/mac_startup_profiler.h" | 
|   24 #include "chrome/browser/ui/app_list/app_list_service.h" |   24 #include "chrome/browser/ui/app_list/app_list_service.h" | 
|   25 #include "chrome/common/chrome_paths.h" |   25 #include "chrome/common/chrome_paths.h" | 
|   26 #include "chrome/common/chrome_switches.h" |   26 #include "chrome/common/chrome_switches.h" | 
|   27 #include "components/crash/app/breakpad_mac.h" |   27 #include "components/crash/app/crashpad_mac.h" | 
|   28 #include "components/metrics/metrics_service.h" |   28 #include "components/metrics/metrics_service.h" | 
|   29 #include "content/public/common/main_function_params.h" |   29 #include "content/public/common/main_function_params.h" | 
|   30 #include "content/public/common/result_codes.h" |   30 #include "content/public/common/result_codes.h" | 
|   31 #include "ui/base/l10n/l10n_util_mac.h" |   31 #include "ui/base/l10n/l10n_util_mac.h" | 
|   32 #include "ui/base/resource/resource_bundle.h" |   32 #include "ui/base/resource/resource_bundle.h" | 
|   33 #include "ui/base/resource/resource_handle.h" |   33 #include "ui/base/resource/resource_handle.h" | 
|   34  |   34  | 
|   35 namespace { |   35 namespace { | 
|   36  |   36  | 
|   37 // This is one enum instead of two so that the values can be correlated in a |   37 // This is one enum instead of two so that the values can be correlated in a | 
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  285   // taking the singleton lock. |  285   // taking the singleton lock. | 
|  286   g_browser_process->platform_part()->app_shim_host_manager()->Init(); |  286   g_browser_process->platform_part()->app_shim_host_manager()->Init(); | 
|  287   AppListService::InitAll(NULL, |  287   AppListService::InitAll(NULL, | 
|  288       GetStartupProfilePath(user_data_dir(), parsed_command_line())); |  288       GetStartupProfilePath(user_data_dir(), parsed_command_line())); | 
|  289 } |  289 } | 
|  290  |  290  | 
|  291 void ChromeBrowserMainPartsMac::PostProfileInit() { |  291 void ChromeBrowserMainPartsMac::PostProfileInit() { | 
|  292   MacStartupProfiler::GetInstance()->Profile( |  292   MacStartupProfiler::GetInstance()->Profile( | 
|  293       MacStartupProfiler::POST_PROFILE_INIT); |  293       MacStartupProfiler::POST_PROFILE_INIT); | 
|  294   ChromeBrowserMainPartsPosix::PostProfileInit(); |  294   ChromeBrowserMainPartsPosix::PostProfileInit(); | 
 |  295  | 
|  295   g_browser_process->metrics_service()->RecordBreakpadRegistration( |  296   g_browser_process->metrics_service()->RecordBreakpadRegistration( | 
|  296       breakpad::IsCrashReporterEnabled()); |  297       crash_reporter::GetUploadsEnabled()); | 
|  297 } |  298 } | 
|  298  |  299  | 
|  299 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() { |  300 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() { | 
|  300   AppController* appController = [NSApp delegate]; |  301   AppController* appController = [NSApp delegate]; | 
|  301   [appController didEndMainMessageLoop]; |  302   [appController didEndMainMessageLoop]; | 
|  302 } |  303 } | 
| OLD | NEW |