OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "chrome/browser/chrome_browser_main_android.h" | |
6 | |
7 #include "base/android/jni_android.h" | |
8 #include "chrome/browser/android/chrome_jni_registrar.h" | |
9 #include "chrome/common/chrome_switches.h" | |
10 #include "content/public/common/main_function_params.h" | |
11 #include "net/android/network_change_notifier_factory.h" | |
12 #include "net/base/network_change_notifier.h" | |
13 | |
14 ChromeBrowserMainPartsAndroid::ChromeBrowserMainPartsAndroid( | |
15 const content::MainFunctionParams& parameters) | |
16 : ChromeBrowserMainParts(parameters) { | |
17 } | |
18 | |
19 ChromeBrowserMainPartsAndroid::~ChromeBrowserMainPartsAndroid() { | |
20 } | |
21 | |
22 void ChromeBrowserMainPartsAndroid::PreEarlyInitialization() { | |
23 JNIEnv* env = base::android::AttachCurrentThread(); | |
24 DCHECK(env); | |
25 | |
26 chrome::android::RegisterJni(env); | |
27 | |
28 // Support gcov code coverage. In order for gcov to work, we need to | |
29 // explicilty export GCOV_PREFIX to the environment. | |
30 if (parsed_command_line().HasSwitch(switches::kGcovPrefix)) { | |
31 const std::string gcov_prefix = | |
Nico
2012/07/25 19:50:16
std::string&
aurimas (slooooooooow)
2012/07/25 22:05:46
Done.
| |
32 parsed_command_line().GetSwitchValueASCII(switches::kGcovPrefix); | |
33 setenv("GCOV_PREFIX", gcov_prefix.c_str(), 1); | |
34 } | |
35 if (parsed_command_line().HasSwitch(switches::kGcovPrefixStrip)) { | |
Nico
2012/07/25 19:50:16
This looks identical to the previous if. Do you ne
aurimas (slooooooooow)
2012/07/25 22:05:46
Completely removing GCOV as it is not actually bei
| |
36 const std::string gcov_prefix_strip = | |
37 parsed_command_line().GetSwitchValueASCII(switches::kGcovPrefixStrip); | |
38 setenv("GCOV_PREFIX", gcov_prefix_strip.c_str(), 1); | |
39 } | |
40 | |
41 net::NetworkChangeNotifier::SetFactory( | |
42 new net::android::NetworkChangeNotifierFactory()); | |
43 | |
44 DCHECK(!main_message_loop_.get()); | |
45 main_message_loop_.reset(new MessageLoop(MessageLoop::TYPE_UI)); | |
46 MessageLoopForUI::current()->Start(); | |
Nico
2012/07/25 19:50:16
content/shell/shell_browser_main_parts.cc does thi
aurimas (slooooooooow)
2012/07/25 22:05:46
Done.
| |
47 | |
48 ChromeBrowserMainParts::PreEarlyInitialization(); | |
49 } | |
50 | |
51 void ChromeBrowserMainPartsAndroid::ShowMissingLocaleMessageBox() { | |
52 VLOG(0) << "ShowMissingLocaleMessageBox"; | |
Nico
2012/07/25 19:50:16
Shoudl this be NOTREACHED() instead?
aurimas (slooooooooow)
2012/07/25 22:05:46
Done.
| |
53 } | |
54 | |
55 void RecordBreakpadStatusUMA(MetricsService* metrics) { | |
56 // Not implemented for now. | |
Nico
2012/07/25 19:50:16
If you intend to implement this, file a tracking b
aurimas (slooooooooow)
2012/07/25 22:05:46
Done.
| |
57 } | |
58 | |
59 void WarnAboutMinimumSystemRequirements() { | |
60 // Nothing to warn right now. | |
Nico
2012/07/25 19:50:16
Remove comment.
aurimas (slooooooooow)
2012/07/25 22:05:46
Done.
| |
61 } | |
OLD | NEW |