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

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

Issue 547603002: Certificate Transparency: Code for unpacking EV cert hashes whitelist (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Avoiding globals in favour of passing the SSLConfigService around Created 6 years, 2 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 <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 return NULL; 383 return NULL;
384 } 384 }
385 385
386 #if defined(OS_MACOSX) 386 #if defined(OS_MACOSX)
387 OSStatus KeychainCallback(SecKeychainEvent keychain_event, 387 OSStatus KeychainCallback(SecKeychainEvent keychain_event,
388 SecKeychainCallbackInfo* info, void* context) { 388 SecKeychainCallbackInfo* info, void* context) {
389 return noErr; 389 return noErr;
390 } 390 }
391 #endif 391 #endif
392 392
393 void RegisterComponentsForUpdate() { 393 void RegisterComponentsForUpdate(net::SSLConfigService* ssl_config_service) {
Sorin Jianu 2014/10/01 18:50:02 Eran, I see this additional parameter is dependent
Eran Messeri 2014/10/03 12:00:11 Removed this, as I've reverted back to the approac
394 component_updater::ComponentUpdateService* cus = 394 component_updater::ComponentUpdateService* cus =
395 g_browser_process->component_updater(); 395 g_browser_process->component_updater();
396 396
397 // Registration can be before or after cus->Start() so it is ok to post 397 // Registration can be before or after cus->Start() so it is ok to post
398 // a task to the UI thread to do registration once you done the necessary 398 // a task to the UI thread to do registration once you done the necessary
399 // file IO to know you existing component version. 399 // file IO to know you existing component version.
400 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) 400 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
401 RegisterRecoveryComponent(cus, g_browser_process->local_state()); 401 RegisterRecoveryComponent(cus, g_browser_process->local_state());
402 RegisterPepperFlashComponent(cus); 402 RegisterPepperFlashComponent(cus);
403 RegisterSwiftShaderComponent(cus); 403 RegisterSwiftShaderComponent(cus);
(...skipping 17 matching lines...) Expand all
421 // CRLSetFetcher attempts to load a CRL set from either the local disk or 421 // CRLSetFetcher attempts to load a CRL set from either the local disk or
422 // network. 422 // network.
423 // For Chrome OS this registration is delayed until user login. 423 // For Chrome OS this registration is delayed until user login.
424 g_browser_process->crl_set_fetcher()->StartInitialLoad(cus, path); 424 g_browser_process->crl_set_fetcher()->StartInitialLoad(cus, path);
425 #endif 425 #endif
426 } 426 }
427 427
428 #if !defined(OS_ANDROID) 428 #if !defined(OS_ANDROID)
429 // Android does not currently have the EV indicator. No need to get the 429 // Android does not currently have the EV indicator. No need to get the
430 // EV certs whitelist on Android, then. 430 // EV certs whitelist on Android, then.
431 RegisterEVWhitelistComponent(cus); 431 RegisterEVWhitelistComponent(cus, ssl_config_service);
Ryan Sleevi 2014/10/01 20:15:42 CRLSets, which have a similar purpose as this, don
Eran Messeri 2014/10/03 12:00:11 Done.
432 #endif 432 #endif
433 433
434 #if defined(OS_WIN) 434 #if defined(OS_WIN)
435 RegisterSwReporterComponent(cus, g_browser_process->local_state()); 435 RegisterSwReporterComponent(cus, g_browser_process->local_state());
436 #endif 436 #endif
437 437
438 cus->Start(); 438 cus->Start();
439 } 439 }
440 440
441 #if !defined(OS_ANDROID) 441 #if !defined(OS_ANDROID)
(...skipping 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after
1459 1459
1460 PreBrowserStart(); 1460 PreBrowserStart();
1461 1461
1462 // Instantiate the notification UI manager, as this triggers a perf timer 1462 // Instantiate the notification UI manager, as this triggers a perf timer
1463 // used to measure startup time. TODO(stevenjb): Figure out what is actually 1463 // used to measure startup time. TODO(stevenjb): Figure out what is actually
1464 // triggering the timer and call that explicitly in the approprate place. 1464 // triggering the timer and call that explicitly in the approprate place.
1465 // http://crbug.com/105065. 1465 // http://crbug.com/105065.
1466 browser_process_->notification_ui_manager(); 1466 browser_process_->notification_ui_manager();
1467 1467
1468 if (!parsed_command_line().HasSwitch(switches::kDisableComponentUpdate)) 1468 if (!parsed_command_line().HasSwitch(switches::kDisableComponentUpdate))
1469 RegisterComponentsForUpdate(); 1469 RegisterComponentsForUpdate(profile_->GetSSLConfigService());
Sorin Jianu 2014/10/01 18:50:02 I don't know how user switching and profiles work,
Eran Messeri 2014/10/03 12:00:11 As mentioned, removed.
1470 1470
1471 #if defined(OS_ANDROID) 1471 #if defined(OS_ANDROID)
1472 chrome_variations::VariationsService* variations_service = 1472 chrome_variations::VariationsService* variations_service =
1473 browser_process_->variations_service(); 1473 browser_process_->variations_service();
1474 if (variations_service) { 1474 if (variations_service) {
1475 variations_service->set_policy_pref_service(profile_->GetPrefs()); 1475 variations_service->set_policy_pref_service(profile_->GetPrefs());
1476 variations_service->StartRepeatedVariationsSeedFetch(); 1476 variations_service->StartRepeatedVariationsSeedFetch();
1477 } 1477 }
1478 translate::TranslateDownloadManager::RequestLanguageList( 1478 translate::TranslateDownloadManager::RequestLanguageList(
1479 profile_->GetPrefs()); 1479 profile_->GetPrefs());
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
1676 chromeos::CrosSettings::Shutdown(); 1676 chromeos::CrosSettings::Shutdown();
1677 #endif 1677 #endif
1678 #endif 1678 #endif
1679 } 1679 }
1680 1680
1681 // Public members: 1681 // Public members:
1682 1682
1683 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1683 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1684 chrome_extra_parts_.push_back(parts); 1684 chrome_extra_parts_.push_back(parts);
1685 } 1685 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698