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/base_switches.h" | 7 #include "base/base_switches.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
12 #include "base/trace_event/trace_event.h" | 12 #include "base/trace_event/trace_event.h" |
13 #include "chrome/browser/android/mojo/chrome_interface_registrar_android.h" | 13 #include "chrome/browser/android/mojo/chrome_interface_registrar_android.h" |
14 #include "chrome/browser/android/seccomp_support_detector.h" | 14 #include "chrome/browser/android/seccomp_support_detector.h" |
15 #include "chrome/browser/signin/signin_manager_factory.h" | 15 #include "chrome/browser/signin/signin_manager_factory.h" |
16 #include "chrome/common/chrome_paths.h" | 16 #include "chrome/common/chrome_paths.h" |
17 #include "components/crash/content/app/breakpad_linux.h" | 17 #include "components/crash/content/app/breakpad_linux.h" |
18 #include "components/crash/content/browser/crash_dump_manager_android.h" | 18 #include "components/crash/content/browser/crash_dump_manager_android.h" |
19 #include "components/signin/core/browser/signin_manager.h" | 19 #include "components/signin/core/browser/signin_manager.h" |
20 #include "content/public/browser/android/compositor.h" | 20 #include "content/public/browser/android/compositor.h" |
21 #include "content/public/browser/browser_thread.h" | 21 #include "content/public/browser/browser_thread.h" |
22 #include "content/public/common/main_function_params.h" | 22 #include "content/public/common/main_function_params.h" |
23 #include "net/android/network_change_notifier_factory_android.h" | 23 #include "net/android/network_change_notifier_factory_android.h" |
24 #include "net/base/network_change_notifier.h" | 24 #include "net/base/network_change_notifier.h" |
25 #include "ui/base/resource/resource_bundle_android.h" | |
26 #include "ui/base/ui_base_paths.h" | 25 #include "ui/base/ui_base_paths.h" |
27 | 26 |
28 namespace { | 27 namespace { |
29 | 28 |
30 void DeleteFileTask( | 29 void DeleteFileTask( |
31 const base::FilePath& file_path) { | 30 const base::FilePath& file_path) { |
32 if (base::PathExists(file_path)) | 31 if (base::PathExists(file_path)) |
33 base::DeleteFile(file_path, false); | 32 base::DeleteFile(file_path, false); |
34 } | 33 } |
35 | 34 |
(...skipping 27 matching lines...) Expand all Loading... |
63 if (!breakpad_enabled) | 62 if (!breakpad_enabled) |
64 breakpad_enabled = base::CommandLine::ForCurrentProcess()->HasSwitch( | 63 breakpad_enabled = base::CommandLine::ForCurrentProcess()->HasSwitch( |
65 switches::kEnableCrashReporterForTesting); | 64 switches::kEnableCrashReporterForTesting); |
66 | 65 |
67 if (breakpad_enabled) { | 66 if (breakpad_enabled) { |
68 base::FilePath crash_dump_dir; | 67 base::FilePath crash_dump_dir; |
69 PathService::Get(chrome::DIR_CRASH_DUMPS, &crash_dump_dir); | 68 PathService::Get(chrome::DIR_CRASH_DUMPS, &crash_dump_dir); |
70 crash_dump_manager_.reset(new breakpad::CrashDumpManager(crash_dump_dir)); | 69 crash_dump_manager_.reset(new breakpad::CrashDumpManager(crash_dump_dir)); |
71 } | 70 } |
72 | 71 |
73 ui::SetLocalePaksStoredInApk(false); | |
74 | |
75 return ChromeBrowserMainParts::PreCreateThreads(); | 72 return ChromeBrowserMainParts::PreCreateThreads(); |
76 } | 73 } |
77 | 74 |
78 void ChromeBrowserMainPartsAndroid::PostProfileInit() { | 75 void ChromeBrowserMainPartsAndroid::PostProfileInit() { |
79 ChromeBrowserMainParts::PostProfileInit(); | 76 ChromeBrowserMainParts::PostProfileInit(); |
80 | 77 |
81 // Previously we stored information related to salient images for bookmarks | 78 // Previously we stored information related to salient images for bookmarks |
82 // in a local file. We replaced the salient images with favicons. As part | 79 // in a local file. We replaced the salient images with favicons. As part |
83 // of the clean up, the local file needs to be deleted. See crbug.com/499415. | 80 // of the clean up, the local file needs to be deleted. See crbug.com/499415. |
84 base::FilePath bookmark_image_file_path = | 81 base::FilePath bookmark_image_file_path = |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 content::BrowserThread::GetBlockingPool()->PostDelayedTask(FROM_HERE, | 121 content::BrowserThread::GetBlockingPool()->PostDelayedTask(FROM_HERE, |
125 base::Bind(&SeccompSupportDetector::StartDetection), | 122 base::Bind(&SeccompSupportDetector::StartDetection), |
126 base::TimeDelta::FromMinutes(1)); | 123 base::TimeDelta::FromMinutes(1)); |
127 | 124 |
128 RegisterChromeJavaMojoInterfaces(); | 125 RegisterChromeJavaMojoInterfaces(); |
129 } | 126 } |
130 | 127 |
131 void ChromeBrowserMainPartsAndroid::ShowMissingLocaleMessageBox() { | 128 void ChromeBrowserMainPartsAndroid::ShowMissingLocaleMessageBox() { |
132 NOTREACHED(); | 129 NOTREACHED(); |
133 } | 130 } |
OLD | NEW |