| 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 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 UMA_TOUCH_EVENTS_STATE_COUNT); | 444 UMA_TOUCH_EVENTS_STATE_COUNT); |
| 445 } else if (touch_enabled_switch == switches::kTouchEventsDisabled) { | 445 } else if (touch_enabled_switch == switches::kTouchEventsDisabled) { |
| 446 UMA_HISTOGRAM_ENUMERATION("Touchscreen.TouchEventsEnabled", | 446 UMA_HISTOGRAM_ENUMERATION("Touchscreen.TouchEventsEnabled", |
| 447 UMA_TOUCH_EVENTS_DISABLED, | 447 UMA_TOUCH_EVENTS_DISABLED, |
| 448 UMA_TOUCH_EVENTS_STATE_COUNT); | 448 UMA_TOUCH_EVENTS_STATE_COUNT); |
| 449 } | 449 } |
| 450 } | 450 } |
| 451 | 451 |
| 452 void RegisterComponentsForUpdate(const CommandLine& command_line) { | 452 void RegisterComponentsForUpdate(const CommandLine& command_line) { |
| 453 ComponentUpdateService* cus = g_browser_process->component_updater(); | 453 ComponentUpdateService* cus = g_browser_process->component_updater(); |
| 454 if (!cus) | 454 |
| 455 return; | |
| 456 // Registration can be before of after cus->Start() so it is ok to post | 455 // Registration can be before of after cus->Start() so it is ok to post |
| 457 // a task to the UI thread to do registration once you done the necessary | 456 // a task to the UI thread to do registration once you done the necessary |
| 458 // file IO to know you existing component version. | 457 // file IO to know you existing component version. |
| 458 #if !defined(OS_CHROMEOS) |
| 459 RegisterRecoveryComponent(cus, g_browser_process->local_state()); | 459 RegisterRecoveryComponent(cus, g_browser_process->local_state()); |
| 460 RegisterPepperFlashComponent(cus); | 460 RegisterPepperFlashComponent(cus); |
| 461 RegisterSwiftShaderComponent(cus); | 461 RegisterSwiftShaderComponent(cus); |
| 462 | 462 |
| 463 // CRLSetFetcher attempts to load a CRL set from either the local disk or | 463 // CRLSetFetcher attempts to load a CRL set from either the local disk or |
| 464 // network. | 464 // network. |
| 465 if (!command_line.HasSwitch(switches::kDisableCRLSets)) | 465 if (!command_line.HasSwitch(switches::kDisableCRLSets)) |
| 466 g_browser_process->crl_set_fetcher()->StartInitialLoad(cus); | 466 g_browser_process->crl_set_fetcher()->StartInitialLoad(cus); |
| 467 #endif |
| 467 | 468 |
| 468 RegisterPnaclComponent(cus, command_line); | 469 g_browser_process->pnacl_component_installer()->RegisterPnaclComponent( |
| 470 cus, command_line); |
| 469 | 471 |
| 470 cus->Start(); | 472 cus->Start(); |
| 471 } | 473 } |
| 472 | 474 |
| 473 bool ProcessSingletonNotificationCallback( | 475 bool ProcessSingletonNotificationCallback( |
| 474 const CommandLine& command_line, | 476 const CommandLine& command_line, |
| 475 const base::FilePath& current_directory) { | 477 const base::FilePath& current_directory) { |
| 476 // Drop the request if the browser process is already in shutdown path. | 478 // Drop the request if the browser process is already in shutdown path. |
| 477 if (!g_browser_process || g_browser_process->IsShuttingDown()) | 479 if (!g_browser_process || g_browser_process->IsShuttingDown()) |
| 478 return false; | 480 return false; |
| (...skipping 1317 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 |