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