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/app/chrome_main_delegate.h" | 5 #include "chrome/app/chrome_main_delegate.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
333 #endif // OS_POSIX | 333 #endif // OS_POSIX |
334 | 334 |
335 struct MainFunction { | 335 struct MainFunction { |
336 const char* name; | 336 const char* name; |
337 int (*function)(const content::MainFunctionParams&); | 337 int (*function)(const content::MainFunctionParams&); |
338 }; | 338 }; |
339 | 339 |
340 } // namespace | 340 } // namespace |
341 | 341 |
342 ChromeMainDelegate::ChromeMainDelegate() { | 342 ChromeMainDelegate::ChromeMainDelegate() { |
343 #if !defined(OS_ANDROID) | |
jam
2013/08/29 15:16:17
nit: this would be slightly easier to read if the
aberent
2013/08/29 16:19:44
Done.
| |
343 startup_metric_utils::RecordMainEntryPointTime(); | 344 startup_metric_utils::RecordMainEntryPointTime(); |
345 #else | |
346 // On Android the main entry point time is the time when the Java code starts. | |
347 // This happens before the shared library containing this code is even loaded. | |
348 // The Java startup code has recorded that time, but the C++ code can't fetch it | |
349 // from the Java side until it has initialized the JNI. See | |
350 // ChromeMainDelegateAndroid. | |
351 #endif | |
344 } | 352 } |
345 | 353 |
346 ChromeMainDelegate::~ChromeMainDelegate() { | 354 ChromeMainDelegate::~ChromeMainDelegate() { |
347 } | 355 } |
348 | 356 |
349 bool ChromeMainDelegate::BasicStartupComplete(int* exit_code) { | 357 bool ChromeMainDelegate::BasicStartupComplete(int* exit_code) { |
350 #if defined(OS_CHROMEOS) | 358 #if defined(OS_CHROMEOS) |
351 chromeos::BootTimesLoader::Get()->SaveChromeMainStats(); | 359 chromeos::BootTimesLoader::Get()->SaveChromeMainStats(); |
352 #endif | 360 #endif |
353 | 361 |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
857 } | 865 } |
858 | 866 |
859 content::ContentUtilityClient* | 867 content::ContentUtilityClient* |
860 ChromeMainDelegate::CreateContentUtilityClient() { | 868 ChromeMainDelegate::CreateContentUtilityClient() { |
861 #if defined(CHROME_MULTIPLE_DLL_BROWSER) | 869 #if defined(CHROME_MULTIPLE_DLL_BROWSER) |
862 return NULL; | 870 return NULL; |
863 #else | 871 #else |
864 return &g_chrome_content_utility_client.Get(); | 872 return &g_chrome_content_utility_client.Get(); |
865 #endif | 873 #endif |
866 } | 874 } |
OLD | NEW |