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

Unified Diff: chrome/installer/setup/run_all_unittests.cc

Issue 16023027: Lower the I/O priority of the installer when resonable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/installer/setup/run_all_unittests.cc
diff --git a/chrome/installer/setup/run_all_unittests.cc b/chrome/installer/setup/run_all_unittests.cc
index 1f55d012ee73ab1a5d6dbd4a33a713482f8c5489..a309b110884d6b9b074c427d76d882187803e28c 100644
--- a/chrome/installer/setup/run_all_unittests.cc
+++ b/chrome/installer/setup/run_all_unittests.cc
@@ -2,12 +2,19 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/command_line.h"
#include "base/test/test_suite.h"
#include "chrome/common/chrome_paths.h"
+#include "chrome/installer/setup/setup_util_unittest.h"
int main(int argc, char** argv) {
TestSuite test_suite(argc, argv);
+ // Handle the --adjust-process-priority switch, which is used to test the
+ // installer::AdjustProcessPriority() function in a subprocess.
+ if (CommandLine::ForCurrentProcess()->HasSwitch(kAdjustProcessPriority))
+ return DoProcessPriorityAdjustment();
cpu_(ooo_6.6-7.5) 2013/05/31 19:09:49 return here ?
grt (UTC plus 2) 2013/06/01 01:38:33 Right. The idea is that when setup_unittests.exe i
+
// Register Chrome Path provider so that we can get test data dir.
chrome::RegisterPathProvider();

Powered by Google App Engine
This is Rietveld 408576698