| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 #include "chrome/browser/metrics/metrics_log.h" | 49 #include "chrome/browser/metrics/metrics_log.h" |
| 50 #include "chrome/browser/metrics/metrics_service.h" | 50 #include "chrome/browser/metrics/metrics_service.h" |
| 51 #include "chrome/browser/metrics/thread_watcher.h" | 51 #include "chrome/browser/metrics/thread_watcher.h" |
| 52 #include "chrome/browser/metrics/tracking_synchronizer.h" | 52 #include "chrome/browser/metrics/tracking_synchronizer.h" |
| 53 #include "chrome/browser/metrics/variations_service.h" | 53 #include "chrome/browser/metrics/variations_service.h" |
| 54 #include "chrome/browser/nacl_host/nacl_process_host.h" | 54 #include "chrome/browser/nacl_host/nacl_process_host.h" |
| 55 #include "chrome/browser/net/chrome_net_log.h" | 55 #include "chrome/browser/net/chrome_net_log.h" |
| 56 #include "chrome/browser/notifications/desktop_notification_service.h" | 56 #include "chrome/browser/notifications/desktop_notification_service.h" |
| 57 #include "chrome/browser/notifications/desktop_notification_service_factory.h" | 57 #include "chrome/browser/notifications/desktop_notification_service_factory.h" |
| 58 #include "chrome/browser/page_cycler/page_cycler.h" | 58 #include "chrome/browser/page_cycler/page_cycler.h" |
| 59 #include "chrome/browser/performance_monitor/performance_monitor.h" |
| 59 #include "chrome/browser/performance_monitor/startup_timer.h" | 60 #include "chrome/browser/performance_monitor/startup_timer.h" |
| 60 #include "chrome/browser/plugin_prefs.h" | 61 #include "chrome/browser/plugin_prefs.h" |
| 61 #include "chrome/browser/prefs/pref_service.h" | 62 #include "chrome/browser/prefs/pref_service.h" |
| 62 #include "chrome/browser/prefs/pref_value_store.h" | 63 #include "chrome/browser/prefs/pref_value_store.h" |
| 63 #include "chrome/browser/prefs/scoped_user_pref_update.h" | 64 #include "chrome/browser/prefs/scoped_user_pref_update.h" |
| 64 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" | 65 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" |
| 65 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.
h" | 66 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.
h" |
| 66 #include "chrome/browser/process_singleton.h" | 67 #include "chrome/browser/process_singleton.h" |
| 67 #include "chrome/browser/profiles/profile.h" | 68 #include "chrome/browser/profiles/profile.h" |
| 68 #include "chrome/browser/profiles/profile_manager.h" | 69 #include "chrome/browser/profiles/profile_manager.h" |
| (...skipping 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1423 startup_timer_->SignalStartupComplete( | 1424 startup_timer_->SignalStartupComplete( |
| 1424 performance_monitor::StartupTimer::STARTUP_NORMAL); | 1425 performance_monitor::StartupTimer::STARTUP_NORMAL); |
| 1425 | 1426 |
| 1426 DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type()); | 1427 DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type()); |
| 1427 #if !defined(USE_AURA) && defined(TOOLKIT_VIEWS) | 1428 #if !defined(USE_AURA) && defined(TOOLKIT_VIEWS) |
| 1428 views::AcceleratorHandler accelerator_handler; | 1429 views::AcceleratorHandler accelerator_handler; |
| 1429 base::RunLoop run_loop(&accelerator_handler); | 1430 base::RunLoop run_loop(&accelerator_handler); |
| 1430 #else | 1431 #else |
| 1431 base::RunLoop run_loop; | 1432 base::RunLoop run_loop; |
| 1432 #endif | 1433 #endif |
| 1434 |
| 1435 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 1436 switches::kRunPerformanceMonitor)) { |
| 1437 performance_monitor::PerformanceMonitor::GetInstance()->Start(); |
| 1438 } |
| 1439 |
| 1433 run_loop.Run(); | 1440 run_loop.Run(); |
| 1434 | 1441 |
| 1435 return true; | 1442 return true; |
| 1436 #endif | 1443 #endif |
| 1437 } | 1444 } |
| 1438 | 1445 |
| 1439 void ChromeBrowserMainParts::PostMainMessageLoopRun() { | 1446 void ChromeBrowserMainParts::PostMainMessageLoopRun() { |
| 1440 #if defined(OS_ANDROID) | 1447 #if defined(OS_ANDROID) |
| 1441 // Chrome on Android does not use default MessageLoop. It has its own | 1448 // Chrome on Android does not use default MessageLoop. It has its own |
| 1442 // Android specific MessageLoop | 1449 // Android specific MessageLoop |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1553 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1560 if (base::win::GetVersion() <= base::win::VERSION_XP) |
| 1554 uma_name += "_XP"; | 1561 uma_name += "_XP"; |
| 1555 | 1562 |
| 1556 uma_name += "_PreRead_"; | 1563 uma_name += "_PreRead_"; |
| 1557 uma_name += pre_read_percentage; | 1564 uma_name += pre_read_percentage; |
| 1558 AddPreReadHistogramTime(uma_name.c_str(), time); | 1565 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 1559 } | 1566 } |
| 1560 #endif | 1567 #endif |
| 1561 #endif | 1568 #endif |
| 1562 } | 1569 } |
| OLD | NEW |