Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(566)

Side by Side Diff: chrome/browser/browser_process_impl.cc

Issue 1459793002: Android: Allow compiling browser without Java UI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/browser_process_impl.h" 5 #include "chrome/browser/browser_process_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 #include "chrome/browser/shell_integration.h" 62 #include "chrome/browser/shell_integration.h"
63 #include "chrome/browser/status_icons/status_tray.h" 63 #include "chrome/browser/status_icons/status_tray.h"
64 #include "chrome/browser/ui/browser_dialogs.h" 64 #include "chrome/browser/ui/browser_dialogs.h"
65 #include "chrome/browser/ui/browser_finder.h" 65 #include "chrome/browser/ui/browser_finder.h"
66 #include "chrome/browser/update_client/chrome_update_query_params_delegate.h" 66 #include "chrome/browser/update_client/chrome_update_query_params_delegate.h"
67 #include "chrome/common/channel_info.h" 67 #include "chrome/common/channel_info.h"
68 #include "chrome/common/chrome_constants.h" 68 #include "chrome/common/chrome_constants.h"
69 #include "chrome/common/chrome_paths.h" 69 #include "chrome/common/chrome_paths.h"
70 #include "chrome/common/chrome_switches.h" 70 #include "chrome/common/chrome_switches.h"
71 #include "chrome/common/extensions/chrome_extensions_client.h" 71 #include "chrome/common/extensions/chrome_extensions_client.h"
72 #include "chrome/common/features.h"
72 #include "chrome/common/pref_names.h" 73 #include "chrome/common/pref_names.h"
73 #include "chrome/common/switch_utils.h" 74 #include "chrome/common/switch_utils.h"
74 #include "chrome/common/url_constants.h" 75 #include "chrome/common/url_constants.h"
75 #include "chrome/installer/util/google_update_constants.h" 76 #include "chrome/installer/util/google_update_constants.h"
76 #include "chrome/installer/util/google_update_settings.h" 77 #include "chrome/installer/util/google_update_settings.h"
77 #include "components/component_updater/component_updater_service.h" 78 #include "components/component_updater/component_updater_service.h"
78 #include "components/gcm_driver/gcm_driver.h" 79 #include "components/gcm_driver/gcm_driver.h"
79 #include "components/metrics/metrics_pref_names.h" 80 #include "components/metrics/metrics_pref_names.h"
80 #include "components/metrics/metrics_service.h" 81 #include "components/metrics/metrics_service.h"
81 #include "components/metrics_services_manager/metrics_services_manager.h" 82 #include "components/metrics_services_manager/metrics_services_manager.h"
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 // sources. This has to be done before uninstall code path and before prefs 831 // sources. This has to be done before uninstall code path and before prefs
831 // are registered. 832 // are registered.
832 registry->RegisterStringPref(prefs::kApplicationLocale, std::string()); 833 registry->RegisterStringPref(prefs::kApplicationLocale, std::string());
833 #if defined(OS_CHROMEOS) 834 #if defined(OS_CHROMEOS)
834 registry->RegisterStringPref(prefs::kOwnerLocale, std::string()); 835 registry->RegisterStringPref(prefs::kOwnerLocale, std::string());
835 registry->RegisterStringPref(prefs::kHardwareKeyboardLayout, 836 registry->RegisterStringPref(prefs::kHardwareKeyboardLayout,
836 std::string()); 837 std::string());
837 #endif // defined(OS_CHROMEOS) 838 #endif // defined(OS_CHROMEOS)
838 registry->RegisterBooleanPref(metrics::prefs::kMetricsReportingEnabled, 839 registry->RegisterBooleanPref(metrics::prefs::kMetricsReportingEnabled,
839 GoogleUpdateSettings::GetCollectStatsConsent()); 840 GoogleUpdateSettings::GetCollectStatsConsent());
840 #if defined(OS_ANDROID) 841 #if BUILDFLAG(ANDROID_JAVA_UI)
841 registry->RegisterBooleanPref( 842 registry->RegisterBooleanPref(
842 prefs::kCrashReportingEnabled, false); 843 prefs::kCrashReportingEnabled, false);
843 #endif // defined(OS_ANDROID) 844 #endif // BUILDFLAG(ANDROID_JAVA_UI)
844 } 845 }
845 846
846 DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() { 847 DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() {
847 DCHECK(CalledOnValidThread()); 848 DCHECK(CalledOnValidThread());
848 if (!download_request_limiter_.get()) 849 if (!download_request_limiter_.get())
849 download_request_limiter_ = new DownloadRequestLimiter(); 850 download_request_limiter_ = new DownloadRequestLimiter();
850 return download_request_limiter_.get(); 851 return download_request_limiter_.get();
851 } 852 }
852 853
853 BackgroundModeManager* BrowserProcessImpl::background_mode_manager() { 854 BackgroundModeManager* BrowserProcessImpl::background_mode_manager() {
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
1285 } 1286 }
1286 1287
1287 void BrowserProcessImpl::OnAutoupdateTimer() { 1288 void BrowserProcessImpl::OnAutoupdateTimer() {
1288 if (CanAutorestartForUpdate()) { 1289 if (CanAutorestartForUpdate()) {
1289 DLOG(WARNING) << "Detected update. Restarting browser."; 1290 DLOG(WARNING) << "Detected update. Restarting browser.";
1290 RestartBackgroundInstance(); 1291 RestartBackgroundInstance();
1291 } 1292 }
1292 } 1293 }
1293 1294
1294 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 1295 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698