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

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

Issue 1845113003: Certificate Transparency: Start tracking logs' state (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #include "chrome/browser/after_startup_task_utils.h" 43 #include "chrome/browser/after_startup_task_utils.h"
44 #include "chrome/browser/browser_process.h" 44 #include "chrome/browser/browser_process.h"
45 #include "chrome/browser/browser_process_impl.h" 45 #include "chrome/browser/browser_process_impl.h"
46 #include "chrome/browser/browser_process_platform_part.h" 46 #include "chrome/browser/browser_process_platform_part.h"
47 #include "chrome/browser/browser_shutdown.h" 47 #include "chrome/browser/browser_shutdown.h"
48 #include "chrome/browser/chrome_browser_main_extra_parts.h" 48 #include "chrome/browser/chrome_browser_main_extra_parts.h"
49 #include "chrome/browser/component_updater/cld_component_installer.h" 49 #include "chrome/browser/component_updater/cld_component_installer.h"
50 #include "chrome/browser/component_updater/ev_whitelist_component_installer.h" 50 #include "chrome/browser/component_updater/ev_whitelist_component_installer.h"
51 #include "chrome/browser/component_updater/flash_component_installer.h" 51 #include "chrome/browser/component_updater/flash_component_installer.h"
52 #include "chrome/browser/component_updater/recovery_component_installer.h" 52 #include "chrome/browser/component_updater/recovery_component_installer.h"
53 #include "chrome/browser/component_updater/sth_set_component_installer.h"
53 #include "chrome/browser/component_updater/supervised_user_whitelist_installer.h " 54 #include "chrome/browser/component_updater/supervised_user_whitelist_installer.h "
54 #include "chrome/browser/component_updater/swiftshader_component_installer.h" 55 #include "chrome/browser/component_updater/swiftshader_component_installer.h"
55 #include "chrome/browser/component_updater/widevine_cdm_component_installer.h" 56 #include "chrome/browser/component_updater/widevine_cdm_component_installer.h"
56 #include "chrome/browser/defaults.h" 57 #include "chrome/browser/defaults.h"
57 #include "chrome/browser/first_run/first_run.h" 58 #include "chrome/browser/first_run/first_run.h"
58 #include "chrome/browser/gpu/gl_string_manager.h" 59 #include "chrome/browser/gpu/gl_string_manager.h"
59 #include "chrome/browser/gpu/three_d_api_observer.h" 60 #include "chrome/browser/gpu/three_d_api_observer.h"
60 #include "chrome/browser/media/media_capture_devices_dispatcher.h" 61 #include "chrome/browser/media/media_capture_devices_dispatcher.h"
61 #include "chrome/browser/memory/tab_manager.h" 62 #include "chrome/browser/memory/tab_manager.h"
62 #include "chrome/browser/metrics/field_trial_synchronizer.h" 63 #include "chrome/browser/metrics/field_trial_synchronizer.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 #include "content/public/browser/notification_types.h" 144 #include "content/public/browser/notification_types.h"
144 #include "content/public/browser/power_usage_monitor.h" 145 #include "content/public/browser/power_usage_monitor.h"
145 #include "content/public/browser/site_instance.h" 146 #include "content/public/browser/site_instance.h"
146 #include "content/public/common/content_client.h" 147 #include "content/public/common/content_client.h"
147 #include "content/public/common/content_features.h" 148 #include "content/public/common/content_features.h"
148 #include "content/public/common/content_switches.h" 149 #include "content/public/common/content_switches.h"
149 #include "content/public/common/main_function_params.h" 150 #include "content/public/common/main_function_params.h"
150 #include "grit/platform_locale_settings.h" 151 #include "grit/platform_locale_settings.h"
151 #include "media/base/media_resources.h" 152 #include "media/base/media_resources.h"
152 #include "net/base/net_module.h" 153 #include "net/base/net_module.h"
154 #include "net/cert/sth_distributor.h"
153 #include "net/cookies/cookie_monster.h" 155 #include "net/cookies/cookie_monster.h"
154 #include "net/http/http_network_layer.h" 156 #include "net/http/http_network_layer.h"
155 #include "net/http/http_stream_factory.h" 157 #include "net/http/http_stream_factory.h"
156 #include "net/url_request/url_request.h" 158 #include "net/url_request/url_request.h"
157 #include "ui/base/l10n/l10n_util.h" 159 #include "ui/base/l10n/l10n_util.h"
158 #include "ui/base/layout.h" 160 #include "ui/base/layout.h"
159 #include "ui/base/resource/resource_bundle.h" 161 #include "ui/base/resource/resource_bundle.h"
160 #include "ui/strings/grit/app_locale_settings.h" 162 #include "ui/strings/grit/app_locale_settings.h"
161 163
162 #if BUILDFLAG(ANDROID_JAVA_UI) 164 #if BUILDFLAG(ANDROID_JAVA_UI)
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 return NULL; 437 return NULL;
436 } 438 }
437 439
438 #if defined(OS_MACOSX) 440 #if defined(OS_MACOSX)
439 OSStatus KeychainCallback(SecKeychainEvent keychain_event, 441 OSStatus KeychainCallback(SecKeychainEvent keychain_event,
440 SecKeychainCallbackInfo* info, void* context) { 442 SecKeychainCallbackInfo* info, void* context) {
441 return noErr; 443 return noErr;
442 } 444 }
443 #endif // defined(OS_MACOSX) 445 #endif // defined(OS_MACOSX)
444 446
445 void RegisterComponentsForUpdate() { 447 void RegisterComponentsForUpdate(
448 scoped_ptr<net::ct::STHDistributor> sth_distributor) {
446 component_updater::ComponentUpdateService* cus = 449 component_updater::ComponentUpdateService* cus =
447 g_browser_process->component_updater(); 450 g_browser_process->component_updater();
448 451
449 // Registration can be before or after cus->Start() so it is ok to post 452 // Registration can be before or after cus->Start() so it is ok to post
450 // a task to the UI thread to do registration once you done the necessary 453 // a task to the UI thread to do registration once you done the necessary
451 // file IO to know you existing component version. 454 // file IO to know you existing component version.
452 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) 455 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
453 RegisterRecoveryComponent(cus, g_browser_process->local_state()); 456 RegisterRecoveryComponent(cus, g_browser_process->local_state());
454 RegisterPepperFlashComponent(cus); 457 RegisterPepperFlashComponent(cus);
455 RegisterSwiftShaderComponent(cus); 458 RegisterSwiftShaderComponent(cus);
(...skipping 26 matching lines...) Expand all
482 g_browser_process->crl_set_fetcher()->DeleteFromDisk(path); 485 g_browser_process->crl_set_fetcher()->DeleteFromDisk(path);
483 #elif !defined(OS_CHROMEOS) 486 #elif !defined(OS_CHROMEOS)
484 // CRLSetFetcher attempts to load a CRL set from either the local disk or 487 // CRLSetFetcher attempts to load a CRL set from either the local disk or
485 // network. 488 // network.
486 // For Chrome OS this registration is delayed until user login. 489 // For Chrome OS this registration is delayed until user login.
487 g_browser_process->crl_set_fetcher()->StartInitialLoad(cus, path); 490 g_browser_process->crl_set_fetcher()->StartInitialLoad(cus, path);
488 // Registration of the EV Whitelist component here is not necessary for: 491 // Registration of the EV Whitelist component here is not necessary for:
489 // 1. Android: Because it currently does not have the EV indicator. 492 // 1. Android: Because it currently does not have the EV indicator.
490 // 2. Chrome OS: On Chrome OS this registration is delayed until user login. 493 // 2. Chrome OS: On Chrome OS this registration is delayed until user login.
491 RegisterEVWhitelistComponent(cus, path); 494 RegisterEVWhitelistComponent(cus, path);
495
496 // Registration of the STH set fetcher here is not done for:
497 // Android: Because the story around CT on Mobile is not finalized yet.
498 // Chrome OS: On Chrome OS this registration is delayed until user login.
499 RegisterSTHSetComponent(cus, path, std::move(sth_distributor));
492 #endif // defined(OS_ANDROID) 500 #endif // defined(OS_ANDROID)
493 } 501 }
494 502
495 #if defined(OS_WIN) 503 #if defined(OS_WIN)
496 #if defined(GOOGLE_CHROME_BUILD) 504 #if defined(GOOGLE_CHROME_BUILD)
497 RegisterSwReporterComponent(cus); 505 RegisterSwReporterComponent(cus);
498 #endif // defined(GOOGLE_CHROME_BUILD) 506 #endif // defined(GOOGLE_CHROME_BUILD)
499 RegisterCAPSComponent(cus); 507 RegisterCAPSComponent(cus);
500 #endif // defined(OS_WIN) 508 #endif // defined(OS_WIN)
501 } 509 }
(...skipping 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after
1700 // Instantiate the notification UI manager, as this triggers a perf timer 1708 // Instantiate the notification UI manager, as this triggers a perf timer
1701 // used to measure startup time. TODO(stevenjb): Figure out what is actually 1709 // used to measure startup time. TODO(stevenjb): Figure out what is actually
1702 // triggering the timer and call that explicitly in the approprate place. 1710 // triggering the timer and call that explicitly in the approprate place.
1703 // http://crbug.com/105065. 1711 // http://crbug.com/105065.
1704 browser_process_->notification_ui_manager(); 1712 browser_process_->notification_ui_manager();
1705 1713
1706 // This must be called prior to RegisterComponentsForUpdate, in case the CLD 1714 // This must be called prior to RegisterComponentsForUpdate, in case the CLD
1707 // data source is based on the Component Updater. 1715 // data source is based on the Component Updater.
1708 translate::BrowserCldUtils::ConfigureDefaultDataProvider(); 1716 translate::BrowserCldUtils::ConfigureDefaultDataProvider();
1709 1717
1710 if (!parsed_command_line().HasSwitch(switches::kDisableComponentUpdate)) 1718 if (!parsed_command_line().HasSwitch(switches::kDisableComponentUpdate)) {
1711 RegisterComponentsForUpdate(); 1719 scoped_ptr<net::ct::STHDistributor> distributor(
1720 new net::ct::STHDistributor());
1721 browser_process_->RegisterWithSTHObserver(distributor.get());
1722 RegisterComponentsForUpdate(std::move(distributor));
1723 }
1712 1724
1713 #if defined(OS_ANDROID) 1725 #if defined(OS_ANDROID)
1714 variations::VariationsService* variations_service = 1726 variations::VariationsService* variations_service =
1715 browser_process_->variations_service(); 1727 browser_process_->variations_service();
1716 if (variations_service) { 1728 if (variations_service) {
1717 // Just initialize the policy prefs service here. Variations seed fetching 1729 // Just initialize the policy prefs service here. Variations seed fetching
1718 // will be initialized when the app enters foreground mode. 1730 // will be initialized when the app enters foreground mode.
1719 variations_service->set_policy_pref_service(profile_->GetPrefs()); 1731 variations_service->set_policy_pref_service(profile_->GetPrefs());
1720 } 1732 }
1721 translate::TranslateDownloadManager::RequestLanguageList( 1733 translate::TranslateDownloadManager::RequestLanguageList(
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
1948 chromeos::CrosSettings::Shutdown(); 1960 chromeos::CrosSettings::Shutdown();
1949 #endif // defined(OS_CHROMEOS) 1961 #endif // defined(OS_CHROMEOS)
1950 #endif // defined(OS_ANDROID) 1962 #endif // defined(OS_ANDROID)
1951 } 1963 }
1952 1964
1953 // Public members: 1965 // Public members:
1954 1966
1955 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1967 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1956 chrome_extra_parts_.push_back(parts); 1968 chrome_extra_parts_.push_back(parts);
1957 } 1969 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/component_updater/sth_set_component_installer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698