Chromium Code Reviews| 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_android.h" | 5 #include "chrome/browser/chrome_browser_main_android.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h" | |
| 10 #include "chrome/browser/google/google_search_counter_android.h" | 11 #include "chrome/browser/google/google_search_counter_android.h" |
| 12 #include "chrome/browser/signin/signin_manager_factory.h" | |
| 11 #include "chrome/common/chrome_paths.h" | 13 #include "chrome/common/chrome_paths.h" |
| 12 #include "chrome/common/chrome_switches.h" | 14 #include "chrome/common/chrome_switches.h" |
| 13 #include "components/crash/app/breakpad_linux.h" | 15 #include "components/crash/app/breakpad_linux.h" |
| 14 #include "components/crash/browser/crash_dump_manager_android.h" | 16 #include "components/crash/browser/crash_dump_manager_android.h" |
| 17 #include "components/signin/core/browser/signin_manager.h" | |
| 15 #include "content/public/browser/android/compositor.h" | 18 #include "content/public/browser/android/compositor.h" |
| 16 #include "content/public/common/main_function_params.h" | 19 #include "content/public/common/main_function_params.h" |
| 17 #include "net/android/network_change_notifier_factory_android.h" | 20 #include "net/android/network_change_notifier_factory_android.h" |
| 18 #include "net/base/network_change_notifier.h" | 21 #include "net/base/network_change_notifier.h" |
| 19 #include "ui/base/ui_base_paths.h" | 22 #include "ui/base/ui_base_paths.h" |
| 20 | 23 |
| 21 ChromeBrowserMainPartsAndroid::ChromeBrowserMainPartsAndroid( | 24 ChromeBrowserMainPartsAndroid::ChromeBrowserMainPartsAndroid( |
| 22 const content::MainFunctionParams& parameters) | 25 const content::MainFunctionParams& parameters) |
| 23 : ChromeBrowserMainParts(parameters) { | 26 : ChromeBrowserMainParts(parameters) { |
| 24 } | 27 } |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 45 if (breakpad_enabled) { | 48 if (breakpad_enabled) { |
| 46 base::FilePath crash_dump_dir; | 49 base::FilePath crash_dump_dir; |
| 47 PathService::Get(chrome::DIR_CRASH_DUMPS, &crash_dump_dir); | 50 PathService::Get(chrome::DIR_CRASH_DUMPS, &crash_dump_dir); |
| 48 crash_dump_manager_.reset(new breakpad::CrashDumpManager(crash_dump_dir)); | 51 crash_dump_manager_.reset(new breakpad::CrashDumpManager(crash_dump_dir)); |
| 49 } | 52 } |
| 50 | 53 |
| 51 ChromeBrowserMainParts::PreProfileInit(); | 54 ChromeBrowserMainParts::PreProfileInit(); |
| 52 } | 55 } |
| 53 | 56 |
| 54 void ChromeBrowserMainPartsAndroid::PostProfileInit() { | 57 void ChromeBrowserMainPartsAndroid::PostProfileInit() { |
| 55 search_counter_.reset(new GoogleSearchCounterAndroid(profile())); | 58 Profile* main_profile = profile(); |
| 59 | |
| 60 search_counter_.reset(new GoogleSearchCounterAndroid(main_profile)); | |
| 61 | |
| 62 SigninManagerBase* signin = SigninManagerFactory::GetForProfile(main_profile); | |
|
Yaron
2014/09/05 04:48:43
Please pull this out from here and external_compon
Kibeom Kim (inactive)
2014/09/08 09:26:58
Done. But I had to increase chrome/browser/bookmar
| |
| 63 bool is_signed_in = signin && !signin->IsAuthenticated(); | |
| 64 UpdateBookmarksExperimentState( | |
| 65 main_profile->GetPrefs(), | |
| 66 local_state(), | |
| 67 is_signed_in, | |
| 68 BOOKMARKS_EXPERIMENT_ENABLED_FROM_SYNC_UNKNOWN); | |
| 69 | |
| 56 ChromeBrowserMainParts::PostProfileInit(); | 70 ChromeBrowserMainParts::PostProfileInit(); |
| 57 } | 71 } |
| 58 | 72 |
| 59 void ChromeBrowserMainPartsAndroid::PreEarlyInitialization() { | 73 void ChromeBrowserMainPartsAndroid::PreEarlyInitialization() { |
| 60 TRACE_EVENT0("startup", | 74 TRACE_EVENT0("startup", |
| 61 "ChromeBrowserMainPartsAndroid::PreEarlyInitialization") | 75 "ChromeBrowserMainPartsAndroid::PreEarlyInitialization") |
| 62 net::NetworkChangeNotifier::SetFactory( | 76 net::NetworkChangeNotifier::SetFactory( |
| 63 new net::NetworkChangeNotifierFactoryAndroid()); | 77 new net::NetworkChangeNotifierFactoryAndroid()); |
| 64 | 78 |
| 65 content::Compositor::Initialize(); | 79 content::Compositor::Initialize(); |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 81 "ChromeBrowserMainPartsAndroid::PreEarlyInitialization:StartUiMsgLoop"); | 95 "ChromeBrowserMainPartsAndroid::PreEarlyInitialization:StartUiMsgLoop"); |
| 82 base::MessageLoopForUI::current()->Start(); | 96 base::MessageLoopForUI::current()->Start(); |
| 83 } | 97 } |
| 84 | 98 |
| 85 ChromeBrowserMainParts::PreEarlyInitialization(); | 99 ChromeBrowserMainParts::PreEarlyInitialization(); |
| 86 } | 100 } |
| 87 | 101 |
| 88 void ChromeBrowserMainPartsAndroid::ShowMissingLocaleMessageBox() { | 102 void ChromeBrowserMainPartsAndroid::ShowMissingLocaleMessageBox() { |
| 89 NOTREACHED(); | 103 NOTREACHED(); |
| 90 } | 104 } |
| OLD | NEW |