Chromium Code Reviews| 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 1320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1331 // specifies --uninstall-extension, attempt the uninstall extension startup | 1331 // specifies --uninstall-extension, attempt the uninstall extension startup |
| 1332 // action. | 1332 // action. |
| 1333 if (parsed_command_line().HasSwitch(switches::kUninstallExtension)) { | 1333 if (parsed_command_line().HasSwitch(switches::kUninstallExtension)) { |
| 1334 extensions::StartupHelper extension_startup_helper; | 1334 extensions::StartupHelper extension_startup_helper; |
| 1335 if (extension_startup_helper.UninstallExtension( | 1335 if (extension_startup_helper.UninstallExtension( |
| 1336 parsed_command_line(), profile_)) | 1336 parsed_command_line(), profile_)) |
| 1337 return content::RESULT_CODE_NORMAL_EXIT; | 1337 return content::RESULT_CODE_NORMAL_EXIT; |
| 1338 return chrome::RESULT_CODE_UNINSTALL_EXTENSION_ERROR; | 1338 return chrome::RESULT_CODE_UNINSTALL_EXTENSION_ERROR; |
| 1339 } | 1339 } |
| 1340 | 1340 |
| 1341 if (parsed_command_line().HasSwitch(switches::kAppsInstallFromID)) { | |
| 1342 const CommandLine& cmdline = parsed_command_line(); | |
| 1343 extensions::StartupHelper helper; | |
| 1344 if (helper.InstallAppFromID( | |
| 1345 cmdline.GetSwitchValueASCII(switches::kAppsInstallFromID), | |
|
Mihai Parparita -not on Chrome
2012/09/07 22:01:36
Other StartupHelper methods take the whole Command
asargent_no_longer_on_chrome
2012/09/14 23:24:35
Done.
| |
| 1346 profile_)) | |
| 1347 return content::RESULT_CODE_NORMAL_EXIT; | |
| 1348 else | |
|
Mihai Parparita -not on Chrome
2012/09/07 22:01:36
Unnecessary else, given the return above.
asargent_no_longer_on_chrome
2012/09/14 23:24:35
Done.
| |
| 1349 return chrome::RESULT_CODE_INSTALL_APP_FROM_ID_ERROR; | |
| 1350 } | |
| 1351 | |
| 1352 | |
| 1341 // Start watching for hangs during startup. We disarm this hang detector when | 1353 // Start watching for hangs during startup. We disarm this hang detector when |
| 1342 // ThreadWatcher takes over or when browser is shutdown or when | 1354 // ThreadWatcher takes over or when browser is shutdown or when |
| 1343 // startup_watcher_ is deleted. | 1355 // startup_watcher_ is deleted. |
| 1344 startup_watcher_->Arm(base::TimeDelta::FromSeconds(300)); | 1356 startup_watcher_->Arm(base::TimeDelta::FromSeconds(300)); |
| 1345 | 1357 |
| 1346 // Start watching for a hang. | 1358 // Start watching for a hang. |
| 1347 MetricsService::LogNeedForCleanShutdown(); | 1359 MetricsService::LogNeedForCleanShutdown(); |
| 1348 | 1360 |
| 1349 #if defined(OS_WIN) | 1361 #if defined(OS_WIN) |
| 1350 // We check this here because if the profile is OTR (chromeos possibility) | 1362 // We check this here because if the profile is OTR (chromeos possibility) |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1633 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1645 if (base::win::GetVersion() <= base::win::VERSION_XP) |
| 1634 uma_name += "_XP"; | 1646 uma_name += "_XP"; |
| 1635 | 1647 |
| 1636 uma_name += "_PreRead_"; | 1648 uma_name += "_PreRead_"; |
| 1637 uma_name += pre_read_percentage; | 1649 uma_name += pre_read_percentage; |
| 1638 AddPreReadHistogramTime(uma_name.c_str(), time); | 1650 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 1639 } | 1651 } |
| 1640 #endif | 1652 #endif |
| 1641 #endif | 1653 #endif |
| 1642 } | 1654 } |
| OLD | NEW |