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

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

Issue 2034413003: Delete the non-static CLD data source logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase to latest master Created 4 years, 6 months 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/chrome_browser_main.h" 5 #include "chrome/browser/chrome_browser_main.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 29 matching lines...) Expand all
40 #include "base/values.h" 40 #include "base/values.h"
41 #include "build/build_config.h" 41 #include "build/build_config.h"
42 #include "cc/base/switches.h" 42 #include "cc/base/switches.h"
43 #include "chrome/browser/about_flags.h" 43 #include "chrome/browser/about_flags.h"
44 #include "chrome/browser/after_startup_task_utils.h" 44 #include "chrome/browser/after_startup_task_utils.h"
45 #include "chrome/browser/browser_process.h" 45 #include "chrome/browser/browser_process.h"
46 #include "chrome/browser/browser_process_impl.h" 46 #include "chrome/browser/browser_process_impl.h"
47 #include "chrome/browser/browser_process_platform_part.h" 47 #include "chrome/browser/browser_process_platform_part.h"
48 #include "chrome/browser/browser_shutdown.h" 48 #include "chrome/browser/browser_shutdown.h"
49 #include "chrome/browser/chrome_browser_main_extra_parts.h" 49 #include "chrome/browser/chrome_browser_main_extra_parts.h"
50 #include "chrome/browser/component_updater/cld_component_installer.h"
51 #include "chrome/browser/component_updater/ev_whitelist_component_installer.h" 50 #include "chrome/browser/component_updater/ev_whitelist_component_installer.h"
52 #include "chrome/browser/component_updater/file_type_policies_component_installe r.h" 51 #include "chrome/browser/component_updater/file_type_policies_component_installe r.h"
53 #include "chrome/browser/component_updater/origin_trials_component_installer.h" 52 #include "chrome/browser/component_updater/origin_trials_component_installer.h"
54 #include "chrome/browser/component_updater/pepper_flash_component_installer.h" 53 #include "chrome/browser/component_updater/pepper_flash_component_installer.h"
55 #include "chrome/browser/component_updater/recovery_component_installer.h" 54 #include "chrome/browser/component_updater/recovery_component_installer.h"
56 #include "chrome/browser/component_updater/sth_set_component_installer.h" 55 #include "chrome/browser/component_updater/sth_set_component_installer.h"
57 #include "chrome/browser/component_updater/supervised_user_whitelist_installer.h " 56 #include "chrome/browser/component_updater/supervised_user_whitelist_installer.h "
58 #include "chrome/browser/component_updater/swiftshader_component_installer.h" 57 #include "chrome/browser/component_updater/swiftshader_component_installer.h"
59 #include "chrome/browser/component_updater/widevine_cdm_component_installer.h" 58 #include "chrome/browser/component_updater/widevine_cdm_component_installer.h"
60 #include "chrome/browser/defaults.h" 59 #include "chrome/browser/defaults.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 #include "components/nacl/browser/nacl_browser.h" 123 #include "components/nacl/browser/nacl_browser.h"
125 #include "components/prefs/json_pref_store.h" 124 #include "components/prefs/json_pref_store.h"
126 #include "components/prefs/pref_registry_simple.h" 125 #include "components/prefs/pref_registry_simple.h"
127 #include "components/prefs/pref_service.h" 126 #include "components/prefs/pref_service.h"
128 #include "components/prefs/pref_value_store.h" 127 #include "components/prefs/pref_value_store.h"
129 #include "components/prefs/scoped_user_pref_update.h" 128 #include "components/prefs/scoped_user_pref_update.h"
130 #include "components/rappor/rappor_service.h" 129 #include "components/rappor/rappor_service.h"
131 #include "components/signin/core/common/profile_management_switches.h" 130 #include "components/signin/core/common/profile_management_switches.h"
132 #include "components/startup_metric_utils/browser/startup_metric_utils.h" 131 #include "components/startup_metric_utils/browser/startup_metric_utils.h"
133 #include "components/tracing/common/tracing_switches.h" 132 #include "components/tracing/common/tracing_switches.h"
134 #include "components/translate/content/browser/browser_cld_utils.h"
135 #include "components/translate/content/common/cld_data_source.h"
136 #include "components/translate/core/browser/translate_download_manager.h" 133 #include "components/translate/core/browser/translate_download_manager.h"
137 #include "components/variations/pref_names.h" 134 #include "components/variations/pref_names.h"
138 #include "components/variations/service/variations_service.h" 135 #include "components/variations/service/variations_service.h"
139 #include "components/variations/variations_associated_data.h" 136 #include "components/variations/variations_associated_data.h"
140 #include "components/variations/variations_http_header_provider.h" 137 #include "components/variations/variations_http_header_provider.h"
141 #include "components/variations/variations_switches.h" 138 #include "components/variations/variations_switches.h"
142 #include "components/version_info/version_info.h" 139 #include "components/version_info/version_info.h"
143 #include "content/public/browser/browser_thread.h" 140 #include "content/public/browser/browser_thread.h"
144 #include "content/public/browser/notification_observer.h" 141 #include "content/public/browser/notification_observer.h"
145 #include "content/public/browser/notification_registrar.h" 142 #include "content/public/browser/notification_registrar.h"
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 #if !defined(DISABLE_NACL) && !defined(OS_ANDROID) 455 #if !defined(DISABLE_NACL) && !defined(OS_ANDROID)
459 #if defined(OS_CHROMEOS) 456 #if defined(OS_CHROMEOS)
460 // PNaCl on Chrome OS is on rootfs and there is no need to download it. But 457 // PNaCl on Chrome OS is on rootfs and there is no need to download it. But
461 // Chrome4ChromeOS on Linux doesn't contain PNaCl so enable component 458 // Chrome4ChromeOS on Linux doesn't contain PNaCl so enable component
462 // installer when running on Linux. See crbug.com/422121 for more details. 459 // installer when running on Linux. See crbug.com/422121 for more details.
463 if (!base::SysInfo::IsRunningOnChromeOS()) 460 if (!base::SysInfo::IsRunningOnChromeOS())
464 #endif // defined(OS_CHROMEOS) 461 #endif // defined(OS_CHROMEOS)
465 g_browser_process->pnacl_component_installer()->RegisterPnaclComponent(cus); 462 g_browser_process->pnacl_component_installer()->RegisterPnaclComponent(cus);
466 #endif // !defined(DISABLE_NACL) && !defined(OS_ANDROID) 463 #endif // !defined(DISABLE_NACL) && !defined(OS_ANDROID)
467 464
468 // Registration of the CLD Component is a no-op unless the CLD data source has
469 // been configured to be the "Component" data source.
470 RegisterCldComponent(cus);
471
472 component_updater::SupervisedUserWhitelistInstaller* whitelist_installer = 465 component_updater::SupervisedUserWhitelistInstaller* whitelist_installer =
473 g_browser_process->supervised_user_whitelist_installer(); 466 g_browser_process->supervised_user_whitelist_installer();
474 whitelist_installer->RegisterComponents(); 467 whitelist_installer->RegisterComponents();
475 468
476 base::FilePath path; 469 base::FilePath path;
477 if (PathService::Get(chrome::DIR_USER_DATA, &path)) { 470 if (PathService::Get(chrome::DIR_USER_DATA, &path)) {
478 #if defined(OS_ANDROID) 471 #if defined(OS_ANDROID)
479 // The CRLSet component was enabled for some releases. This code attempts to 472 // The CRLSet component was enabled for some releases. This code attempts to
480 // delete it from the local disk of those how may have downloaded it. 473 // delete it from the local disk of those how may have downloaded it.
481 g_browser_process->crl_set_fetcher()->DeleteFromDisk(path); 474 g_browser_process->crl_set_fetcher()->DeleteFromDisk(path);
(...skipping 1253 matching lines...) Expand 10 before | Expand all | Expand 10 after
1735 PrefMetricsService::Factory::GetForProfile(profile_); 1728 PrefMetricsService::Factory::GetForProfile(profile_);
1736 1729
1737 PreBrowserStart(); 1730 PreBrowserStart();
1738 1731
1739 // Instantiate the notification UI manager, as this triggers a perf timer 1732 // Instantiate the notification UI manager, as this triggers a perf timer
1740 // used to measure startup time. TODO(stevenjb): Figure out what is actually 1733 // used to measure startup time. TODO(stevenjb): Figure out what is actually
1741 // triggering the timer and call that explicitly in the approprate place. 1734 // triggering the timer and call that explicitly in the approprate place.
1742 // http://crbug.com/105065. 1735 // http://crbug.com/105065.
1743 browser_process_->notification_ui_manager(); 1736 browser_process_->notification_ui_manager();
1744 1737
1745 // This must be called prior to RegisterComponentsForUpdate, in case the CLD
1746 // data source is based on the Component Updater.
1747 translate::BrowserCldUtils::ConfigureDefaultDataProvider();
1748
1749 if (!parsed_command_line().HasSwitch(switches::kDisableComponentUpdate)) 1738 if (!parsed_command_line().HasSwitch(switches::kDisableComponentUpdate))
1750 RegisterComponentsForUpdate(); 1739 RegisterComponentsForUpdate();
1751 1740
1752 #if defined(OS_ANDROID) 1741 #if defined(OS_ANDROID)
1753 variations::VariationsService* variations_service = 1742 variations::VariationsService* variations_service =
1754 browser_process_->variations_service(); 1743 browser_process_->variations_service();
1755 if (variations_service) { 1744 if (variations_service) {
1756 // Just initialize the policy prefs service here. Variations seed fetching 1745 // Just initialize the policy prefs service here. Variations seed fetching
1757 // will be initialized when the app enters foreground mode. 1746 // will be initialized when the app enters foreground mode.
1758 variations_service->set_policy_pref_service(profile_->GetPrefs()); 1747 variations_service->set_policy_pref_service(profile_->GetPrefs());
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
1986 chromeos::CrosSettings::Shutdown(); 1975 chromeos::CrosSettings::Shutdown();
1987 #endif // defined(OS_CHROMEOS) 1976 #endif // defined(OS_CHROMEOS)
1988 #endif // defined(OS_ANDROID) 1977 #endif // defined(OS_ANDROID)
1989 } 1978 }
1990 1979
1991 // Public members: 1980 // Public members:
1992 1981
1993 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1982 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1994 chrome_extra_parts_.push_back(parts); 1983 chrome_extra_parts_.push_back(parts);
1995 } 1984 }
OLDNEW
« no previous file with comments | « chrome/android/chrome_apk.gyp ('k') | chrome/browser/component_updater/cld_component_installer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698