Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 378 #endif | 378 #endif |
| 379 | 379 |
| 380 void RegisterComponentsForUpdate(const CommandLine& command_line) { | 380 void RegisterComponentsForUpdate(const CommandLine& command_line) { |
| 381 component_updater::ComponentUpdateService* cus = | 381 component_updater::ComponentUpdateService* cus = |
| 382 g_browser_process->component_updater(); | 382 g_browser_process->component_updater(); |
| 383 | 383 |
| 384 // Registration can be before or after cus->Start() so it is ok to post | 384 // Registration can be before or after cus->Start() so it is ok to post |
| 385 // a task to the UI thread to do registration once you done the necessary | 385 // a task to the UI thread to do registration once you done the necessary |
| 386 // file IO to know you existing component version. | 386 // file IO to know you existing component version. |
| 387 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) | 387 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) |
| 388 RegisterRecoveryComponent(cus, g_browser_process->local_state()); | 388 base::FilePath recovery_base_dir; |
| 389 if (PathService::Get(chrome::DIR_RECOVERY_BASE, &recovery_base_dir)) { | |
| 390 RegisterRecoveryComponent(cus, g_browser_process->local_state(), | |
| 391 recovery_base_dir); | |
| 392 } | |
| 393 | |
| 389 RegisterPepperFlashComponent(cus); | 394 RegisterPepperFlashComponent(cus); |
| 390 RegisterSwiftShaderComponent(cus); | 395 |
| 396 base::FilePath user_data_dir; | |
| 397 if (PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) { | |
| 398 RegisterSwiftShaderComponent(cus, user_data_dir); | |
| 399 } | |
| 391 #endif | 400 #endif |
| 392 | 401 |
| 393 #if !defined(OS_ANDROID) | 402 #if !defined(OS_ANDROID) |
| 394 g_browser_process->pnacl_component_installer()->RegisterPnaclComponent( | 403 g_browser_process->pnacl_component_installer()->RegisterPnaclComponent( |
| 395 cus, command_line); | 404 cus, command_line); |
| 396 #endif | 405 #endif |
| 397 | 406 |
| 398 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) | 407 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) |
| 399 RegisterWidevineCdmComponent(cus); | 408 RegisterWidevineCdmComponent(cus); |
| 400 #endif | 409 #endif |
| 401 | 410 |
| 402 #if !defined(OS_CHROMEOS) | 411 #if !defined(OS_CHROMEOS) |
| 403 // CRLSetFetcher attempts to load a CRL set from either the local disk or | 412 // CRLSetFetcher attempts to load a CRL set from either the local disk or |
| 404 // network. | 413 // network. |
| 405 if (!command_line.HasSwitch(switches::kDisableCRLSets)) | 414 if (!command_line.HasSwitch(switches::kDisableCRLSets)) |
| 406 g_browser_process->crl_set_fetcher()->StartInitialLoad(cus); | 415 g_browser_process->crl_set_fetcher()->StartInitialLoad(cus); |
| 407 #endif | 416 #endif |
| 408 | 417 |
| 409 #if defined(CLD2_DYNAMIC_MODE) && defined(CLD2_IS_COMPONENT) | 418 #if defined(CLD2_DYNAMIC_MODE) && defined(CLD2_IS_COMPONENT) |
| 410 RegisterCldComponent(cus); | 419 base::FilePath cld2_base_dir; |
| 420 if (PathService::Get(chrome::DIR_COMPONENT_CLD2, &cld2_base_dir)) { | |
|
blundell
2014/06/17 17:26:42
Maybe the CLD-related constants should be moved in
tommycli
2014/06/17 19:01:57
This particular one would be tricky. Current defin
| |
| 421 RegisterCldComponent(cus, cld2_base_dir, | |
| 422 base::FilePath(chrome::kCLDDataFilename)); | |
| 423 } | |
| 411 #endif | 424 #endif |
| 412 | 425 |
| 413 cus->Start(); | 426 cus->Start(); |
| 414 } | 427 } |
| 415 | 428 |
| 416 #if !defined(OS_ANDROID) | 429 #if !defined(OS_ANDROID) |
| 417 bool ProcessSingletonNotificationCallback( | 430 bool ProcessSingletonNotificationCallback( |
| 418 const CommandLine& command_line, | 431 const CommandLine& command_line, |
| 419 const base::FilePath& current_directory) { | 432 const base::FilePath& current_directory) { |
| 420 // Drop the request if the browser process is already in shutdown path. | 433 // Drop the request if the browser process is already in shutdown path. |
| (...skipping 1233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1654 chromeos::CrosSettings::Shutdown(); | 1667 chromeos::CrosSettings::Shutdown(); |
| 1655 #endif | 1668 #endif |
| 1656 #endif | 1669 #endif |
| 1657 } | 1670 } |
| 1658 | 1671 |
| 1659 // Public members: | 1672 // Public members: |
| 1660 | 1673 |
| 1661 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1674 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 1662 chrome_extra_parts_.push_back(parts); | 1675 chrome_extra_parts_.push_back(parts); |
| 1663 } | 1676 } |
| OLD | NEW |