| 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 30 matching lines...) Expand all Loading... |
| 41 #include "chrome/browser/extensions/extension_protocols.h" | 41 #include "chrome/browser/extensions/extension_protocols.h" |
| 42 #include "chrome/browser/extensions/extension_service.h" | 42 #include "chrome/browser/extensions/extension_service.h" |
| 43 #include "chrome/browser/extensions/extensions_startup.h" | 43 #include "chrome/browser/extensions/extensions_startup.h" |
| 44 #include "chrome/browser/first_run/upgrade_util.h" | 44 #include "chrome/browser/first_run/upgrade_util.h" |
| 45 #include "chrome/browser/google/google_search_counter.h" | 45 #include "chrome/browser/google/google_search_counter.h" |
| 46 #include "chrome/browser/google/google_util.h" | 46 #include "chrome/browser/google/google_util.h" |
| 47 #include "chrome/browser/gpu_blacklist.h" | 47 #include "chrome/browser/gpu_blacklist.h" |
| 48 #include "chrome/browser/gpu_util.h" | 48 #include "chrome/browser/gpu_util.h" |
| 49 #include "chrome/browser/jankometer.h" | 49 #include "chrome/browser/jankometer.h" |
| 50 #include "chrome/browser/language_usage_metrics.h" | 50 #include "chrome/browser/language_usage_metrics.h" |
| 51 #include "chrome/browser/managed_mode.h" |
| 51 #include "chrome/browser/metrics/field_trial_synchronizer.h" | 52 #include "chrome/browser/metrics/field_trial_synchronizer.h" |
| 52 #include "chrome/browser/metrics/histogram_synchronizer.h" | 53 #include "chrome/browser/metrics/histogram_synchronizer.h" |
| 53 #include "chrome/browser/metrics/metrics_log.h" | 54 #include "chrome/browser/metrics/metrics_log.h" |
| 54 #include "chrome/browser/metrics/metrics_service.h" | 55 #include "chrome/browser/metrics/metrics_service.h" |
| 55 #include "chrome/browser/metrics/thread_watcher.h" | 56 #include "chrome/browser/metrics/thread_watcher.h" |
| 56 #include "chrome/browser/metrics/tracking_synchronizer.h" | 57 #include "chrome/browser/metrics/tracking_synchronizer.h" |
| 57 #include "chrome/browser/metrics/variations_service.h" | 58 #include "chrome/browser/metrics/variations_service.h" |
| 58 #include "chrome/browser/nacl_host/nacl_process_host.h" | 59 #include "chrome/browser/nacl_host/nacl_process_host.h" |
| 59 #include "chrome/browser/net/chrome_net_log.h" | 60 #include "chrome/browser/net/chrome_net_log.h" |
| 60 #include "chrome/browser/net/predictor.h" | 61 #include "chrome/browser/net/predictor.h" |
| (...skipping 1540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1601 if (!parsed_command_line().HasSwitch(switches::kChromeFrame) && | 1602 if (!parsed_command_line().HasSwitch(switches::kChromeFrame) && |
| 1602 ChromeBrowserMainPartsWin::CheckMachineLevelInstall()) { | 1603 ChromeBrowserMainPartsWin::CheckMachineLevelInstall()) { |
| 1603 return chrome::RESULT_CODE_MACHINE_LEVEL_INSTALL_EXISTS; | 1604 return chrome::RESULT_CODE_MACHINE_LEVEL_INSTALL_EXISTS; |
| 1604 } | 1605 } |
| 1605 #endif | 1606 #endif |
| 1606 | 1607 |
| 1607 // Create the TranslateManager singleton. | 1608 // Create the TranslateManager singleton. |
| 1608 translate_manager_ = TranslateManager::GetInstance(); | 1609 translate_manager_ = TranslateManager::GetInstance(); |
| 1609 DCHECK(translate_manager_ != NULL); | 1610 DCHECK(translate_manager_ != NULL); |
| 1610 | 1611 |
| 1611 // TODO(stevenjb): Move WIN and MACOSX specific code to apprpriate Parts. | 1612 // Initialize Managed Mode. |
| 1613 ManagedMode::Init(profile_); |
| 1614 |
| 1615 // TODO(stevenjb): Move WIN and MACOSX specific code to appropriate Parts. |
| 1612 // (requires supporting early exit). | 1616 // (requires supporting early exit). |
| 1613 PostProfileInit(); | 1617 PostProfileInit(); |
| 1614 | 1618 |
| 1615 // Show the First Run UI if this is the first time Chrome has been run on | 1619 // Show the First Run UI if this is the first time Chrome has been run on |
| 1616 // this computer, or we're being compelled to do so by a command line flag. | 1620 // this computer, or we're being compelled to do so by a command line flag. |
| 1617 // Note that this be done _after_ the PrefService is initialized and all | 1621 // Note that this be done _after_ the PrefService is initialized and all |
| 1618 // preferences are registered, since some of the code that the importer | 1622 // preferences are registered, since some of the code that the importer |
| 1619 // touches reads preferences. | 1623 // touches reads preferences. |
| 1620 if (is_first_run_) { | 1624 if (is_first_run_) { |
| 1621 if (!first_run_ui_bypass_) { | 1625 if (!first_run_ui_bypass_) { |
| (...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2014 if (base::win::GetVersion() <= base::win::VERSION_XP) | 2018 if (base::win::GetVersion() <= base::win::VERSION_XP) |
| 2015 uma_name += "_XP"; | 2019 uma_name += "_XP"; |
| 2016 | 2020 |
| 2017 uma_name += "_PreRead_"; | 2021 uma_name += "_PreRead_"; |
| 2018 uma_name += pre_read_percentage; | 2022 uma_name += pre_read_percentage; |
| 2019 AddPreReadHistogramTime(uma_name.c_str(), time); | 2023 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 2020 } | 2024 } |
| 2021 #endif | 2025 #endif |
| 2022 #endif | 2026 #endif |
| 2023 } | 2027 } |
| OLD | NEW |