Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: chrome/browser/chrome_browser_main.cc

Issue 10907104: Support an --install-from-webstore command line switch (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: responded to review comments Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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::kInstallFromWebstore)) {
1342 extensions::StartupHelper helper;
1343 if (helper.InstallFromWebstore(parsed_command_line(), profile_))
1344 return content::RESULT_CODE_NORMAL_EXIT;
1345 return chrome::RESULT_CODE_INSTALL_FROM_WEBSTORE_ERROR;
1346 }
1347
1348
1341 // Start watching for hangs during startup. We disarm this hang detector when 1349 // Start watching for hangs during startup. We disarm this hang detector when
1342 // ThreadWatcher takes over or when browser is shutdown or when 1350 // ThreadWatcher takes over or when browser is shutdown or when
1343 // startup_watcher_ is deleted. 1351 // startup_watcher_ is deleted.
1344 startup_watcher_->Arm(base::TimeDelta::FromSeconds(300)); 1352 startup_watcher_->Arm(base::TimeDelta::FromSeconds(300));
1345 1353
1346 // Start watching for a hang. 1354 // Start watching for a hang.
1347 MetricsService::LogNeedForCleanShutdown(); 1355 MetricsService::LogNeedForCleanShutdown();
1348 1356
1349 #if defined(OS_WIN) 1357 #if defined(OS_WIN)
1350 // We check this here because if the profile is OTR (chromeos possibility) 1358 // We check this here because if the profile is OTR (chromeos possibility)
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
1633 if (base::win::GetVersion() <= base::win::VERSION_XP) 1641 if (base::win::GetVersion() <= base::win::VERSION_XP)
1634 uma_name += "_XP"; 1642 uma_name += "_XP";
1635 1643
1636 uma_name += "_PreRead_"; 1644 uma_name += "_PreRead_";
1637 uma_name += pre_read_percentage; 1645 uma_name += pre_read_percentage;
1638 AddPreReadHistogramTime(uma_name.c_str(), time); 1646 AddPreReadHistogramTime(uma_name.c_str(), time);
1639 } 1647 }
1640 #endif 1648 #endif
1641 #endif 1649 #endif
1642 } 1650 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698