Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/test/base/chrome_histogram_tester.h" | |
| 6 | |
| 7 #include "base/bind.h" | |
| 8 #include "base/test/test_timeouts.h" | |
| 9 #include "chrome/test/base/ui_test_utils.h" | |
| 10 #include "content/public/browser/histogram_fetcher.h" | |
| 11 | |
| 12 ChromeHistogramTester::ChromeHistogramTester() { | |
| 13 } | |
| 14 | |
| 15 ChromeHistogramTester::~ChromeHistogramTester() { | |
| 16 } | |
| 17 | |
| 18 | |
| 19 void ChromeHistogramTester::FetchTestingSnapshot() { | |
| 20 | |
|
Ilya Sherman
2014/07/16 18:44:47
nit: Spurious newline.
Mike Lerman
2014/07/16 19:36:36
Done.
| |
| 21 scoped_refptr<content::MessageLoopRunner> runner = | |
| 22 new content::MessageLoopRunner; | |
| 23 | |
| 24 content::FetchHistogramsAsynchronously( | |
| 25 base::MessageLoop::current(), | |
| 26 runner->QuitClosure(), | |
| 27 // If this call times out, it means that a child process is not | |
| 28 // responding, which is something we should not ignore. The timeout is | |
| 29 // set to be longer than the normal browser test timeout so that it will | |
| 30 // be prempted by the normal timeout. | |
| 31 TestTimeouts::action_max_timeout() * 2); | |
| 32 runner->Run(); | |
| 33 } | |
| OLD | NEW |