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 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1204 | 1204 |
1205 process_singleton_.reset(new ProcessSingleton(user_data_dir_)); | 1205 process_singleton_.reset(new ProcessSingleton(user_data_dir_)); |
1206 // Ensure ProcessSingleton won't process messages too early. It will be | 1206 // Ensure ProcessSingleton won't process messages too early. It will be |
1207 // unlocked in PostBrowserStart(). | 1207 // unlocked in PostBrowserStart(). |
1208 process_singleton_->Lock(NULL); | 1208 process_singleton_->Lock(NULL); |
1209 | 1209 |
1210 is_first_run_ = | 1210 is_first_run_ = |
1211 (first_run::IsChromeFirstRun() || | 1211 (first_run::IsChromeFirstRun() || |
1212 parsed_command_line().HasSwitch(switches::kFirstRun)) && | 1212 parsed_command_line().HasSwitch(switches::kFirstRun)) && |
1213 !HasImportSwitch(parsed_command_line()); | 1213 !HasImportSwitch(parsed_command_line()); |
1214 browser_process_.reset(new BrowserProcessImpl(parsed_command_line())); | 1214 browser_process_.reset(new BrowserProcessImpl(parsed_command_line(), |
| 1215 process_singleton_.get())); |
1215 | 1216 |
1216 if (parsed_command_line().HasSwitch(switches::kEnableProfiling)) { | 1217 if (parsed_command_line().HasSwitch(switches::kEnableProfiling)) { |
1217 // User wants to override default tracking status. | 1218 // User wants to override default tracking status. |
1218 std::string flag = | 1219 std::string flag = |
1219 parsed_command_line().GetSwitchValueASCII(switches::kEnableProfiling); | 1220 parsed_command_line().GetSwitchValueASCII(switches::kEnableProfiling); |
1220 // Default to basic profiling (no parent child support). | 1221 // Default to basic profiling (no parent child support). |
1221 tracked_objects::ThreadData::Status status = | 1222 tracked_objects::ThreadData::Status status = |
1222 tracked_objects::ThreadData::PROFILING_ACTIVE; | 1223 tracked_objects::ThreadData::PROFILING_ACTIVE; |
1223 if (flag.compare("0") != 0) | 1224 if (flag.compare("0") != 0) |
1224 status = tracked_objects::ThreadData::DEACTIVATED; | 1225 status = tracked_objects::ThreadData::DEACTIVATED; |
(...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2014 if (base::win::GetVersion() <= base::win::VERSION_XP) | 2015 if (base::win::GetVersion() <= base::win::VERSION_XP) |
2015 uma_name += "_XP"; | 2016 uma_name += "_XP"; |
2016 | 2017 |
2017 uma_name += "_PreRead_"; | 2018 uma_name += "_PreRead_"; |
2018 uma_name += pre_read_percentage; | 2019 uma_name += pre_read_percentage; |
2019 AddPreReadHistogramTime(uma_name.c_str(), time); | 2020 AddPreReadHistogramTime(uma_name.c_str(), time); |
2020 } | 2021 } |
2021 #endif | 2022 #endif |
2022 #endif | 2023 #endif |
2023 } | 2024 } |
OLD | NEW |