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 1289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1300 if (extension_startup_helper.UninstallExtension( | 1300 if (extension_startup_helper.UninstallExtension( |
1301 parsed_command_line(), profile_)) | 1301 parsed_command_line(), profile_)) |
1302 return content::RESULT_CODE_NORMAL_EXIT; | 1302 return content::RESULT_CODE_NORMAL_EXIT; |
1303 return chrome::RESULT_CODE_UNINSTALL_EXTENSION_ERROR; | 1303 return chrome::RESULT_CODE_UNINSTALL_EXTENSION_ERROR; |
1304 } | 1304 } |
1305 | 1305 |
1306 if (parsed_command_line().HasSwitch(switches::kInstallFromWebstore)) { | 1306 if (parsed_command_line().HasSwitch(switches::kInstallFromWebstore)) { |
1307 extensions::StartupHelper helper; | 1307 extensions::StartupHelper helper; |
1308 if (helper.InstallFromWebstore(parsed_command_line(), profile_)) | 1308 if (helper.InstallFromWebstore(parsed_command_line(), profile_)) |
1309 return content::RESULT_CODE_NORMAL_EXIT; | 1309 return content::RESULT_CODE_NORMAL_EXIT; |
1310 return chrome::RESULT_CODE_INSTALL_FROM_WEBSTORE_ERROR; | 1310 return chrome::RESULT_CODE_INSTALL_FROM_WEBSTORE_ERROR_2; |
1311 } | 1311 } |
1312 | 1312 |
1313 | 1313 |
1314 // Start watching for hangs during startup. We disarm this hang detector when | 1314 // Start watching for hangs during startup. We disarm this hang detector when |
1315 // ThreadWatcher takes over or when browser is shutdown or when | 1315 // ThreadWatcher takes over or when browser is shutdown or when |
1316 // startup_watcher_ is deleted. | 1316 // startup_watcher_ is deleted. |
1317 startup_watcher_->Arm(base::TimeDelta::FromSeconds(300)); | 1317 startup_watcher_->Arm(base::TimeDelta::FromSeconds(300)); |
1318 | 1318 |
1319 // Start watching for a hang. | 1319 // Start watching for a hang. |
1320 MetricsService::LogNeedForCleanShutdown(); | 1320 MetricsService::LogNeedForCleanShutdown(); |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1610 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1610 if (base::win::GetVersion() <= base::win::VERSION_XP) |
1611 uma_name += "_XP"; | 1611 uma_name += "_XP"; |
1612 | 1612 |
1613 uma_name += "_PreRead_"; | 1613 uma_name += "_PreRead_"; |
1614 uma_name += pre_read_percentage; | 1614 uma_name += pre_read_percentage; |
1615 AddPreReadHistogramTime(uma_name.c_str(), time); | 1615 AddPreReadHistogramTime(uma_name.c_str(), time); |
1616 } | 1616 } |
1617 #endif | 1617 #endif |
1618 #endif | 1618 #endif |
1619 } | 1619 } |
OLD | NEW |