| 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 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 UMA_TOUCH_EVENTS_STATE_COUNT); | 441 UMA_TOUCH_EVENTS_STATE_COUNT); |
| 442 } else if (touch_enabled_switch == switches::kTouchEventsDisabled) { | 442 } else if (touch_enabled_switch == switches::kTouchEventsDisabled) { |
| 443 UMA_HISTOGRAM_ENUMERATION("Touchscreen.TouchEventsEnabled", | 443 UMA_HISTOGRAM_ENUMERATION("Touchscreen.TouchEventsEnabled", |
| 444 UMA_TOUCH_EVENTS_DISABLED, | 444 UMA_TOUCH_EVENTS_DISABLED, |
| 445 UMA_TOUCH_EVENTS_STATE_COUNT); | 445 UMA_TOUCH_EVENTS_STATE_COUNT); |
| 446 } | 446 } |
| 447 } | 447 } |
| 448 | 448 |
| 449 void RegisterComponentsForUpdate(const CommandLine& command_line) { | 449 void RegisterComponentsForUpdate(const CommandLine& command_line) { |
| 450 ComponentUpdateService* cus = g_browser_process->component_updater(); | 450 ComponentUpdateService* cus = g_browser_process->component_updater(); |
| 451 if (!cus) | 451 |
| 452 return; | 452 // Registration can be before or after cus->Start() so it is ok to post |
| 453 // Registration can be before of after cus->Start() so it is ok to post | |
| 454 // 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 |
| 455 // file IO to know you existing component version. | 454 // file IO to know you existing component version. |
| 455 #if !defined(OS_CHROMEOS) |
| 456 RegisterRecoveryComponent(cus, g_browser_process->local_state()); | 456 RegisterRecoveryComponent(cus, g_browser_process->local_state()); |
| 457 RegisterPepperFlashComponent(cus); | 457 RegisterPepperFlashComponent(cus); |
| 458 RegisterSwiftShaderComponent(cus); | 458 RegisterSwiftShaderComponent(cus); |
| 459 | 459 |
| 460 // CRLSetFetcher attempts to load a CRL set from either the local disk or | 460 // CRLSetFetcher attempts to load a CRL set from either the local disk or |
| 461 // network. | 461 // network. |
| 462 if (!command_line.HasSwitch(switches::kDisableCRLSets)) | 462 if (!command_line.HasSwitch(switches::kDisableCRLSets)) |
| 463 g_browser_process->crl_set_fetcher()->StartInitialLoad(cus); | 463 g_browser_process->crl_set_fetcher()->StartInitialLoad(cus); |
| 464 #endif |
| 464 | 465 |
| 465 RegisterPnaclComponent(cus, command_line); | 466 g_browser_process->pnacl_component_installer()->RegisterPnaclComponent( |
| 467 cus, command_line); |
| 466 | 468 |
| 467 cus->Start(); | 469 cus->Start(); |
| 468 } | 470 } |
| 469 | 471 |
| 470 bool ProcessSingletonNotificationCallback( | 472 bool ProcessSingletonNotificationCallback( |
| 471 const CommandLine& command_line, | 473 const CommandLine& command_line, |
| 472 const base::FilePath& current_directory) { | 474 const base::FilePath& current_directory) { |
| 473 // Drop the request if the browser process is already in shutdown path. | 475 // Drop the request if the browser process is already in shutdown path. |
| 474 if (!g_browser_process || g_browser_process->IsShuttingDown()) | 476 if (!g_browser_process || g_browser_process->IsShuttingDown()) |
| 475 return false; | 477 return false; |
| (...skipping 1320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1796 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1798 if (base::win::GetVersion() <= base::win::VERSION_XP) |
| 1797 uma_name += "_XP"; | 1799 uma_name += "_XP"; |
| 1798 | 1800 |
| 1799 uma_name += "_PreRead_"; | 1801 uma_name += "_PreRead_"; |
| 1800 uma_name += pre_read_percentage; | 1802 uma_name += pre_read_percentage; |
| 1801 AddPreReadHistogramTime(uma_name.c_str(), time); | 1803 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 1802 } | 1804 } |
| 1803 #endif | 1805 #endif |
| 1804 #endif | 1806 #endif |
| 1805 } | 1807 } |
| OLD | NEW |