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 #if defined(TOOLKIT_GTK) | 7 #if defined(TOOLKIT_GTK) |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 473 } | 473 } |
| 474 } | 474 } |
| 475 | 475 |
| 476 void RegisterComponentsForUpdate(const CommandLine& command_line) { | 476 void RegisterComponentsForUpdate(const CommandLine& command_line) { |
| 477 ComponentUpdateService* cus = g_browser_process->component_updater(); | 477 ComponentUpdateService* cus = g_browser_process->component_updater(); |
| 478 if (!cus) | 478 if (!cus) |
| 479 return; | 479 return; |
| 480 // Registration can be before of after cus->Start() so it is ok to post | 480 // Registration can be before of after cus->Start() so it is ok to post |
| 481 // a task to the UI thread to do registration once you done the necessary | 481 // a task to the UI thread to do registration once you done the necessary |
| 482 // file IO to know you existing component version. | 482 // file IO to know you existing component version. |
| 483 #if !defined(OS_CHROMEOS) | |
| 483 RegisterRecoveryComponent(cus, g_browser_process->local_state()); | 484 RegisterRecoveryComponent(cus, g_browser_process->local_state()); |
| 484 RegisterPepperFlashComponent(cus); | 485 RegisterPepperFlashComponent(cus); |
| 485 RegisterSwiftShaderComponent(cus); | 486 RegisterSwiftShaderComponent(cus); |
| 486 | 487 |
| 487 // CRLSetFetcher attempts to load a CRL set from either the local disk or | 488 // CRLSetFetcher attempts to load a CRL set from either the local disk or |
| 488 // network. | 489 // network. |
| 489 if (!command_line.HasSwitch(switches::kDisableCRLSets)) | 490 if (!command_line.HasSwitch(switches::kDisableCRLSets)) |
| 490 g_browser_process->crl_set_fetcher()->StartInitialLoad(cus); | 491 if (g_browser_process->crl_set_fetcher()) { |
|
sky
2013/03/26 21:04:44
combine with previous if
jvoung (off chromium)
2013/03/26 21:33:34
Done.
| |
| 492 g_browser_process->crl_set_fetcher()->StartInitialLoad(cus); | |
| 493 } | |
| 494 #endif | |
| 491 | 495 |
| 492 RegisterPnaclComponent(cus, command_line); | 496 if (g_browser_process->pnacl_component_installer()) { |
| 497 g_browser_process->pnacl_component_installer()->RegisterPnaclComponent( | |
| 498 cus, command_line); | |
| 499 } | |
| 493 | 500 |
| 494 cus->Start(); | 501 cus->Start(); |
| 495 } | 502 } |
| 496 | 503 |
| 497 bool ProcessSingletonNotificationCallback( | 504 bool ProcessSingletonNotificationCallback( |
| 498 const CommandLine& command_line, | 505 const CommandLine& command_line, |
| 499 const base::FilePath& current_directory) { | 506 const base::FilePath& current_directory) { |
| 500 // Drop the request if the browser process is already in shutdown path. | 507 // Drop the request if the browser process is already in shutdown path. |
| 501 if (!g_browser_process || g_browser_process->IsShuttingDown()) | 508 if (!g_browser_process || g_browser_process->IsShuttingDown()) |
| 502 return false; | 509 return false; |
| (...skipping 1311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1814 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1821 if (base::win::GetVersion() <= base::win::VERSION_XP) |
| 1815 uma_name += "_XP"; | 1822 uma_name += "_XP"; |
| 1816 | 1823 |
| 1817 uma_name += "_PreRead_"; | 1824 uma_name += "_PreRead_"; |
| 1818 uma_name += pre_read_percentage; | 1825 uma_name += pre_read_percentage; |
| 1819 AddPreReadHistogramTime(uma_name.c_str(), time); | 1826 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 1820 } | 1827 } |
| 1821 #endif | 1828 #endif |
| 1822 #endif | 1829 #endif |
| 1823 } | 1830 } |
| OLD | NEW |