| 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 "chrome/common/chrome_switches.h" | 7 #include "chrome/common/chrome_switches.h" |
| 8 #include "content/public/common/main_function_params.h" | 8 #include "content/public/common/main_function_params.h" |
| 9 #include "net/android/network_change_notifier_factory_android.h" | 9 #include "net/android/network_change_notifier_factory_android.h" |
| 10 #include "net/base/network_change_notifier.h" | 10 #include "net/base/network_change_notifier.h" |
| 11 | 11 |
| 12 ChromeBrowserMainPartsAndroid::ChromeBrowserMainPartsAndroid( | 12 ChromeBrowserMainPartsAndroid::ChromeBrowserMainPartsAndroid( |
| 13 const content::MainFunctionParams& parameters) | 13 const content::MainFunctionParams& parameters) |
| 14 : ChromeBrowserMainParts(parameters) { | 14 : ChromeBrowserMainParts(parameters) { |
| 15 } | 15 } |
| 16 | 16 |
| 17 ChromeBrowserMainPartsAndroid::~ChromeBrowserMainPartsAndroid() { | 17 ChromeBrowserMainPartsAndroid::~ChromeBrowserMainPartsAndroid() { |
| 18 } | 18 } |
| 19 | 19 |
| 20 void ChromeBrowserMainPartsAndroid::PreEarlyInitialization() { | 20 void ChromeBrowserMainPartsAndroid::PreEarlyInitialization() { |
| 21 net::NetworkChangeNotifier::SetFactory( | |
| 22 new net::NetworkChangeNotifierFactoryAndroid()); | |
| 23 | |
| 24 // Chrome on Android does not use default MessageLoop. It has its own | 21 // Chrome on Android does not use default MessageLoop. It has its own |
| 25 // Android specific MessageLoop. | 22 // Android specific MessageLoop. |
| 26 DCHECK(!main_message_loop_.get()); | 23 DCHECK(!main_message_loop_.get()); |
| 27 main_message_loop_.reset(new MessageLoop(MessageLoop::TYPE_UI)); | 24 main_message_loop_.reset(new MessageLoop(MessageLoop::TYPE_UI)); |
| 25 net::NetworkChangeNotifier::SetFactory( |
| 26 new net::NetworkChangeNotifierFactoryAndroid( |
| 27 MessageLoop::current()->message_loop_proxy())); |
| 28 |
| 28 MessageLoopForUI::current()->Start(); | 29 MessageLoopForUI::current()->Start(); |
| 29 | 30 |
| 30 ChromeBrowserMainParts::PreEarlyInitialization(); | 31 ChromeBrowserMainParts::PreEarlyInitialization(); |
| 31 } | 32 } |
| 32 | 33 |
| 33 void ChromeBrowserMainPartsAndroid::ShowMissingLocaleMessageBox() { | 34 void ChromeBrowserMainPartsAndroid::ShowMissingLocaleMessageBox() { |
| 34 NOTREACHED(); | 35 NOTREACHED(); |
| 35 } | 36 } |
| 36 | 37 |
| 37 void RecordBreakpadStatusUMA(MetricsService* metrics) { | 38 void RecordBreakpadStatusUMA(MetricsService* metrics) { |
| 38 // TODO: crbug.com/139023 | 39 // TODO: crbug.com/139023 |
| 39 NOTIMPLEMENTED(); | 40 NOTIMPLEMENTED(); |
| 40 } | 41 } |
| 41 | 42 |
| 42 void WarnAboutMinimumSystemRequirements() { | 43 void WarnAboutMinimumSystemRequirements() { |
| 43 } | 44 } |
| OLD | NEW |