| 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 16 matching lines...) Expand all Loading... |
| 27 #include "base/threading/platform_thread.h" | 27 #include "base/threading/platform_thread.h" |
| 28 #include "base/time.h" | 28 #include "base/time.h" |
| 29 #include "base/utf_string_conversions.h" | 29 #include "base/utf_string_conversions.h" |
| 30 #include "base/values.h" | 30 #include "base/values.h" |
| 31 #include "build/build_config.h" | 31 #include "build/build_config.h" |
| 32 #include "chrome/browser/about_flags.h" | 32 #include "chrome/browser/about_flags.h" |
| 33 #include "chrome/browser/browser_process.h" | 33 #include "chrome/browser/browser_process.h" |
| 34 #include "chrome/browser/browser_process_impl.h" | 34 #include "chrome/browser/browser_process_impl.h" |
| 35 #include "chrome/browser/browser_shutdown.h" | 35 #include "chrome/browser/browser_shutdown.h" |
| 36 #include "chrome/browser/chrome_browser_main_extra_parts.h" | 36 #include "chrome/browser/chrome_browser_main_extra_parts.h" |
| 37 #include "chrome/browser/chrome_gpu_util.h" |
| 37 #include "chrome/browser/defaults.h" | 38 #include "chrome/browser/defaults.h" |
| 38 #include "chrome/browser/extensions/extension_protocols.h" | 39 #include "chrome/browser/extensions/extension_protocols.h" |
| 39 #include "chrome/browser/extensions/extension_service.h" | 40 #include "chrome/browser/extensions/extension_service.h" |
| 40 #include "chrome/browser/extensions/startup_helper.h" | 41 #include "chrome/browser/extensions/startup_helper.h" |
| 41 #include "chrome/browser/first_run/upgrade_util.h" | 42 #include "chrome/browser/first_run/upgrade_util.h" |
| 42 #include "chrome/browser/google/google_search_counter.h" | 43 #include "chrome/browser/google/google_search_counter.h" |
| 43 #include "chrome/browser/google/google_util.h" | 44 #include "chrome/browser/google/google_util.h" |
| 44 #include "chrome/browser/jankometer.h" | 45 #include "chrome/browser/jankometer.h" |
| 45 #include "chrome/browser/language_usage_metrics.h" | 46 #include "chrome/browser/language_usage_metrics.h" |
| 46 #include "chrome/browser/managed_mode.h" | 47 #include "chrome/browser/managed_mode.h" |
| (...skipping 1340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1387 int result_code; | 1388 int result_code; |
| 1388 #if defined(OS_CHROMEOS) | 1389 #if defined(OS_CHROMEOS) |
| 1389 // On ChromeOS multiple profiles doesn't apply, and will break if we load | 1390 // On ChromeOS multiple profiles doesn't apply, and will break if we load |
| 1390 // them this early as the cryptohome hasn't yet been mounted (which happens | 1391 // them this early as the cryptohome hasn't yet been mounted (which happens |
| 1391 // only once we log in. | 1392 // only once we log in. |
| 1392 std::vector<Profile*> last_opened_profiles; | 1393 std::vector<Profile*> last_opened_profiles; |
| 1393 #else | 1394 #else |
| 1394 std::vector<Profile*> last_opened_profiles = | 1395 std::vector<Profile*> last_opened_profiles = |
| 1395 g_browser_process->profile_manager()->GetLastOpenedProfiles(); | 1396 g_browser_process->profile_manager()->GetLastOpenedProfiles(); |
| 1396 #endif | 1397 #endif |
| 1398 |
| 1399 gpu_util::InitializeBrowserMonitor(); |
| 1400 |
| 1397 if (browser_creator_->Start(parsed_command_line(), FilePath(), | 1401 if (browser_creator_->Start(parsed_command_line(), FilePath(), |
| 1398 profile_, last_opened_profiles, &result_code)) { | 1402 profile_, last_opened_profiles, &result_code)) { |
| 1399 #if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) | 1403 #if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) |
| 1400 // Initialize autoupdate timer. Timer callback costs basically nothing | 1404 // Initialize autoupdate timer. Timer callback costs basically nothing |
| 1401 // when browser is not in persistent mode, so it's OK to let it ride on | 1405 // when browser is not in persistent mode, so it's OK to let it ride on |
| 1402 // the main thread. This needs to be done here because we don't want | 1406 // the main thread. This needs to be done here because we don't want |
| 1403 // to start the timer when Chrome is run inside a test harness. | 1407 // to start the timer when Chrome is run inside a test harness. |
| 1404 browser_process_->StartAutoupdateTimer(); | 1408 browser_process_->StartAutoupdateTimer(); |
| 1405 #endif | 1409 #endif |
| 1406 | 1410 |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1633 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1637 if (base::win::GetVersion() <= base::win::VERSION_XP) |
| 1634 uma_name += "_XP"; | 1638 uma_name += "_XP"; |
| 1635 | 1639 |
| 1636 uma_name += "_PreRead_"; | 1640 uma_name += "_PreRead_"; |
| 1637 uma_name += pre_read_percentage; | 1641 uma_name += pre_read_percentage; |
| 1638 AddPreReadHistogramTime(uma_name.c_str(), time); | 1642 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 1639 } | 1643 } |
| 1640 #endif | 1644 #endif |
| 1641 #endif | 1645 #endif |
| 1642 } | 1646 } |
| OLD | NEW |