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 search_counter_.reset(new GoogleSearchCounterAndroid(main_profile)); |
| 60 InitBookmarksExperimentState(main_profile); |
| 61 |
56 ChromeBrowserMainParts::PostProfileInit(); | 62 ChromeBrowserMainParts::PostProfileInit(); |
57 } | 63 } |
58 | 64 |
59 void ChromeBrowserMainPartsAndroid::PreEarlyInitialization() { | 65 void ChromeBrowserMainPartsAndroid::PreEarlyInitialization() { |
60 TRACE_EVENT0("startup", | 66 TRACE_EVENT0("startup", |
61 "ChromeBrowserMainPartsAndroid::PreEarlyInitialization") | 67 "ChromeBrowserMainPartsAndroid::PreEarlyInitialization") |
62 net::NetworkChangeNotifier::SetFactory( | 68 net::NetworkChangeNotifier::SetFactory( |
63 new net::NetworkChangeNotifierFactoryAndroid()); | 69 new net::NetworkChangeNotifierFactoryAndroid()); |
64 | 70 |
65 content::Compositor::Initialize(); | 71 content::Compositor::Initialize(); |
(...skipping 15 matching lines...) Expand all Loading... |
81 "ChromeBrowserMainPartsAndroid::PreEarlyInitialization:StartUiMsgLoop"); | 87 "ChromeBrowserMainPartsAndroid::PreEarlyInitialization:StartUiMsgLoop"); |
82 base::MessageLoopForUI::current()->Start(); | 88 base::MessageLoopForUI::current()->Start(); |
83 } | 89 } |
84 | 90 |
85 ChromeBrowserMainParts::PreEarlyInitialization(); | 91 ChromeBrowserMainParts::PreEarlyInitialization(); |
86 } | 92 } |
87 | 93 |
88 void ChromeBrowserMainPartsAndroid::ShowMissingLocaleMessageBox() { | 94 void ChromeBrowserMainPartsAndroid::ShowMissingLocaleMessageBox() { |
89 NOTREACHED(); | 95 NOTREACHED(); |
90 } | 96 } |
OLD | NEW |