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

Unified Diff: chrome/browser/chromeos/boot_times_loader.cc

Issue 1995005: Allows browser tests to run with recent change (Closed)
Patch Set: Created 10 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
« no previous file with comments | « chrome/app/chrome_dll_main.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/boot_times_loader.cc
diff --git a/chrome/browser/chromeos/boot_times_loader.cc b/chrome/browser/chromeos/boot_times_loader.cc
index c169298105cef09fa243bbb06334b84f253cd5dc..1d06fad1e769455e92a573f240a8360c76432a80 100644
--- a/chrome/browser/chromeos/boot_times_loader.cc
+++ b/chrome/browser/chromeos/boot_times_loader.cc
@@ -14,6 +14,7 @@
#include "base/string_util.h"
#include "base/thread.h"
#include "chrome/browser/browser_process.h"
+#include "chrome/common/chrome_switches.h"
namespace chromeos {
@@ -38,6 +39,13 @@ BootTimesLoader::Handle BootTimesLoader::GetBootTimes(
return 0;
}
+ const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ if (command_line.HasSwitch(switches::kTestType)) {
+ // TODO(davemoore) This avoids boottimes for tests. This needs to be
+ // replaced with a mock of BootTimesLoader.
+ return 0;
+ }
+
scoped_refptr<CancelableRequest<GetBootTimesCallback> > request(
new CancelableRequest<GetBootTimesCallback>(callback));
AddRequest(request, consumer);
« no previous file with comments | « chrome/app/chrome_dll_main.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698