This source file includes following definitions.
- PreProfileInit
- PreEarlyInitialization
- ShowMissingLocaleMessageBox
#include "chrome/browser/chrome_browser_main_android.h"
#include "base/command_line.h"
#include "base/debug/trace_event.h"
#include "base/path_service.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "components/breakpad/app/breakpad_linux.h"
#include "components/breakpad/browser/crash_dump_manager_android.h"
#include "content/public/browser/android/compositor.h"
#include "content/public/common/main_function_params.h"
#include "net/android/network_change_notifier_factory_android.h"
#include "net/base/network_change_notifier.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_paths.h"
ChromeBrowserMainPartsAndroid::ChromeBrowserMainPartsAndroid(
const content::MainFunctionParams& parameters)
: ChromeBrowserMainParts(parameters) {
}
ChromeBrowserMainPartsAndroid::~ChromeBrowserMainPartsAndroid() {
}
void ChromeBrowserMainPartsAndroid::PreProfileInit() {
TRACE_EVENT0("startup", "ChromeBrowserMainPartsAndroid::PreProfileInit")
#if defined(GOOGLE_CHROME_BUILD)
bool breakpad_enabled = true;
#else
bool breakpad_enabled = false;
#endif
if (!breakpad_enabled)
breakpad_enabled = CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableCrashReporterForTesting);
if (breakpad_enabled) {
base::FilePath crash_dump_dir;
PathService::Get(chrome::DIR_CRASH_DUMPS, &crash_dump_dir);
crash_dump_manager_.reset(new breakpad::CrashDumpManager(crash_dump_dir));
}
ChromeBrowserMainParts::PreProfileInit();
}
void ChromeBrowserMainPartsAndroid::PreEarlyInitialization() {
TRACE_EVENT0("startup",
"ChromeBrowserMainPartsAndroid::PreEarlyInitialization")
net::NetworkChangeNotifier::SetFactory(
new net::NetworkChangeNotifierFactoryAndroid());
content::Compositor::Initialize();
DCHECK(!main_message_loop_.get());
{
TRACE_EVENT0("startup",
"ChromeBrowserMainPartsAndroid::PreEarlyInitialization:CreateUiMsgLoop");
main_message_loop_.reset(new base::MessageLoopForUI);
}
{
TRACE_EVENT0("startup",
"ChromeBrowserMainPartsAndroid::PreEarlyInitialization:StartUiMsgLoop");
base::MessageLoopForUI::current()->Start();
}
ChromeBrowserMainParts::PreEarlyInitialization();
}
void ChromeBrowserMainPartsAndroid::ShowMissingLocaleMessageBox() {
NOTREACHED();
}