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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 void ChromeBrowserMainPartsMac::PostMainMessageLoopStart() { | 266 void ChromeBrowserMainPartsMac::PostMainMessageLoopStart() { |
267 MacStartupProfiler::GetInstance()->Profile( | 267 MacStartupProfiler::GetInstance()->Profile( |
268 MacStartupProfiler::POST_MAIN_MESSAGE_LOOP_START); | 268 MacStartupProfiler::POST_MAIN_MESSAGE_LOOP_START); |
269 ChromeBrowserMainPartsPosix::PostMainMessageLoopStart(); | 269 ChromeBrowserMainPartsPosix::PostMainMessageLoopStart(); |
270 } | 270 } |
271 | 271 |
272 void ChromeBrowserMainPartsMac::PreProfileInit() { | 272 void ChromeBrowserMainPartsMac::PreProfileInit() { |
273 MacStartupProfiler::GetInstance()->Profile( | 273 MacStartupProfiler::GetInstance()->Profile( |
274 MacStartupProfiler::PRE_PROFILE_INIT); | 274 MacStartupProfiler::PRE_PROFILE_INIT); |
275 ChromeBrowserMainPartsPosix::PreProfileInit(); | 275 ChromeBrowserMainPartsPosix::PreProfileInit(); |
| 276 |
276 // This is called here so that the app shim socket is only created after | 277 // This is called here so that the app shim socket is only created after |
277 // taking the singleton lock. | 278 // taking the singleton lock. |
278 g_browser_process->platform_part()->app_shim_host_manager()->Init(); | 279 g_browser_process->platform_part()->app_shim_host_manager()->Init(); |
279 AppListService::InitAll(NULL); | 280 AppListService::InitAll(NULL, |
| 281 GetStartupProfilePath(user_data_dir(), parsed_command_line())); |
280 } | 282 } |
281 | 283 |
282 void ChromeBrowserMainPartsMac::PostProfileInit() { | 284 void ChromeBrowserMainPartsMac::PostProfileInit() { |
283 MacStartupProfiler::GetInstance()->Profile( | 285 MacStartupProfiler::GetInstance()->Profile( |
284 MacStartupProfiler::POST_PROFILE_INIT); | 286 MacStartupProfiler::POST_PROFILE_INIT); |
285 ChromeBrowserMainPartsPosix::PostProfileInit(); | 287 ChromeBrowserMainPartsPosix::PostProfileInit(); |
286 g_browser_process->metrics_service()->RecordBreakpadRegistration( | 288 g_browser_process->metrics_service()->RecordBreakpadRegistration( |
287 breakpad::IsCrashReporterEnabled()); | 289 breakpad::IsCrashReporterEnabled()); |
288 } | 290 } |
289 | 291 |
290 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() { | 292 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() { |
291 AppController* appController = [NSApp delegate]; | 293 AppController* appController = [NSApp delegate]; |
292 [appController didEndMainMessageLoop]; | 294 [appController didEndMainMessageLoop]; |
293 } | 295 } |
OLD | NEW |