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

Side by Side Diff: chrome/browser/ui/browser_init.cc

Issue 8342054: net: enable CRL sets behind a command line flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/net/ssl_config_service_manager_pref.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/ui/browser_init.h" 5 #include "chrome/browser/ui/browser_init.h"
6 6
7 #include <algorithm> // For max(). 7 #include <algorithm> // For max().
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/environment.h" 10 #include "base/environment.h"
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 } 519 }
520 for (size_t i = 0; i < autolaunch_tabs.size(); ++i) { 520 for (size_t i = 0; i < autolaunch_tabs.size(); ++i) {
521 if (extension_service->IsInstalledApp(autolaunch_tabs.at(i).url)) { 521 if (extension_service->IsInstalledApp(autolaunch_tabs.at(i).url)) {
522 UMA_HISTOGRAM_ENUMERATION(extension_misc::kAppLaunchHistogram, 522 UMA_HISTOGRAM_ENUMERATION(extension_misc::kAppLaunchHistogram,
523 extension_misc::APP_LAUNCH_AUTOLAUNCH, 523 extension_misc::APP_LAUNCH_AUTOLAUNCH,
524 extension_misc::APP_LAUNCH_BUCKET_BOUNDARY); 524 extension_misc::APP_LAUNCH_BUCKET_BOUNDARY);
525 } 525 }
526 } 526 }
527 } 527 }
528 528
529 void RegisterComponentsForUpdate() { 529 void RegisterComponentsForUpdate(const CommandLine& command_line) {
530 ComponentUpdateService* cus = g_browser_process->component_updater(); 530 ComponentUpdateService* cus = g_browser_process->component_updater();
531 if (!cus) 531 if (!cus)
532 return; 532 return;
533 // Registration can be before of after cus->Start() so it is ok to post 533 // Registration can be before of after cus->Start() so it is ok to post
534 // a task to the UI thread to do registration once you done the necessary 534 // a task to the UI thread to do registration once you done the necessary
535 // file IO to know you existing component version. 535 // file IO to know you existing component version.
536 RegisterRecoveryComponent(cus, g_browser_process->local_state()); 536 RegisterRecoveryComponent(cus, g_browser_process->local_state());
537 RegisterPepperFlashComponent(cus); 537 RegisterPepperFlashComponent(cus);
538 RegisterNPAPIFlashComponent(cus); 538 RegisterNPAPIFlashComponent(cus);
539 539
540 // CRLSetFetcher attempts to load a CRL set from either the local disk 540 // CRLSetFetcher attempts to load a CRL set from either the local disk or
541 // or network. 541 // network.
542 // TODO(agl): this is disabled for now while it's plumbed in. 542 if (command_line.HasSwitch(switches::kEnableCRLSets))
543 // g_browser_process->crl_set_fetcher()->StartInitialLoad(cus); 543 g_browser_process->crl_set_fetcher()->StartInitialLoad(cus);
544 544
545 cus->Start(); 545 cus->Start();
546 } 546 }
547 547
548 } // namespace 548 } // namespace
549 549
550 550
551 // BrowserInit ---------------------------------------------------------------- 551 // BrowserInit ----------------------------------------------------------------
552 552
553 BrowserInit::BrowserInit() {} 553 BrowserInit::BrowserInit() {}
(...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after
1382 const FilePath& cur_dir, 1382 const FilePath& cur_dir,
1383 bool process_startup, 1383 bool process_startup,
1384 Profile* profile, 1384 Profile* profile,
1385 int* return_code, 1385 int* return_code,
1386 BrowserInit* browser_init) { 1386 BrowserInit* browser_init) {
1387 DCHECK(profile); 1387 DCHECK(profile);
1388 if (process_startup) { 1388 if (process_startup) {
1389 if (command_line.HasSwitch(switches::kDisablePromptOnRepost)) 1389 if (command_line.HasSwitch(switches::kDisablePromptOnRepost))
1390 NavigationController::DisablePromptOnRepost(); 1390 NavigationController::DisablePromptOnRepost();
1391 1391
1392 RegisterComponentsForUpdate(); 1392 RegisterComponentsForUpdate(command_line);
1393 1393
1394 // Look for the testing channel ID ONLY during process startup 1394 // Look for the testing channel ID ONLY during process startup
1395 if (command_line.HasSwitch(switches::kTestingChannelID)) { 1395 if (command_line.HasSwitch(switches::kTestingChannelID)) {
1396 std::string testing_channel_id = command_line.GetSwitchValueASCII( 1396 std::string testing_channel_id = command_line.GetSwitchValueASCII(
1397 switches::kTestingChannelID); 1397 switches::kTestingChannelID);
1398 // TODO(sanjeevr) Check if we need to make this a singleton for 1398 // TODO(sanjeevr) Check if we need to make this a singleton for
1399 // compatibility with the old testing code 1399 // compatibility with the old testing code
1400 // If there are any extra parameters, we expect each one to generate a 1400 // If there are any extra parameters, we expect each one to generate a
1401 // new tab; if there are none then we get one homepage tab. 1401 // new tab; if there are none then we get one homepage tab.
1402 int expected_tab_count = 1; 1402 int expected_tab_count = 1;
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
1528 if (!automation->InitializeChannel(channel_id)) 1528 if (!automation->InitializeChannel(channel_id))
1529 return false; 1529 return false;
1530 automation->SetExpectedTabCount(expected_tabs); 1530 automation->SetExpectedTabCount(expected_tabs);
1531 1531
1532 AutomationProviderList* list = g_browser_process->GetAutomationProviderList(); 1532 AutomationProviderList* list = g_browser_process->GetAutomationProviderList();
1533 DCHECK(list); 1533 DCHECK(list);
1534 list->AddProvider(automation); 1534 list->AddProvider(automation);
1535 1535
1536 return true; 1536 return true;
1537 } 1537 }
OLDNEW
« no previous file with comments | « chrome/browser/net/ssl_config_service_manager_pref.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698