Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Side by Side Diff: chrome/app/chrome_main_delegate.cc

Issue 23443009: [Android] Support startup histogram. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [Android] Support startup histogram - fix missing copyright notice Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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)
344 // On Android the main entry point time is the time when the Java code starts.
345 // This happens before the shared library containing this code is even loaded.
346 // The Java startup code has recorded that time, but the C++ code can't fetch it
347 // from the Java side until it has initialized the JNI. See
348 // ChromeMainDelegateAndroid.
349 #else
343 startup_metric_utils::RecordMainEntryPointTime(); 350 startup_metric_utils::RecordMainEntryPointTime();
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
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 }
OLDNEW
« no previous file with comments | « chrome/app/android/chrome_main_delegate_android.cc ('k') | chrome/browser/android/chrome_jni_registrar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698